LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   USB Recognition Problem (https://www.linuxquestions.org/questions/linux-hardware-18/usb-recognition-problem-672603/)

CmK 09-26-2008 05:53 PM

USB Recognition Problem
 
I have Ubuntu Linux on a IBM think pad and when I plug in my Wester Digital Ext HDD nothing happens. I have been working on this problem for 2 days now with no luck. Here are the outputs for lsusb, dmessage | tail -n 20, and sudo fdisk -l

Does anyone know why its doing this?

lsusb

chris@chris-laptop:~$ lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

dmessage | tail -n 20
chris@chris-laptop:~$ dmesg | tail -n 20
[ 9895.790258] usb 4-4: new high speed USB device using ehci_hcd and address 44
[10949.703071] usb 4-4: new high speed USB device using ehci_hcd and address 54
[10950.227445] usb 4-4: new high speed USB device using ehci_hcd and address 58
[10951.913335] usb 4-4: new high speed USB device using ehci_hcd and address 72
[10957.955050] usb 4-4: new high speed USB device using ehci_hcd and address 112
[10962.148229] usb 4-4: new high speed USB device using ehci_hcd and address 126
[ 3868.181565] usb 4-4: new high speed USB device using ehci_hcd and address 4
[10966.132954] usb 4-4: new high speed USB device using ehci_hcd and address 10
[10967.066780] usb 4-4: new high speed USB device using ehci_hcd and address 21
[10967.271905] usb 4-4: new high speed USB device using ehci_hcd and address 22
[10967.600226] usb 4-4: new high speed USB device using ehci_hcd and address 24
[10968.180856] usb 4-4: new high speed USB device using ehci_hcd and address 29
[10969.574177] usb 4-4: new high speed USB device using ehci_hcd and address 40
[10970.376981] usb 4-4: new high speed USB device using ehci_hcd and address 47
[10971.009316] usb 4-4: new high speed USB device using ehci_hcd and address 51
[10971.689266] usb 4-4: new high speed USB device using ehci_hcd and address 56
[10972.124880] usb 4-4: new high speed USB device using ehci_hcd and address 59
[10972.940490] usb 4-4: new high speed USB device using ehci_hcd and address 65
[10973.981045] usb 4-4: new high speed USB device using ehci_hcd and address 74
[10974.260761] usb 4-4: new high speed USB device using ehci_hcd and address 76


chris@chris-laptop:~$ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9b939b93

Device Boot Start End Blocks Id System
/dev/sda1 * 1 9327 74919096 83 Linux
/dev/sda2 9328 9729 3229065 5 Extended
/dev/sda5 9328 9729 3229033+ 82 Linux swap / Solaris
chris@chris-laptop:~$

unSpawn 09-27-2008 04:20 AM

I'd avoid output of "dmesg | tail -n" but instead post USB-related dmesg from the moment you plug in the device. As it's posted now we may miss some lines that could hold clues. Also, from working with different external USB casings a lot I know some are more equal than others (chipset). Some just don't agree with some machines, some function in a flakey way and some "just work" with scores of machines I've encountered. So trying another brand for me wouldn't be an unjustified option.

CmK 09-28-2008 10:54 AM

Thank you for your help so far. I am sorry about the late reply but I was out of town this weekend. Here is the dmesg lines right after I plug in the Drive. I have tried other drives and USB flash drives and none of them are being recognized. Also, idk if it is related but I tried to burn a CD of the the Ubuntu .iso file to reinstall Ubuntu and it is not recognizing my CD drive either. I put a disk in, start CD/DVD Creator and it says to insert a blank CD. I open the CD and put it in again, press OK and it comes back with the same (insert blank CD) message.

Here is the dmesg output when I plug in the Ext HDD
[ 525.818907] usb 4-4: new high speed USB device using ehci_hcd and address 98
[ 527.732938] usb 4-4: new high speed USB device using ehci_hcd and address 18
[ 528.277275] usb 4-4: new high speed USB device using ehci_hcd and address 27
[ 528.486054] usb 4-4: new high speed USB device using ehci_hcd and address 29
[ 529.151357] usb 4-4: new high speed USB device using ehci_hcd and address 39
[ 529.762164] usb 4-4: new high speed USB device using ehci_hcd and address 54
[ 187.300535] usb 4-4: new high speed USB device using ehci_hcd and address 57
[ 188.056563] usb 4-4: new high speed USB device using ehci_hcd and address 61
[ 535.120979] usb 4-4: new high speed USB device using ehci_hcd and address 68
[ 536.380656] usb 4-4: new high speed USB device using ehci_hcd and address 91
[ 536.789320] usb 4-4: new high speed USB device using ehci_hcd and address 97
[ 190.848956] usb 4-4: new high speed USB device using ehci_hcd and address 113
[ 544.654489] usb 4-4: new high speed USB device using ehci_hcd and address 125
[ 544.743224] usb 4-4: new high speed USB device using ehci_hcd and address 126
[ 194.681999] usb 4-4: new high speed USB device using ehci_hcd and address 20
[ 194.953299] usb 4-4: new high speed USB device using ehci_hcd and address 21
[ 195.851507] usb 4-4: new high speed USB device using ehci_hcd and address 25
[ 196.345217] usb 4-4: new high speed USB device using ehci_hcd and address 27
[ 197.543879] usb 4-4: new high speed USB device using ehci_hcd and address 33
[ 200.671824] usb 4-4: new high speed USB device using ehci_hcd and address 52
[ 244.445319] usb 4-4: new high speed USB device using ehci_hcd and address 64
[ 571.325939] usb 4-4: new high speed USB device using ehci_hcd and address 73
[ 717.866540] usb 4-4: new high speed USB device using ehci_hcd and address 83
[ 718.012651] usb 4-4: new high speed USB device using ehci_hcd and address 84
[ 718.142964] usb 4-4: new high speed USB device using ehci_hcd and address 85
[ 254.462873] usb 4-4: new high speed USB device using ehci_hcd and address 101
[ 308.928315] usb 4-4: new high speed USB device using ehci_hcd and address 102
[ 721.768851] usb 4-4: new high speed USB device using ehci_hcd and address 104
[ 721.993415] usb 4-4: new high speed USB device using ehci_hcd and address 109
[ 255.079377] usb 4-4: new high speed USB device using ehci_hcd and address 119
[ 256.208407] usb 4-4: new high speed USB device using ehci_hcd and address 5
[ 727.872259] usb 4-4: new high speed USB device using ehci_hcd and address 8
[ 731.695995] usb 4-4: new high speed USB device using ehci_hcd and address 18
[ 733.123745] usb 4-4: new high speed USB device using ehci_hcd and address 25
chris@chris-laptop:~$

unSpawn 09-29-2008 01:12 AM

Quote:

Originally Posted by CmK (Post 3294196)
I have tried other drives and USB flash drives and none of them are being recognized.

Looks like the device doesn't "settle down", so if yours runs a default install, without subsystems disabled that would block detection, and hardware-wise there are no BIOS settings blocking USB, and the USB devices work OK elsewhere, then the only conclusion I could support your HW is b0rken?..

jschiwal 09-29-2008 01:28 AM

You may have better luck running "sudo tail -f /var/log/messages" and then plugging in the drive. I've notices that dmessage is behind a bit.

Also, try a different usb cable.

CmK 09-29-2008 06:33 AM

Ok When I do the sudo tail -f /var/log/messages command I get the same results.

usb 4-4: new high speed USB device using ehci_hcd and address XX

Where XX are two digit numbers that change about every second. What does that mean?

Aslo, I just put Linux on this machine last week. When I was running Windows the Ext HDD and Flash drives were working fine, and they all still work fine on other machines. I tried reformatting the HDD to NTFS but that didnt help either. Do you think reinstalling Linux might help?

pinniped 09-29-2008 07:08 AM

For whatever reason, that device is disconnecting frequently (and the USB system keeps assigning it a different number every time).

Often (but not always) such a problem is due to a deficient power supply; is it externally powered or powered via the USB connectors?

CmK 09-29-2008 08:29 AM

Hmm..that would make sense. Every now and then it connects but then goes away. It is powered by the USB connection. That would explain why the Flash drives would do that as well. However it was working fine when I had windows on the machine last week. What would cause it to start doing that? Does the OS somehow contol the power going to the USB port?

pinniped 09-29-2008 04:22 PM

The OS can put the USB controller into a low-power mode, but in that case all your USB gadgets will disappear. The USB electrical specification states that a maximum of 100mA can be drawn from a single connector before the controller shall remove power from that connector and signal a fault. So - I doubt this has anything to do with the USB controller and if the disk is fine with WinDuhs and with the same USB gadgets attached then there's no problem with the power being drawn from the lines.

Do you have power saving features enabled on your system? The storage drivers may be asking the disks to go to sleep.

CmK 09-29-2008 06:22 PM

The power saving modes are set to the default settings I believe. How do I adjust the power settings to something like that? the only settings I know of to change are in System > Preferences > Power Management but that only changes the display. Aslo, if its a power issue, is that it is not registering when I do the lsusb command? I tried it on another machine running Ubuntu Hardy and it recognized it and auto mounted with no problem so I don't think its a formatting issue.

pinniped 09-29-2008 06:35 PM

Try booting with the extra parameters: noacpi noapm
That should disable power management (unless its re-enabled later); see if that affects the operation.

There may also be other Thinkpad-related issues; maybe google can help you.

CmK 09-29-2008 07:49 PM

How do I boot with extra parameters? I'm sorry but I am pretty new at this Linux/manipulating your OS stuff but its really interesting and im trying to learn. I'll see what google can help with as well. Thanks for all the advice so far

farslayer 09-30-2008 08:44 AM

I ran into an odd USB deice problem a while back and it turned out to be a signal level issue between the device and the PC.

The workaround was to plug the device into a powered USB HUB and then plug the hub into the PC. Should that have been required to make things work ? Heck no. Did it resolve the issue ? Yes.

so however much of a long-shot, I'd suggest you give it a try to rule out a possible incompatibility between the USB Host and USB device circuitry.


That solution was suggested by the engineering department of the product manufacturer. I went beyond Tech Support to get that resolution.. some guy that kept telling me to re-install the windows drivers just wasn't cutting it.. It seems their engineering department was aware of the hardware issue, but as usual the info had not filtered down to tech support yet.

jschiwal 09-30-2008 10:40 PM

I would suggest inserting a usb pendrive and seeing if that works. This may tell you whether you have a problem with your Linux installation or the device. A third possibility is a hardware problem with your computer or that the usb hub controller chip that your computer uses isn't supported.

CmK 10-01-2008 06:25 AM

I have tried several other devices and none of them work in the drive. I tried the Ext HDD in a friends machine that also has Linux Hardy and it worked fine. I also downloaded an official copy of Ubuntu from their website, booted from the CD and it still didn't work. The drive was working fine last week when I had Windows on it, it would be quite a coincidence that the hardware would fail at the exact time I switch OS. This would lead me to believe it has to do with the way the OS interacts with the USB hardware and I have no idea how that works.

Does anyone have suggestions on how I can asses and fix this problem.

farslayer 10-01-2008 07:29 AM

no USB storage devices work..

Do you have a USB mouse ? if so does it work ?

Are the proper modules being loaded for USB storage devices ?

Code:

it-etch:~# lsmod | grep usb

usbserial              29128  1 pl2303
usbhid                37248  0
usb_storage            72000  0
ide_core              110504  5 usb_storage,ide_generic,ide_cd,generic,atiixp
usbcore              112644  7 pl2303,usbserial,usbhid,usb_storage,ehci_hcd,ohci_hcd
scsi_mod              124168  5 sg,usb_storage,sd_mod,ahci,libata

ehci_hcd and ohci_hcd are usb controller drivers
usb_storage module is needed to support USB storage devices
sd_mod is a scsi disk driver used for scsi emulation for usb devices


When troubleshooting usb storage devices I typically issue this command before plugging in the device. I can then see what the system is doing when it tries to detect the device and make it operational.
Code:


tail -f /var/log/mesages


Oct  1 08:23:24 it-etch kernel: usb 6-7: new high speed USB device using ehci_hcd and address 11
Oct  1 08:23:24 it-etch kernel: usb 6-7: configuration #1 chosen from 1 choice
Oct  1 08:23:24 it-etch kernel: scsi10 : SCSI emulation for USB Mass Storage devices
Oct  1 08:23:29 it-etch kernel:  Vendor: USB 2.0  Model: Flash Disk        Rev: 1100
Oct  1 08:23:29 it-etch kernel:  Type:  Direct-Access                      ANSI SCSI revision: 00
Oct  1 08:23:29 it-etch kernel: SCSI device sdb: 3963904 512-byte hdwr sectors (2030 MB)
Oct  1 08:23:29 it-etch kernel: sdb: Write Protect is off
Oct  1 08:23:29 it-etch kernel: SCSI device sdb: 3963904 512-byte hdwr sectors (2030 MB)
Oct  1 08:23:29 it-etch kernel: sdb: Write Protect is off
Oct  1 08:23:29 it-etch kernel:  sdb: sdb1
Oct  1 08:23:29 it-etch kernel: sd 10:0:0:0: Attached scsi removable disk sdb
Oct  1 08:23:29 it-etch kernel: sd 10:0:0:0: Attached scsi generic sg1 type 0

I have had systems that would dynamically load the usb_storage module when a device was connected.


so... aer the proper modules loaded on your system ?
what does your messaeg log look like when you connect the device ?

CmK 10-02-2008 08:06 PM

No I do not have a usb mouse. I plugged in the USB and tried the lsmod | grep usb and suddenly it mounted and worked! I have no idea why. Now ever now and then it goes away and comes back but it's there most of the time now. I have no idea why suddenly it is working. Do you have any idea what would cause it to suddenly work? here is the outputs, but i would imagine they look fine now that its working

chris@chris-laptop:~$ lsmod | grep usb
usb_storage 73664 1
libusual 19108 1 usb_storage
scsi_mod 151436 5 usb_storage,sg,sr_mod,sd_mod,libata
usbcore 146028 5 usb_storage,libusual,ehci_hcd,uhci_hcd
chris@chris-laptop:~$

chris@chris-laptop:~$ tail -f /var/log/messages
Oct 2 20:55:40 chris-laptop kernel: [ 1041.161990] usb 4-4: configuration #1 chosen from 1 choice
Oct 2 20:55:40 chris-laptop kernel: [ 1041.207144] scsi6 : SCSI emulation for USB Mass Storage devices
Oct 2 20:55:45 chris-laptop kernel: [ 834.792071] scsi 6:0:0:0: Direct-Access WD 1600BEV External 1.04 PQ: 0 ANSI: 4
Oct 2 20:55:45 chris-laptop kernel: [ 834.807056] sd 6:0:0:0: [sdb] 312581808 512-byte hardware sectors (160042 MB)
Oct 2 20:55:45 chris-laptop kernel: [ 834.807891] sd 6:0:0:0: [sdb] Write Protect is off
Oct 2 20:55:45 chris-laptop kernel: [ 834.809137] sd 6:0:0:0: [sdb] 312581808 512-byte hardware sectors (160042 MB)
Oct 2 20:55:45 chris-laptop kernel: [ 834.810014] sd 6:0:0:0: [sdb] Write Protect is off
Oct 2 20:55:45 chris-laptop kernel: [ 834.810029] sdb: sdb1
Oct 2 20:55:45 chris-laptop kernel: [ 834.857762] sd 6:0:0:0: [sdb] Attached SCSI disk
Oct 2 20:55:45 chris-laptop kernel: [ 834.857829] sd 6:0:0:0: Attached scsi generic sg2 type 0


Thanks for all your help guys...If anyone could explain what happened I would really appreciate it

CmK 10-02-2008 08:27 PM

OK so its been about 5 min from last last post and the darn thing just disappeared. Why would it recognize and mount the drive one min then drop it the next?

forum1793 10-02-2008 09:25 PM

Could something be going to sleep and not waking up?

CmK 10-02-2008 10:06 PM

Something going to sleep? like what? So on a whim I took out my Int HDD, CD Drive and Batt and sprayed the insides out with a a can of dry air, turned the computer back on and now its appearing and disappearing about every 3 min. I am starting to think I have a physical bad connection somewhere

farslayer 10-02-2008 10:10 PM

Bad USB Cable ?

Have you tried different USB ports on the computer ? I've had systems where the ports on the front of the PC caused problems but the ones on the rear worked fine. Nothing like having the PC spontaneously reboot whenever I plugged anything into the port on the front.

I doubt usbview will help with an intermittent connection, but it might provide some information.


All times are GMT -5. The time now is 10:54 AM.