LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Problem with hot plugging usb flash disk (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/problem-with-hot-plugging-usb-flash-disk-713115/)

moki 03-20-2009 09:02 AM

Problem with hot plugging usb flash disk
 
I am running Ubuntu 8.10. Ubuntu doesn't see my usb flash disk when I plug it in after booting up. The only time it sees it is if I go to TERMINAL and type in lsusb. I have to do this 2 to 3 times before it sees it. Copying files from the flash disk to my laptop then takes ages. A 70mb folder took approx 40 minutes to copy. Can anyone help? I am using a Fujitsu Siemens laptop with dual boot. The usb disk works fine in windows XP. Could this be a driver issue?

farslayer 03-20-2009 10:13 AM

I would look at what goes on in the system when you plug the flash drive in..
open a terminal and type the following command, then plug in the drive and see if any errors pop up. You should see the system detect the drive, load the driver, and assign the device id


tail -f /var/log/messages

here is an example output..
Code:

it-lenny:~# tail -f /var/log/messages

Mar 20 08:37:20 it-etch -- MARK --
Mar 20 08:57:21 it-etch -- MARK --
Mar 20 09:17:21 it-etch -- MARK --
Mar 20 09:37:21 it-etch -- MARK --
Mar 20 09:57:21 it-etch -- MARK --
Mar 20 10:17:22 it-etch -- MARK --
Mar 20 10:37:22 it-etch -- MARK --

Mar 20 11:09:33 it-etch kernel: usb 6-8: new high speed USB device using ehci_hcd and address 24
Mar 20 11:09:33 it-etch kernel: usb 6-8: configuration #1 chosen from 1 choice
Mar 20 11:09:33 it-etch kernel: scsi23 : SCSI emulation for USB Mass Storage devices
Mar 20 11:09:38 it-etch kernel:  Vendor: USB2.0    Model: FlashDisk        Rev: 1100
Mar 20 11:09:38 it-etch kernel:  Type:  Direct-Access                      ANSI SCSI revision: 00
Mar 20 11:09:38 it-etch kernel: SCSI device sdc: 999424 512-byte hdwr sectors (512 MB)
Mar 20 11:09:38 it-etch kernel: sdc: Write Protect is off
Mar 20 11:09:38 it-etch kernel: SCSI device sdc: 999424 512-byte hdwr sectors (512 MB)
Mar 20 11:09:38 it-etch kernel: sdc: Write Protect is off
Mar 20 11:09:38 it-etch kernel:  sdc: sdc1
Mar 20 11:09:38 it-etch kernel: sd 23:0:0:0: Attached scsi removable disk sdc
Mar 20 11:09:38 it-etch kernel: sd 23:0:0:0: Attached scsi generic sg2 type 0

ehci_hcd - Driver for USB 2.0 devices
sdc1 - device name assigned to flash drive

moki 03-20-2009 03:20 PM

Problem with hot plugging usb flash disk
 
Thanks for the response. Did as you suggested. Please see below.

moki@ubuntu:~$ tail -f /var/log/messages
Mar 20 21:43:34 ubuntu pulseaudio[5643]: ltdl-bind-now.c: Failed to find original dlopen loader.
Mar 20 21:43:34 ubuntu pulseaudio[5645]: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
Mar 20 21:43:34 ubuntu pulseaudio[5645]: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
Mar 20 21:43:34 ubuntu pulseaudio[5645]: alsa-util.c: Device front:0 doesn't support 44100 Hz, changed to 48000 Hz.
Mar 20 22:02:56 ubuntu -- MARK --
Mar 20 22:13:21 ubuntu kernel: [ 1866.408050] usb 1-3: new high speed USB device using ehci_hcd and address 2
Mar 20 22:13:26 ubuntu kernel: [ 1871.408045] ehci_hcd 0000:00:10.3: Unlink after no-IRQ? Controller is probably using the wrong IRQ.
Mar 20 22:13:36 ubuntu kernel: [ 1882.076039] usb 1-3: new high speed USB device using ehci_hcd and address 3
Mar 20 22:13:52 ubuntu kernel: [ 1897.744053] usb 1-3: new high speed USB device using ehci_hcd and address 4
Mar 20 22:14:02 ubuntu kernel: [ 1908.288054] usb 1-3: new high speed USB device using ehci_hcd and address 5

farslayer 03-20-2009 03:37 PM

Err that certainly doesn't look right.. Nothing like the working example I showed..

I see this was a known bug in Ubuntu LTS.. I wonder if they ignored it ?
https://bugs.launchpad.net/ubuntu/+s....17/+bug/53972

try doing the following command before plugging in the device..
modprobe -r ehci_hcd
And watch that message log again when you plug the device in..

Read the following thread and try some of the fixes like the acpi=noirq in post number 8

moki 03-20-2009 04:59 PM

Problem with hot plugging usb flash disk
 
Tried modprobe-came up with th following:

moki@ubuntu:~$ modprobe -r ehci_hcd
FATAL: Error removing ehci_hcd (/lib/modules/2.6.27-11-generic/kernel/drivers/usb/host/ehci-hcd.ko): Operation not permitted
moki@ubuntu:~$

farslayer 03-21-2009 12:14 AM

OK so no go on that one.. how about the boot option ?

moki 03-22-2009 04:44 PM

Booting up with the flash disk plugged in works fine!

farslayer 03-23-2009 07:49 AM

Glad to hear you got it sorted out, even if it did require different hardware :)

moki 03-27-2009 07:27 AM

Another USB Problem!!
 
Thanks for the help!. I have another problem with my Seagate USB 250GB HDD. I get the following message:

Unable to mount FreeAgent Drive

DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply.
Possible causes include: the remote application did not send a reply,
the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

This is on my Fujitsu Siemens laptop booting up with the drive plugged in. Running Ubuntu 8.10. The drive works fine in Windoze. When I go to "Places" I can see the drive as "FreeAgent Drive". Any ideas?? Looks like Ubuntu 8.10 does not like USB devices!!

farslayer 03-27-2009 08:43 AM

Seagate Free Agent external USB Drive.. When originally released Seagate stated these drives are for Windows only and are not compatible with Linux.. You sure know how to pick em :) On the brighter side Linux folk hate being told NO..

someone figured out a workaround to the drive sleep issue.. http://alienghic.livejournal.com/382903.html
If the drive decides to go to sleep on you and not wake up you will need to apply that workaround.


another item, the one that is probably causing your current issue, is the drive is formatted as NTFS by default, so you would need to install the ntfs-3g driver on your system so it can mount the drive, and be able to read and write to it.
sudo apt-get install libfuse2 fuse-utils ntfs-3g

http://www.ntfs-3g.org/manual.html

moki 03-28-2009 04:45 PM

Really appreciate the help! The drive that I have is a solid state drive - no whirring disk. Anyway I installed the ntfs drive - no difference. Hung up my machine the first time I re-booted. Still get the same message when I try to open up the drive. By the way, I bought this drive a couple of months before I installed Ubuntu. Whatever I buy now, I first check for Linux compatability!!

farslayer 03-28-2009 10:29 PM

Do you have a link to the drive specifications somewhere so we can see what it is ? or the exact model number at least ?


All times are GMT -5. The time now is 05:00 PM.