apple's mighty mouse gets a lot of USB disconnects during MTP probing

Bug #559892 reported by Giuseppe Iannello
58
This bug affects 11 people
Affects Status Importance Assigned to Milestone
libmtp
Unknown
Unknown
libmtp (Ubuntu)
Fix Released
Low
Unassigned
Nominated for Lucid by Alessio Treglia

Bug Description

Binary package hint: rhythmbox

Ubuntu 10.4
Rhythmbox 0.12.8-0ubuntu1
when rhythmbox is running, plugging in a Mighty Mouse results in rhythmbox trying to "attach" it (maybe because of the usb VendorId). This leads to the mouse not working anymore.
I tried this on a laptop, touchpad worked without problems all the time.
After closing Rhythmbox, the mouse started acting like a mouse.

syslog was filled with this:
------------------
Apr 9 21:35:07 eddie kernel: [184572.032651] usb 5-2: new low speed USB device using uhci_hcd and address 106
Apr 9 21:35:07 eddie kernel: [184572.229121] usb 5-2: configuration #1 chosen from 1 choice
Apr 9 21:35:07 eddie kernel: [184572.246192] input: Mitsumi Electric Apple Optical USB Mouse as /devices/pci0000:00/0000:00:1d.0/usb5/5-2/5-2:1.0/input/input122
Apr 9 21:35:07 eddie kernel: [184572.246304] apple 0003:05AC:0304.0071: input,hidraw2: USB HID v1.10 Mouse [Mitsumi Electric Apple Optical USB Mouse] on usb-0000:00:1d.0-2/input0
Apr 9 21:35:27 eddie kernel: [184592.091953] usb 5-2: usbfs: USBDEVFS_CONTROL failed cmd rhythmbox rqt 128 rq 6 len 1024 ret -84
Apr 9 21:35:27 eddie kernel: [184592.115031] usb 5-2: usbfs: USBDEVFS_CONTROL failed cmd rhythmbox rqt 128 rq 6 len 255 ret -71
Apr 9 21:35:27 eddie kernel: [184592.118963] usb 5-2: usbfs: USBDEVFS_CONTROL failed cmd rhythmbox rqt 128 rq 6 len 1024 ret -71
Apr 9 21:35:27 eddie kernel: [184592.142904] usb 5-2: usbfs: USBDEVFS_CONTROL failed cmd rhythmbox rqt 128 rq 6 len 255 ret -71
Apr 9 21:35:27 eddie kernel: [184592.146957] usb 5-2: usbfs: USBDEVFS_CONTROL failed cmd rhythmbox rqt 128 rq 6 len 1024 ret -71
Apr 9 21:35:27 eddie kernel: [184592.360363] usb 5-2: USB disconnect, address 106
------------------------------

Reproducible: always, just attach a Mighty Mouse and start Rhythmbox

Related branches

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, it seems another case where the mtp option takes over devices on rhythmbox

Changed in rhythmbox (Ubuntu):
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you get a "udevadm info --exportdb" log there?

Revision history for this message
Giuseppe Iannello (giuseppe-iannello) wrote :

nope, I don't own that mouse

Revision history for this message
Giuseppe Iannello (giuseppe-iannello) wrote :

Just for referenct, if somebody else wants to provide such log, the right command is
udevadm info --export-db

Revision history for this message
Chris Snyder (csnyder) wrote :

I just experienced the same problem after upgrading to Lucid, but with a Kensington mouse. The mouse stopped working until I killed rhythmbox.

[ 213.820038] usb 4-2: new low speed USB device using uhci_hcd and address 26
[ 214.002066] usb 4-2: configuration #1 chosen from 1 choice
[ 214.018342] input: Kensington USB/PS2 Wheel Mouse as /devices/pci0000:00/0000:00:1a.1/usb4/4-2/4-2:1.0/input/input31
[ 214.018438] generic-usb 0003:047D:1029.001B: input,hidraw2: USB HID v1.10 Mouse [Kensington USB/PS2 Wheel Mouse] on usb-0000:00:1a.1-2/input0
[ 214.042558] usb 4-2: USB disconnect, address 26
[ 214.122753] usb 4-2: usbfs: USBDEVFS_CONTROL failed cmd rhythmbox rqt 128 rq 6 len 1024 ret -108

Revision history for this message
Chris Snyder (csnyder) wrote :

Disabling the MTP plugin in Rhythmbox fixes the problem. I don't have any MTP devices, so this is an acceptable work-around for me. I used gconf-editor to disable the plugin.

Revision history for this message
Martin Pitt (pitti) wrote :

With that mouse being plugged in, can you please copy&paste the output of "mtp-detect" (it's in the "mtp-tools" package, you have to install it).

Also, can you please start rhythmbox in debug mode, so that we can see what it's doing? For this, please run

  rhythmbox -D mtp > /tmp/rb.log 2>&1

Wait until Rhythmbox displays and settles down, then close it again and attach /tmp/rb.log here. Thank you!

Changed in rhythmbox (Ubuntu):
status: New → Incomplete
Revision history for this message
Chris Snyder (csnyder) wrote :

> mtp-detect

libmtp version: 1.0.2

Listing raw device(s)
   No raw devices found.

Revision history for this message
Chris Snyder (csnyder) wrote :

The USB ID for the mouse is 4-2.

Revision history for this message
Martin Pitt (pitti) wrote :

So, RB does not actually try to talk to it as a music player, but it seems the act of checking _whether_ it is an MTP player already distracts the mouse.

Can you please do the following: Close RB, detach the mouse, run

  udevadm monitor --udev -e

then attach the mouse and let the output settle. Copy&paste all output (you probably have to scroll up). Now detach it again, open Rhythmbox, press Enter some 10 times (so that you get enough free space in the Terminal to see where the new output starts), attach the mouse again. Let it settle, and copy&paste all the new output.

Finally, please attach /var/log/kern.log and /var/log/Xorg.0.log.

Thanks!

Revision history for this message
Chris Snyder (csnyder) wrote :
Revision history for this message
Chris Snyder (csnyder) wrote :
Revision history for this message
Chris Snyder (csnyder) wrote :
Revision history for this message
Chris Snyder (csnyder) wrote :
Martin Pitt (pitti)
summary: - rhythmbox tries to control apple's mighty mouse
+ apple's mighty mouse gets a lot of USB disconnects
Revision history for this message
Martin Pitt (pitti) wrote : Re: apple's mighty mouse gets a lot of USB disconnects

Ah, thanks for the logs. The kernel log shows that the mouse bounces a lot during this, there are tons of USB reconnects.

So it seems libmtp does something funky with the device that causes it to bounce.

Can you please start rhythmbox without the mouse attached, then open a Terminal and do

   strace -vvfs1024 -o /tmp/strace.txt -p `pidof rhythmbox`

then plug in the mouse, wait a little, then press Control-C. Please attach /tmp/strace.txt here. Thanks!

affects: rhythmbox (Ubuntu) → libmtp (Ubuntu)
summary: - apple's mighty mouse gets a lot of USB disconnects
+ apple's mighty mouse gets a lot of USB disconnects during MTP probing
Revision history for this message
JensOtto (jos-ideatore) wrote :

Same problem with a "RollerMouse Pro".
Attaching a no-name usb mouse as a second mouse works and I can use the application. The RollerMouse Pro works again after Rhythmbox is closed down.

Revision history for this message
Chris Snyder (csnyder) wrote :
Changed in libmtp (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
magicbourru (b-goujon) wrote :

Happens also with a BENQ optical mouse (M101 model).
Thanks a lot for the workaround. If you need any more details, do not hesitate!

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks a lot for the strace. This revealed something interesting which might point out the root cause:

15840 open("/dev/bus/usb/006/002", O_RDWR) = 42
15840 ioctl(42, USBDEVFS_CONTROL, 0x7fffd8f3b9e0) = 4
15840 ioctl(42, USBDEVFS_CONTROL, 0x7fffd8f3b9e0) = 4
15840 ioctl(42, USBDEVFS_CONTROL, 0x7fffd8f3bb00) = -1 EILSEQ (Invalid or incomplete multibyte or wide character)

Assuming that you attached the mouse to the same USB port as at the time when you supplied the udev and kernel logs, I believe that this is the mouse. Probing the next device then apparently causes the USB reset:

15840 close(42) = 0
15840 open("/dev/bus/usb/004/002", O_RDWR) = 42
15840 ioctl(42, USBDEVFS_CONTROL, 0x7fffd8f3b9e0) = 4
15840 ioctl(42, USBDEVFS_CONTROL, 0x7fffd8f3b9e0) = 4
15840 ioctl(42, USBDEVFS_CONTROL, 0x7fffd8f3b9e0) = 4
15840 ioctl(42, USBDEVFS_CONTROL, 0x7fffd8f3b9e0) = 4
15840 ioctl(42, USBDEVFS_CONTROL, 0x7fffd8f3bb00) = -1 EPIPE (Broken pipe)

at which point the kernel re-detects the devices, RB re-probes all USB devices, and the cycle starts again.

I'll forward this to upstream with a few thoughts.

Changed in libmtp (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libmtp - 1.0.3-1ubuntu1

---------------
libmtp (1.0.3-1ubuntu1) maverick; urgency=low

  * Merge with debian unstable (LP: #585802), Ubuntu remaining changes:
    - Install the apport package hook.

libmtp (1.0.3-1) unstable; urgency=low

  * debian/copyright: Update according to DEP-5 proposal.
  * Add apport package hook to reduce delta with Ubuntu.
  * New upstream release:
    - Don't probe HID equipment for device "OS descriptors"
      some Kensington mice really don't like that (LP: #559892).
  * Switch to debian 3.0 (quilt) source format.
 -- Alessio Treglia <email address hidden> Wed, 26 May 2010 14:01:48 +0200

Changed in libmtp (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Kom-Si (val.komissarov) wrote :

Apart from freezing my Apple Mighty Mouse now the Rhythmox window freezes itself (turns gray) and stays that way until I force close it. If it's any help I attach here output of the command listed above:

rhythmbox -D mtp > /tmp/rb.log 2>&1

NB this happens when Banshee player is running, i.e. playing music.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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