FS#29526 - [linux] 3.3.2 - 3.8.x USB devices cannot be hot-plugged after upgrading kernel

Attached to Project: Arch Linux
Opened by Robby Lank (bluefalcon) - Wednesday, 18 April 2012, 16:31 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 30 July 2013, 10:21 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 12
Private No

Details

Description:
Recent kernel updates seem to have broken usb hotplug support on my system. If a usb device is plugged in at boot time everything works fine. However, if the device is plugged in after boot it will not be recognized unless lsusb -v is run or if I run "sudo rmmod ehci_hcd && sudo modprobe ehci_hcd" I don't see any error output from the ehci_hcd module so I am not sure what is failing here, but I believe that it happend after upgrading from kernel 3.2.8-1 to 3.3.1-1. 3.3.2-1 does not fix the issue.


Additional info:
I should also note that lsusb shows nothing and nothing is seen in dmesg output until either of the above mentioned commands are run.

My system is a 2008 MacBook Pro 15" I am running an up-to-date arch system as of Apr 19 12:30pm.

Steps to reproduce:
1. Boot machine
2. Try to plugin a USB device. I have tried a USB drive and my cell phone.
3. Verify that neither show up in lsusb or in /proc/bus/usb/devices
4. run lsusb -v, devices show up in dmesg and in proc.
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Tuesday, 30 July 2013, 10:21 GMT
Reason for closing:  Fixed
Additional comments about closing:  3.9.x
Comment by Karol Błażewicz (karol) - Wednesday, 18 April 2012, 18:06 GMT
Cannot reproduce on my 32-bit Arch, everything works fine.
Comment by Robby Lank (bluefalcon) - Wednesday, 18 April 2012, 18:09 GMT
I suppose it is a good idea to attach my rc.conf file perhaps there is another module that is causing my issues.
   rc.conf (3.4 KiB)
Comment by Karol Błażewicz (karol) - Wednesday, 18 April 2012, 18:11 GMT
One more thing: if you upgrade your kernel, you need to reboot to get the modules working properly.
Comment by Robby Lank (bluefalcon) - Wednesday, 18 April 2012, 18:12 GMT
The problem persists through reboots. I have also tried ACPI=off noapic and nolapic boot options to no avail.
Comment by Robby Lank (bluefalcon) - Wednesday, 18 April 2012, 18:28 GMT
Please let me know if I can do anything additional to help get to the bottom of this. I find it interesting that devices work fine if the USB module is reloaded. It makes me think that the module is talking to the USB device just fine, but it is not getting the interrupt for new devices for one reason or the other. I'm not sure what has changed to stop this. I think I will just start downgrading my kernel till it works again. I'll let you know what I find.
Comment by Robby Lank (bluefalcon) - Wednesday, 18 April 2012, 19:04 GMT
downgrading to kernel 3.2.2.-1 fixed the Issue. So the problem is with the kernel sometime after that. Also, had to downgrade the virtual box modules and the nvidia driver, but I don't think these are the issue. Any thoughts at this point would be helpful.
Comment by Robby Lank (bluefalcon) - Wednesday, 18 April 2012, 19:09 GMT
This is the config for 3.2.2-1:
   config (125 KiB)
Comment by Robby Lank (bluefalcon) - Wednesday, 18 April 2012, 19:18 GMT
This is the diff between the 3.2.2 kernel config and the 3.3.2 kernel config. I figure this will be more helpful.
Comment by radu fenesan (phene) - Wednesday, 09 May 2012, 21:36 GMT
I have the same bug with a 2008 Macbook(4,1) running archbang latest with 3.3.5-1-ARCH

My user is added to the proper groups (dbus, storage, disk). Nothing new appears in /sys/block after inserting a USB drive. Running lsusb -v detects the usb properly. It seems like a kernel issue, please fix this!
Comment by radu fenesan (phene) - Saturday, 12 May 2012, 21:00 GMT
i have found a fix for this issue: append this line to you /etc/rc.local and reboot:

modprobe -r ehci-hcd

Everything works fine after this!
Comment by Tobias Powalowski (tpowa) - Sunday, 13 May 2012, 08:20 GMT
With this you disable USB2.0 support.
Comment by radu fenesan (phene) - Monday, 14 May 2012, 20:14 GMT
I am aware of this. Oddly enough reloading the module shortly after does the trick for good.
Comment by Michal Docekal (lawmaker) - Wednesday, 23 May 2012, 07:43 GMT
I can confirm this on my machine as well (HP Mini 5103, 32-bit system), I even tried kernel 3.4.0 from testing. Also tried removing virtualbox modules completely (and rebooting, of course), just to see if they're not causing the issue, but no luck.

Reloading the module doesn't work for good, it only detects connected devices. If I connect any other device (or remove and reconnect the same device) afterwards, situation remains, device remains undetected.
Comment by radu fenesan (phene) - Thursday, 24 May 2012, 14:17 GMT
For me it seems the problem was actually caused by laptop-mode-tools setting the USB ports to autosuspend. Disable that if you are using laptop-mode-tools.
Comment by Ryan C Brown (ryanbrownstar) - Friday, 25 May 2012, 15:20 GMT
I've been affected by what seems to be a similar issue, but it doesn't occur at boot. If I move a lot of data over USB, ehci_hcd hangs and all USB devices quit responding. This happens with several hard disk, my mobile phone and my USB wireless card. sudo rmmod ehci_hcd && sudo modprobe ehci_hcd brings it all back up.

I will run a full update this weekend, repro the issue and pull some data. Hopefully there will be something helpful in there.
Comment by Noel Maersk (veox) - Saturday, 14 July 2012, 21:45 GMT
Another workaround is to turn off autosuspend entirely. Specify usb.autosuspend=-1 for the kernel.
P.S. I suppose this is an upstream issue.
Comment by Juho Jokelainen (shiona) - Wednesday, 01 August 2012, 20:37 GMT
I have the same problem with the boot, with the extra that modprobe --remove ehci_hcd results in:
[ 960.423296] INFO: task modprobe:912 blocked for more than 120 seconds.
[ 960.423302] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
and the modprobe to go into uninterruptable sleep.
This also happens if run in rc.local (unable to boot that way)

At boot usb devices are detected correctly, but after that only removing them works.
Removing and plugging in a device that has been detected:
[ 1250.500027] usb 3-1: USB disconnect, device number 2

I guess the most important lines from rc.conf:

MOD_AUTOLOAD="yes"
MODULES=()
DAEMONS=(syslog-ng network netfs crond dbus ntpdate sshd fam samba gdm tvheadend httpd)

Affected kernels noticed: 3.4.6, 3.4.7
Not a laptop.


I've been having problems with USB earlier. From some point in 2.6.3x or so
khubd started crashing randomly, going into uninterruptable sleep. All devices that
were working at the time (mouse) continued to work, but devices like dvb card and
webcam could not be connected to afterwards. I'm not sure if this problem persists,
it did continue to the 3.2.x at least, but I haven't seen khubd halt in 3.3.x.

All that time rmmod ehci_hcd has halted.
This is should not be a hardware problem, I have changed everything but the display
around the installation.
Comment by Greg (dolby) - Monday, 15 October 2012, 02:48 GMT
Is there a bug report in bugzilla.kernel.org for this?
Comment by Greg (dolby) - Saturday, 17 November 2012, 08:38 GMT
Still a problem with 3.6.6?
Comment by Juho Jokelainen (shiona) - Sunday, 18 November 2012, 13:15 GMT
3.6.6-1 still affected for me.
Comment by Tobias Powalowski (tpowa) - Wednesday, 23 January 2013, 14:57 GMT
Status on 3.7.x?
Comment by Samuel S. Gross (ssgross) - Sunday, 27 January 2013, 20:53 GMT
I can confirm this is still an issue on kernel 3.6.11-1 x86_64
Has no one resolved this?
It seems the suggestion of
"Specify usb.autosuspend=-1 for the kernel."
would be an acceptable work around for a desktop that is always on. can someone tell me where the config file is and/or how to change this option?
Comment by Noel Maersk (veox) - Sunday, 27 January 2013, 22:10 GMT
tpowa, I still see this on 3.7.4, but I use a custom kernel.

ssgross, see https://wiki.archlinux.org/index.php/Kernel_parameters
Comment by Tobias Powalowski (tpowa) - Wednesday, 27 February 2013, 11:09 GMT
Status on 3.8?
Comment by Pablo Lezaeta (Jristz) - Sunday, 10 March 2013, 03:00 GMT
Afectby me in 3.8 but The workaround forusb.susoend=-1 solve the problem here
Comment by Tobias Powalowski (tpowa) - Thursday, 23 May 2013, 19:41 GMT
Status on 3.9?
Comment by Pablo Lezaeta (Jristz) - Friday, 24 May 2013, 05:04 GMT
For me was fix'd but I don't know

Loading...