FS#18866 - [kernel26] USB mouse and USB audio work fine separately, but not simultaneously

Attached to Project: Arch Linux
Opened by Benoit Jacob (bjacob) - Sunday, 28 March 2010, 14:00 GMT
Last edited by Tobias Powalowski (tpowa) - Friday, 27 August 2010, 14:53 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 3
Private No

Details

Hi,

I have a USB mouse and a USB audio DAC.

Both work fine separately on my system.

The problem is when I try using both simultaneously. The first-plugged device will work fine, but not the second-plugged device. For example, if I plug the audio DAC first and the mouse second, then the audio DAC works and the mouse doesn't work. And conversely.

If I then unplug the first-plugged device and plug the other one, then it works. No need to reboot.

When I say that the second-plugged device doesn't work, here's what I mean: the USB device is detected by the system, but gets "reset" every 2 seconds and can't be actually used at all.

Here are some log messages.

lsusb output:

$ lsusb | egrep -i mouse\|texas
Bus 002 Device 009: ID 08bb:2704 Texas Instruments Japan
Bus 002 Device 007: ID 046d:c526 Logitech, Inc. MX Revolution Cordless Mouse

Here, "Texas Instruments Japan" is my audio DAC. So, at the level of lsusb, all is well.

Now here is what appears in /var/log/messages.log when I plug the second USB device (none of that happens if I plug only one of these 2 devices):

$ sudo tail -f /var/log/messages.log
Mar 26 08:33:25 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9
Mar 26 08:33:26 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9
Mar 26 08:33:26 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9
Mar 26 08:33:27 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9
Mar 26 08:33:28 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9
Mar 26 08:33:28 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9
Mar 26 08:33:28 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9
Mar 26 08:33:29 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9
Mar 26 08:33:29 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9
Mar 26 08:33:30 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9
Mar 26 08:33:31 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9
Mar 26 08:33:31 kiwi kernel: usb 2-1.3: reset full speed USB device using ehci_hcd and address 9

You might ask what happens in practice?
- when plugged second, the mouse does not work at all (doesn't move the pointer)
- when plugged second, the audio DAC does show up in the sound card list in alsamixer, but when I select it, after 1 second alsamixer complains that it was unplugged.

Thanks
Benoit
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Friday, 27 August 2010, 14:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  2.6.35.4-1
2.5.32.21-1
Comment by Benoit Jacob (bjacob) - Sunday, 28 March 2010, 14:06 GMT
Oh, I forgot to give additional information about my system.

The USB devices in question are:
- audio DAC: Music Hall DAC 25.2
- mouse: see lsusb output above

Kernel: linux 2.6.33, here's the output of uname -a:

Linux kiwi 2.6.33-ARCH #1 SMP PREEMPT Sat Feb 27 13:28:30 CET 2010 x86_64 Intel(R) Core(TM) i7 CPU Q 720 @ 1.60GHz GenuineIntel GNU/Linux

Possibly relevant installed packages:

core/libusb 0.1.12-4
extra/libusb1 1.0.6-1
core/udev 151-3
extra/hal 0.5.14-2
extra/hal-info 0.20091130-1
Comment by Benoit Jacob (bjacob) - Sunday, 28 March 2010, 20:24 GMT
I just synced to [testing] today, the problem persists.

Here is the dmesg output:

usb 2-1.1: reset full speed USB device using ehci_hcd and address 4
usb 2-1.1: reset full speed USB device using ehci_hcd and address 4
usb 2-1.1: reset full speed USB device using ehci_hcd and address 4
cannot submit datapipe for urb 0, error -28: not enough bandwidth
cannot submit datapipe for urb 0, error -28: not enough bandwidth
cannot submit datapipe for urb 0, error -28: not enough bandwidth
cannot submit datapipe for urb 0, error -28: not enough bandwidth
cannot submit datapipe for urb 0, error -28: not enough bandwidth
cannot submit datapipe for urb 0, error -28: not enough bandwidth
cannot submit datapipe for urb 0, error -28: not enough bandwidth
cannot submit datapipe for urb 0, error -28: not enough bandwidth
Comment by Benoit Jacob (bjacob) - Sunday, 28 March 2010, 20:34 GMT
I tried several combinations of USB devices:
- same USB mouse together with USB hard drive: no problem
- same USB audio DAC together with USB hard drive: no problem

So the problem ONLY happens with this precise combination: USB mouse + USB audio DAC
Comment by Benoit Jacob (bjacob) - Monday, 29 March 2010, 13:30 GMT
Problem solved.
The problem was that Linux's default USB 2.0 scheduler is stupid.
The solution was to build a custom kernel with CONFIG_USB_EHCI_TT_NEWSCHED enabled.
Kernel team: would it make sense to turn this option on in the default config?
See: http://kernel.xc.net/html/linux-2.6.19/i386/USB_EHCI_TT_NEWSCHED
Comment by Benoit Jacob (bjacob) - Monday, 29 March 2010, 13:31 GMT
Note: leaving this open until you decide if you want to make this the default kernel config.
Comment by Benoit Jacob (bjacob) - Monday, 29 March 2010, 13:53 GMT Comment by Jan de Groot (JGC) - Monday, 23 August 2010, 10:21 GMT
  • Field changed: Category (Packages: Core → Kernel)
  • Field changed: Severity (Medium → High)
Please enable this option in the next kernel update. I closed 2 duplicates already and according to http://permalink.gmane.org/gmane.linux.usb.general/31978 this option should be enabled by every sane distribution.
Comment by Thomas Bächler (brain0) - Monday, 23 August 2010, 11:38 GMT
tpowa, this option seems safe to enable, IMO we should do it.

Loading...