USB device detection problems in 2.6.20

Bug #102659 reported by Ryan Novosielski
22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux
Fix Released
Medium
linux-source-2.6.20 (Ubuntu)
Won't Fix
Undecided
Unassigned
linux-source-2.6.22 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: linux-image-2.6.20-13-generic
Still present in: linux-image-2.6.20-14-generic
Still present in: linux-image-2.6.20-15-generic

Upgraded to Kubuntu Feisty Fawn 7.04, kernel 2.6.20-13 installed. pam_bioapi was working fine under 2.6.17-11, but immediately after upgrade, I am experiencing USB problems. Attempting to login, the pam module causes the following to be printed to stdout:

[ 357.656000] hub 1-2.3:1.0: hub_port_status failed (err = -71)
[ 357.656000] hub 1-2.3:1.0: cannot disable port 1 (err = -71)
[ 357.660000] hub 1-2.3:1.0: hub_port_status failed (err = -71)
[ 357.768000] hub 1-2:1.0: port 3 disabled by hub (EMI?), re-enabling...

This works very occasionally (not the first time I tried it either, somewhere around the 20-30th time that the module was used) and not consistently. Other than that, the machine consistently prints that error and falls back to password auth every time.

The only special boot options I have tried are pci=assign-busses and pci=routeirq as dmesg recommends them:

Apr 3 18:19:43 novosirj-laptop kernel: [ 0.205402] PCI: Bus #04 (-#07) is hidden behind transparent bridge #03 (-#04) (try 'pci=assi
gn-busses')
Apr 3 18:19:43 novosirj-laptop kernel: [ 0.205404] Please report the result to linux-kernel to fix this permanently

...but this has apparently no effect, except appeared to make things slightly worse. A recompile of the module also had no effect.

Another bit of information is that this DOES continue to work if I boot back into the still-installed linux-image-2.6.17-11. This makes me think it may not be related to an installed base of libraries.

Please advise me if I may need to provide more information.

Revision history for this message
Ryan Novosielski (novosirj) wrote :

Still behaves the same in 2.6.20-14.

Revision history for this message
Ryan Novosielski (novosirj) wrote :

Have read the guidelines for posting a proper kernel bug and would like to head off "Needs Info" status. ;)

First off, uname -a, the rest included as attachments:

Linux novosirj-laptop 2.6.20-14-generic #2 SMP Mon Apr 2 20:37:49 UTC 2007 i686 GNU/Linux

Revision history for this message
Ryan Novosielski (novosirj) wrote :
Revision history for this message
Ryan Novosielski (novosirj) wrote :

The following is the output of lsusb, with `tail -f /var/log/messages &` running at the same time. lsusb causes errors to appear on the console.

Revision history for this message
Ryan Novosielski (novosirj) wrote :

One final note: this does NOT appear to be the same as bug 88746 since unloading ehci_hcd does not seem to make any difference (this is the reason that you are seeing references to ehci_hcd in the dmesg output).

This is a Dell Latitude D620, a fairly common new model of system.

Revision history for this message
Ryan Novosielski (novosirj) wrote :

I will now attach files from 2.6.17-11 that show the device working properly:

Linux novosirj-laptop 2.6.17-11-generic #2 SMP Thu Feb 1 19:52:28 UTC 2007 i686 GNU/Linux

description: updated
Revision history for this message
Ryan Novosielski (novosirj) wrote :
Revision history for this message
Ryan Novosielski (novosirj) wrote :
Revision history for this message
Ryan Novosielski (novosirj) wrote :

Problem still present in 2.6.20-15.14.

The release date draws near and I'm getting somewhat concerned!

description: updated
Revision history for this message
Данило Шеган (danilo) wrote :

I have this same problem on Dell Latitude D620 and 2.6.20-15: lsusb with first run doesn't list fingerprint reader, then with the next run it lists it. Later runs may again show it without fingerprint reader, since USB hub keeps reloading itself.

The gist of the messages appearing in /var/log/messages and dmesg is:

[ 62.412000] hub 2-2.3:1.0: hub_port_status failed (err = -71)
[ 62.412000] hub 2-2.3:1.0: cannot disable port 1 (err = -71)
[ 62.412000] hub 2-2.3:1.0: hub_port_status failed (err = -71)
[ 62.416000] hub 2-2.3:1.0: hub_port_status failed (err = -71)
[ 62.416000] hub 2-2.3:1.0: cannot disable port 2 (err = -71)
[ 62.416000] hub 2-2.3:1.0: hub_port_status failed (err = -71)
[ 62.420000] hub 2-2.3:1.0: hub_port_status failed (err = -71)
[ 62.480000] hub 2-2:1.0: port 3 disabled by hub (EMI?), re-enabling...
[ 62.480000] usb 2-2.3: USB disconnect, address 3
[ 62.480000] usb 2-2.3.1: USB disconnect, address 5
[ 62.484000] usb 2-2.3.2: USB disconnect, address 6
[ 62.556000] usb 2-2.3: new full speed USB device using uhci_hcd and address 7
[ 62.684000] usb 2-2.3: configuration #1 chosen from 1 choice
[ 62.688000] hub 2-2.3:1.0: USB hub found
[ 62.688000] hub 2-2.3:1.0: 3 ports detected
[ 63.004000] usb 2-2.3.1: new full speed USB device using uhci_hcd and address 8
[ 63.140000] usb 2-2.3.1: configuration #1 chosen from 1 choice
[ 63.348000] usb 2-2.3.2: new full speed USB device using uhci_hcd and address 9
[ 63.468000] usb 2-2.3.2: configuration #1 chosen from 1 choice
[ 67.568000] Bluetooth: L2CAP ver 2.8
[ 67.568000] Bluetooth: L2CAP socket layer initialized
[

This leads to fingerprint reader (and bluetooth, which sits on the same USB line, apparently) being pretty unstable (sometimes working, sometimes not), but it "wakes up" on every access to USB devices after a few seconds.

All this works fine with 2.6.17-11 from Edgy.

Revision history for this message
Ryan Novosielski (novosirj) wrote :

I have the fingerprint reader disappearing and reappearing like the previous person (I didn't happen to try lsusb over and over before this). On access, the device seems to connect on lsusb, and a subsequent lsusb shows the device. This does not appear to affect my Bluetooth -- perhaps I am lucky and mine is on a different line.

I wish a maintainer would read this and give it a status.

Revision history for this message
Jouke74 (hottenga) wrote :

Same problem here. My USB cardreader connects and disconnects a few times. Dmesg full of messages. And finally fails as the cardreader is considered as 4 harddrives.

Revision history for this message
Ryan Novosielski (novosirj) wrote :

This problem is also exhibited by booting off the Feisty DVD -- devices come and go on the USB chain.

Revision history for this message
Lorenco Trichardt (trichalo) wrote :

Linux ibmtux 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux

Got the same problem attaching USB Card Reader,
 4434.900000] ehci_hcd 0000:00:1d.7: port 3 reset error -110
[ 4434.900000] hub 4-0:1.0: hub_port_status failed (err = -32)
[ 4439.932000] usb 4-3: new high speed USB device using ehci_hcd and address 102
[ 4441.444000] usb 4-3: new high speed USB device using ehci_hcd and address 107
[ 4446.484000] usb 4-3: new high speed USB device using ehci_hcd and address 126
[ 4446.744000] ehci_hcd 0000:00:1d.7: port 3 reset error -110
[ 4446.744000] hub 4-0:1.0: hub_port_status failed (err = -32)

Revision history for this message
Finn Andersen (finn-wax) wrote :

Same problems on my Dell Latitude D620 running a fresh install of ubuntu 7.04 :-(
lsusb must be run 2-3 times before the fingerprint reader shows up.
But it's gone again when I try to login to a new terminal via alt-F2

Error messages on the screen:
[ 6032.392000] hub 1-2.3:1.0: hub_port_status failed (err = -71)
[ 6032.392000] hub 1-2.3:1.0: cannot disable port 1 (err = -71)
[ 6032.392000] hub 1-2.3:1.0: hub_port_status failed (err = -71)
[ 6032.480000] hub 1-2:1.0: port 3 disabled by hub (EMI?), re-enabling...

uname -a : Linux lappy2 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux

Revision history for this message
Данило Шеган (danilo) wrote :

From my quick tests, regression seems to have been introduced in 2.6.19 (2.6.18 kernel works fine), where USB subsystem seems to have been rewritten.

Revision history for this message
Ryan Novosielski (novosirj) wrote : Re: [Bug 102659] Re: USB device detection problems in 2.6.20

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Данило Шеган wrote:
>>From my quick tests, regression seems to have been introduced in 2.6.19
> (2.6.18 kernel works fine), where USB subsystem seems to have been
> rewritten.

Would it then be appropriate to assume this is not a Ubuntu bug, but an
upstream kernel bug? Thank you for taking the time to test this one out
- -- it is driving me nuts that I have hardware I can't use on the new
kernel.

- --
 ---- _ _ _ _ ___ _ _ _
 |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Systems Programmer III
 |$&| |__| | | |__/ | \| _| |<email address hidden> - 973/972.0922 (2-0922)
 \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFGXskgmb+gadEcsb4RAq3zAKDUZEu2jVM7gHkEYpNqQ0MHe+Ei1QCXReXL
ia5w8hSU3GAi8v6Dm6OntA==
=gtjx
-----END PGP SIGNATURE-----

Revision history for this message
Srivatsa Kanchi R (srivatsak) wrote :

This behaviour also found when using USB ADSL modem. Though the hardware (Huawei WA1003A) is compatible with ueagle-atm driver, driver is not loaded when usb is plugged in. i need to perform someting like below:
 sudo echo -n 1 > /sys/bus/usb/devices/2-2/bConfigurationValue
to get the driver loaded and interface created. After a heavy network traffic (or after a while) the usb gets disabled. Below are the relevant messages:

[81918.704000] hub 2-0:1.0: port 2 disabled by hub (EMI?), re-enabling...
[81918.704000] usb 2-2: USB disconnect, address 9
[81918.816000] usb 2-2: new full speed USB device using uhci_hcd and address 10
[81919.004000] usb 2-2: no configuration chosen from 1 choice

uname -a
Linux sarvothma 2.6.20-16-generic #2 SMP Wed May 23 01:46:23 UTC 2007 i686 GNU/Linux

Revision history for this message
triceo (lukas-petrovicky) wrote :

I can confirm what's been said in comment 15, except that I use Dell Latitude D820 and latest Gutsy.

uname -a: Linux satch 2.6.22-6-generic #1 SMP Fri Jun 1 19:24:12 GMT 2007 i686 GNU/Linux

Revision history for this message
Данило Шеган (danilo) wrote :

This is likely to be related with CONFIG_USB_SUSPEND=y (look at bug #85488), so I want to try building kernel without USB_SUSPEND support, but I am having problems with my set-up atm. If anyone else can try and report here, it'd be welcome.

Revision history for this message
triceo (lukas-petrovicky) wrote :

This actually *is* an upstream bug. References to similar problem can be found in
- Red Hat's Bugzilla:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=243038
- Kernel Bugzilla:
http://bugzilla.kernel.org/show_bug.cgi?id=8606

Changed in linux:
status: Unknown → Confirmed
Changed in linux:
status: Confirmed → Incomplete
Revision history for this message
Ryan Novosielski (novosirj) wrote :

OK, I understand it's an upstream bug, but what about it is incomplete?

Revision history for this message
Данило Шеган (danilo) wrote :

Ryan, you'll have to ask that upstream (you can notice that only the upstream bug has been marked as 'incomplete', and that's what upstream did)

To fix this for us instead, we need to add our devices to drivers/usb/core/quirks.c in the upstream kernel. Gutsy kernel should already have usbcore.autosuspend option which disables the auto suspend for all USB devices, but I haven't tried it yet.

Revision history for this message
Michal (mikeos) wrote :

Problem still found in latest Gutsy kernel: Linux hostname 2.6.22-11-generic #1 SMP Fri Sep 7 04:31:16 GMT 2007 x86_64 GNU/Linux

Revision history for this message
Michal (mikeos) wrote :

Oops, it seems to be evident the "problem" is not in kernel but in devices which do not comply with the USB specification.
Workaround found here, as mentioned by Danilo Шеган : https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/85488
Well, also Dell seems to be shipping such devices in their laptops: SGS Thomson Microelectronics Fingerprint Reader in my Latitude D820 has the problem.

Revision history for this message
Michal (mikeos) wrote :

After having carefully read the complete thread below and tested extensively the proposed workaround I realized it did not work. Sorry for the confusion.
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/85488

Revision history for this message
Michal (mikeos) wrote :

I feel like spamming this thread, however I tried to write this workaround which could be easily applied even by newbies and which works fine for me on Gutsy kernel 2.6.22-11 generic. Concretely it made the 0483:2016 SGS Thomson Microelectronics Fingerprint Reader work properly on my Dell Latitude D820.

1) As root open for editing the file "/etc/rc.local", e.g. by "sudo nano /etc/rc.local"

2) Add the following three lines before the last line (which should contain the text "exit 0" and must be kept like that).

echo -1 > /sys/module/usbcore/parameters/autosuspend
sleep 1
/usr/sbin/lsusb

3) Restart your machine

It will disable autosuspend for all USB devices without having to patch kernel. My attempts to turn off autosuspend for selected devices were not successful.
Remember to remove this script once a new kernel comes out having your problematic device in the USB autosuspend blacklist.

Revision history for this message
Ryan Novosielski (novosirj) wrote :

This does not work for the 2.6.20 kernels, apparently, just as an FYI to anyone who's thinking of bothering.

Revision history for this message
Ryan Novosielski (novosirj) wrote :

2.6.20 does not appear to HAVE a quirks.c -- is there something I can do on this version (eg. create a quirks.c), or is there something located elsewhere? If anyone knows, let me know.

Revision history for this message
Данило Шеган (danilo) wrote :

Ryan, if you are already considering compiling your own kernel, a simple CONFIG_USB_SUSPEND=n option should do it for you. However, it will disable USB_SUSPEND completely (just like the above echo -1 will on 2.6.22), so your computer may have more problems suspending and getting back from suspend (but, you'll have to try that yourself).

Revision history for this message
Ryan Novosielski (novosirj) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That's why I was looking for the quirks.c, however, since that would
allow me to do it per device.

Данило Шеган wrote:
> Ryan, if you are already considering compiling your own kernel, a simple
> CONFIG_USB_SUSPEND=n option should do it for you. However, it will
> disable USB_SUSPEND completely (just like the above echo -1 will on
> 2.6.22), so your computer may have more problems suspending and getting
> back from suspend (but, you'll have to try that yourself).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG6CnNmb+gadEcsb4RAsKwAKDSA7nHuonB9hlhUb1tZVJXnd6I4ACfa0De
0S5Fz/fxBN7AG74X5viyWic=
=wlGl
-----END PGP SIGNATURE-----

Revision history for this message
Ryan Novosielski (novosirj) wrote :

This is fixed in Gutsy kernel 2.6.22-11, per the release notes. I'm currently running 2.6.22-14 and this problem is GONE!

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Thanks for the update Ryan. I'm marking this as "Fix-Released" against linux-source-2.6.22.

Changed in linux-source-2.6.22:
status: New → Fix Released
Changed in linux:
status: Incomplete → Fix Released
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The 18 month support period for Feisty Fawn 7.04 has reached it's end of life - http://www.ubuntu.com/news/ubuntu-7.04-end-of-life . As a result, we are closing the linux-source-2.6.20 kernel task. Thanks.

Changed in linux-source-2.6.20:
status: New → Won't Fix
Changed in linux:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.