[PATCH] 3.5.0 regression: usbhid doesn't call report_fixup before comparing descriptors after resume

Bug #1049623 reported by Mike Williamson on 2012-09-12
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned

Bug Description

I have a Apple usb keyboard and a logitech usb mouse both plugged into my laptop. When I resume after suspending the system the usb keyboard works but the usb mouse does not. Unplugging the mouse and plugging it back in is required after every system suspend/resume.
I have only noticed this problem since the upgrade to quantal beta.
I have included whatever I thought might be helpful (lsusb and demsg output), but if more is needed please let me know and I will add it.

lsb_release -rd
Description: Ubuntu quantal (development branch)
Release: 12.10

Here is the output of lsusb:

Bus 001 Device 002: ID 05a9:2640 OmniVision Technologies, Inc. OV2640 Webcam
Bus 002 Device 003: ID 05ac:1006 Apple, Inc. Hub in Aluminum Keyboard
Bus 003 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 005 Device 005: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 05ac:0220 Apple, Inc. Aluminum Keyboard (ANSI)

And this is the output of dmesg. At the end you can see several lines generated from me unplugging/re-plugging the mouse to get it working again.

[20677.013684] sky2 0000:09:00.0: eth0: disabling interface
[20677.221566] wlan0: deauthenticating from 08:76:ff:4f:25:f8 by local choice (reason=3)
[20677.256246] cfg80211: All devices are disconnected, going to restore regulatory settings
[20677.256259] cfg80211: Restoring regulatory settings
[20677.256279] cfg80211: Calling CRDA to update world regulatory domain
[20677.270664] cfg80211: Ignoring regulatory request Set by core since the driver uses its own custom regulatory domain
[20677.270668] cfg80211: World regulatory domain updated:
[20677.270670] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[20677.270672] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[20677.270675] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[20677.270677] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[20677.270679] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[20677.270681] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[20678.390876] init: anacron main process (11742) killed by TERM signal
[20679.739867] PM: Syncing filesystems ... done.
[20679.755635] PM: Preparing system for mem sleep
[20679.755652] Freezing user space processes ... (elapsed 0.01 seconds) done.
[20679.772135] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[20679.788182] PM: Entering mem sleep
[20679.788195] Suspending console(s) (use no_console_suspend to debug)
[20679.789092] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[20679.790093] sd 0:0:0:0: [sda] Stopping disk
[20680.004035] PM: suspend of drv:snd_hda_intel dev:0000:00:1b.0 complete after 183.745 msecs
[20680.004050] PM: suspend of drv: dev:pci0000:00 complete after 183.587 msecs
[20680.004065] PM: suspend of devices complete after 215.528 msecs
[20680.004067] PM: suspend devices took 0.216 seconds
[20680.004350] PM: late suspend of devices complete after 0.280 msecs
[20680.211776] ehci_hcd 0000:00:1d.7: wake-up capability enabled by ACPI
[20680.226852] uhci_hcd 0000:00:1d.2: wake-up capability enabled by ACPI
[20680.229891] uhci_hcd 0000:00:1d.1: wake-up capability enabled by ACPI
[20680.232625] uhci_hcd 0000:00:1d.0: wake-up capability enabled by ACPI
[20680.235624] ehci_hcd 0000:00:1a.7: wake-up capability enabled by ACPI
[20680.251078] uhci_hcd 0000:00:1a.1: wake-up capability enabled by ACPI
[20680.253723] uhci_hcd 0000:00:1a.0: wake-up capability enabled by ACPI
[20680.254219] PM: noirq suspend of devices complete after 249.868 msecs
[20680.254611] ACPI: Preparing to enter system sleep state S3
[20680.261870] PM: Saving platform NVS memory
[20680.261872] Disabling non-boot CPUs ...
[20680.364022] CPU 1 is now offline
[20680.364547] Extended CMOS year: 2000
[20680.364547] ACPI: Low-level resume complete
[20680.364547] PM: Restoring platform NVS memory
[20680.364547] Extended CMOS year: 2000
[20680.364547] Enabling non-boot CPUs ...
[20680.364547] Booting Node 0 Processor 1 APIC 0x1
[20680.380078] CPU1 is up
[20680.381982] ACPI: Waking up from system sleep state S3
[20680.391627] uhci_hcd 0000:00:1a.0: wake-up capability disabled by ACPI
[20680.394164] uhci_hcd 0000:00:1a.1: wake-up capability disabled by ACPI
[20680.396066] ehci_hcd 0000:00:1a.7: wake-up capability disabled by ACPI
[20680.398742] uhci_hcd 0000:00:1d.0: wake-up capability disabled by ACPI
[20680.400561] uhci_hcd 0000:00:1d.1: wake-up capability disabled by ACPI
[20680.402646] uhci_hcd 0000:00:1d.2: wake-up capability disabled by ACPI
[20680.404811] ehci_hcd 0000:00:1d.7: wake-up capability disabled by ACPI
[20680.406226] firewire_ohci 0000:03:09.0: proprietary Ricoh MMC controller disabled (via firewire function)
[20680.406228] firewire_ohci 0000:03:09.0: MMC cards are now supported by standard SDHCI controller
[20680.407576] PM: noirq resume of devices complete after 18.878 msecs
[20680.408628] PM: early resume of devices complete after 1.002 msecs
[20680.410176] uhci_hcd 0000:00:1a.0: setting latency timer to 64
[20680.410205] usb usb3: root hub lost power or was reset
[20680.410375] uhci_hcd 0000:00:1a.1: setting latency timer to 64
[20680.410407] usb usb4: root hub lost power or was reset
[20680.410538] iwl4965 0000:0b:00.0: RF_KILL bit toggled to enable radio.
[20680.410540] ehci_hcd 0000:00:1a.7: setting latency timer to 64
[20680.410585] uhci_hcd 0000:00:1d.0: setting latency timer to 64
[20680.410615] usb usb5: root hub lost power or was reset
[20680.410644] uhci_hcd 0000:00:1d.1: setting latency timer to 64
[20680.410679] usb usb6: root hub lost power or was reset
[20680.410709] uhci_hcd 0000:00:1d.2: setting latency timer to 64
[20680.410755] usb usb7: root hub lost power or was reset
[20680.410801] ehci_hcd 0000:00:1d.7: setting latency timer to 64
[20680.410832] pci 0000:00:1e.0: setting latency timer to 64
[20680.410959] snd_hda_intel 0000:00:1b.0: irq 47 for MSI/MSI-X
[20680.411058] ata_piix 0000:00:1f.1: setting latency timer to 64
[20680.411073] ahci 0000:00:1f.2: setting latency timer to 64
[20680.411369] ata4.00: _GTF evaluation failed (AE 0x1001)
[20680.411531] ata5: port disabled--ignoring
[20680.648278] PM: resume of drv:hub dev:4-0:1.0 complete after 236.497 msecs
[20680.648286] PM: resume of drv: dev:ep_00 complete after 236.469 msecs
[20680.648291] PM: resume of drv:hub dev:6-0:1.0 complete after 236.326 msecs
[20680.648297] PM: resume of drv: dev:ep_00 complete after 236.179 msecs
[20680.648302] PM: resume of drv:hub dev:7-0:1.0 complete after 236.132 msecs
[20680.648308] PM: resume of drv: dev:ep_00 complete after 236.095 msecs
[20680.648313] PM: resume of drv: dev:ep_81 complete after 236.515 msecs
[20680.648318] PM: resume of drv: dev:ep_81 complete after 236.336 msecs
[20680.648323] PM: resume of drv: dev:ep_81 complete after 236.132 msecs
[20680.661224] PM: resume of drv: dev:ep_00 complete after 248.703 msecs
[20680.661260] PM: resume of drv:usb dev:2-3.2 complete after 248.596 msecs
[20680.661275] PM: resume of drv:hub dev:2-3:1.0 complete after 248.801 msecs
[20680.661286] PM: resume of drv: dev:ep_81 complete after 248.791 msecs
[20680.709065] PM: resume of drv:usbhid dev:2-3.2:1.1 complete after 296.337 msecs
[20680.709072] PM: resume of drv: dev:ep_82 complete after 296.323 msecs
[20680.709082] PM: resume of drv: dev:ep_00 complete after 296.315 msecs
[20680.709090] PM: resume of drv:usbhid dev:2-3.2:1.0 complete after 296.405 msecs
[20680.709100] PM: resume of drv: dev:ep_81 complete after 296.394 msecs
[20680.749329] PM: resume of drv: dev:ep_00 complete after 337.602 msecs
[20680.749371] PM: resume of drv:usb dev:3-2 complete after 336.832 msecs
[20680.749377] PM: resume of drv:hub dev:3-0:1.0 complete after 337.694 msecs
[20680.749387] PM: resume of drv: dev:ep_81 complete after 337.682 msecs
[20680.749423] PM: resume of drv: dev:ep_00 complete after 337.511 msecs
[20680.749436] PM: resume of drv:usb dev:5-2 complete after 336.648 msecs
[20680.749492] PM: resume of drv:hub dev:5-0:1.0 complete after 337.623 msecs
[20680.749505] PM: resume of drv: dev:ep_81 complete after 337.614 msecs
[20680.756159] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[20680.756263] ata3: SATA link down (SStatus 0 SControl 300)
[20680.768079] PM: resume of drv: dev:ep_00 complete after 356.481 msecs
[20680.768126] PM: resume of drv:usb dev:1-1 complete after 355.775 msecs
[20680.768143] PM: resume of drv:hub dev:1-0:1.0 complete after 356.558 msecs
[20680.768156] PM: resume of drv: dev:ep_81 complete after 356.565 msecs
[20680.772522] PM: resume of drv:scsi dev:host2 complete after 361.214 msecs
[20680.772554] PM: resume of drv:scsi_host dev:host2 complete after 361.206 msecs
[20680.825019] ata4.00: configured for UDMA/33
[20680.827972] PM: resume of drv:scsi dev:host3 complete after 416.428 msecs
[20680.827983] PM: resume of drv:scsi dev:target3:0:0 complete after 415.691 msecs
[20680.827993] PM: resume of drv:sr dev:3:0:0:0 complete after 415.682 msecs
[20680.828028] PM: resume of drv:scsi_device dev:3:0:0:0 complete after 415.696 msecs
[20680.828046] PM: resume of drv:scsi_host dev:host3 complete after 416.493 msecs
[20681.008052] usb 5-2: reset low-speed USB device number 4 using uhci_hcd
[20681.125199] ata1.00: configured for UDMA/133
[20681.128099] firewire_core 0000:03:09.0: rediscovered device fw0
[20681.140231] PM: resume of drv:ata_port dev:ata1 complete after 484.857 msecs
[20681.147816] PM: resume of drv:scsi dev:host0 complete after 736.751 msecs
[20681.147827] PM: resume of drv:scsi dev:target0:0:0 complete after 735.599 msecs
[20681.147835] PM: resume of drv:sd dev:0:0:0:0 complete after 735.586 msecs
[20681.147838] sd 0:0:0:0: [sda] Starting disk
[20681.147851] PM: resume of drv:scsi_host dev:host0 complete after 736.719 msecs
[20681.148062] PM: resume of drv:scsi_device dev:0:0:0:0 complete after 735.791 msecs
[20681.355475] usbhid 5-2:1.1: reset_resume error 1
[20681.355490] PM: resume of drv:usbhid dev:5-2:1.1 complete after 942.640 msecs
[20681.355498] PM: resume of drv: dev:ep_82 complete after 942.630 msecs
[20681.355509] PM: resume of drv: dev:ep_00 complete after 942.620 msecs
[20681.355521] PM: resume of drv:usbhid dev:5-2:1.0 complete after 942.715 msecs
[20681.355534] PM: resume of drv: dev:ep_81 complete after 942.703 msecs
[20681.408077] usb 3-2: reset full-speed USB device number 2 using uhci_hcd
[20681.613109] PM: resume of drv: dev:ep_00 complete after 1200.465 msecs
[20681.613116] PM: resume of drv:usb dev:3-2:1.0 complete after 1200.553 msecs
[20681.613132] PM: resume of drv: dev:ep_02 complete after 1200.529 msecs
[20681.613135] PM: resume of drv: dev:ep_81 complete after 1200.551 msecs
[20681.613140] PM: resume of drv: dev:ep_83 complete after 1200.515 msecs
[20681.712091] usb 1-1: reset high-speed USB device number 2 using ehci_hcd
[20681.879932] PM: resume of drv: dev:ep_00 complete after 1467.495 msecs
[20681.879949] PM: resume of drv:uvcvideo dev:1-1:1.1 complete after 1467.534 msecs
[20681.879953] PM: resume of drv:uvcvideo dev:1-1:1.0 complete after 1467.577 msecs
[20681.879983] PM: resume of drv: dev:ep_83 complete after 1467.589 msecs
[20681.879986] PM: resume of drv:video4linux dev:video0 complete after 333.435 msecs
[20681.880237] PM: resume of devices complete after 1471.606 msecs
[20681.880468] PM: resume devices took 1.472 seconds
[20681.880541] PM: Finishing wakeup.
[20681.880542] Restarting tasks ... done.
[20681.917522] video LNXVIDEO:00: Restoring backlight state
[20682.252540] sky2 0000:09:00.0: eth0: enabling interface
[20682.253483] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[20682.512685] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[20686.121616] wlan0: authenticate with 08:76:ff:4f:25:f8
[20686.133054] wlan0: send auth to 08:76:ff:4f:25:f8 (try 1/3)
[20686.135144] wlan0: authenticated
[20686.139976] wlan0: associating with AP with corrupt beacon
[20686.140060] wlan0: associate with 08:76:ff:4f:25:f8 (try 1/3)
[20686.148779] wlan0: RX AssocResp from 08:76:ff:4f:25:f8 (capab=0x411 status=0 aid=1)
[20686.181711] wlan0: associated
[20686.182373] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[20728.736260] usb 5-2: USB disconnect, device number 4
[20731.584196] usb 5-2: new low-speed USB device number 5 using uhci_hcd
[20731.761349] usb 5-2: New USB device found, idVendor=046d, idProduct=c517
[20731.761361] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[20731.761368] usb 5-2: Product: USB Receiver
[20731.761374] usb 5-2: Manufacturer: Logitech
[20731.779134] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb5/5-2/5-2:1.0/input/input17
[20731.779441] logitech 0003:046D:C517.0009: input,hidraw0: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:1d.0-2/input0
[20731.810509] logitech 0003:046D:C517.000A: fixing up Logitech keyboard report descriptor
[20731.812782] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb5/5-2/5-2:1.1/input/input18
[20731.813184] logitech 0003:046D:C517.000A: input,hiddev0,hidraw1: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:1d.0-2/input1

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1049623/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Kevin Daughtridge (kdau) wrote :
Download full text (8.6 KiB)

This begain affecting me as well upon upgrade to Quantal beta today. I have the same model Logitech USB receiver (mouse+keyboard) connected (see lsusb). Unplugging and replugging also worked for me.

The relevant error message appears to be "reset_resume error -1", which is starred in the filtered dmesg output below (two instances for two separate resumes). Given that this is a power management method implemented by USB drivers, I'm assigning the bug to linux-image-3.5.0-14-generic. I'm also including detailed lsusb output for the receiver and its hub.

> lsusb
Bus 005 Device 003: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

> dmesg|egrep -e 'usb(hid)? ?5' -e 'usb.*dev:5'
[ 0.248595] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
[ 0.248596] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.248598] usb usb5: Product: UHCI Host Controller
[ 0.248599] usb usb5: Manufacturer: Linux 3.5.0-14-generic uhci_hcd
[ 0.248601] usb usb5: SerialNumber: 0000:00:1a.2
[ 0.856081] usb 5-1: new low-speed USB device number 2 using uhci_hcd
[ 1.041606] usb 5-1: New USB device found, idVendor=046d, idProduct=c517
[ 1.041609] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1.041612] usb 5-1: Product: USB Receiver
[ 1.041614] usb 5-1: Manufacturer: Logitech
[ 15.052666] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.2/usb5/5-1/5-1:1.0/input/input2
[ 15.062527] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.2/usb5/5-1/5-1:1.1/input/input3
[ 101.376859] usb usb5: root hub lost power or was reset
[ 101.600027] PM: resume of drv:usb dev:5-1 complete after 221.071 msecs
[ 101.860018] usb 5-1: reset low-speed USB device number 2 using uhci_hcd
**[ 102.207775] usbhid 5-1:1.1: reset_resume error 1
[ 102.207782] PM: resume of drv:usbhid dev:5-1:1.0 complete after 828.816 msecs
[ 102.207788] PM: resume of drv:usbhid dev:5-1:1.1 complete after 828.799 msecs
[ 2424.080764] usb usb5: root hub lost power or was reset
[ 2424.304027] PM: resume of drv:usb dev:5-1 complete after 221.070 msecs
[ 2424.564018] usb 5-1: reset low-speed USB device number 2 using uhci_hcd
**[ 2424.911780] usbhid 5-1:1.1: reset_resume error 1
[ 2424.911787] PM: resume of drv:usbhid dev:5-1:1.0 complete after 828.819 msecs
[ 2424.911793] PM: resume of drv:usbhid dev:5-1:1.1 complete after 828.802 msecs
[ 2727.656033] usb 5-1: USB disconnect, device number 2
[ 2730.552013] usb 5-1: new low-speed USB device number 3 using uhci_hcd
[ 2730.785031] usb 5-1: New USB device found, idVendor=046d, idProduct=c517
[ 2730.785034] usb 5-1: New USB device strings: Mfr=1, Product=2, Seria...

Read more...

affects: ubuntu → linux (Ubuntu)
Kevin Daughtridge (kdau) wrote :

Sorry, make that "reset_resume error 1" (+1, not -1). After reviewing the HID/USBHID kernel code, it seems that reset_resume is a special method called only on quirky USB devices. The method isn't defined in the hid_logitech driver, and indeed our receiver (ID 046d:c517) isn't listed for USB_QUIRK_RESET_RESUME in drivers/usb/core/quirks.c. I'm not sure how it's getting designated as such.

Instead we're getting the "1" from hid_post_reset, either because it couldn't read the report descriptor or because that had changed. I note that the hid_logitech driver has a routine for "fixing up" report descriptors for keyboards. According to the dmesg output (both mine and OP's), this is being done after initial boot and unplug/replug, but not after resume. That may be leading to the changed descriptor that would give "reset_resume error 1". Strange, though, that the keyboard descriptor would be at issue and it's the mouse, instead, that freezes.

I'm not sure if the receiver needs to be taken off the quirky list somehow or if a reset_resume method needs to be written for it. The only change to the hid_logitech driver between 3.2.0 and 3.5.0 was to adjust the way it stores its own quirks list (not related to the above), which does control whether or not the "fixing up" occurs. Based on my old kernel logs, though, the "fixing up" was happening for me on a 3.2 kernel as well without any issue.

Kevin Daughtridge (kdau) wrote :

Found it! The code that complains about changes to the contents (instead of size) of HID report descriptors was added to hid_post_reset in drivers/hid/usbhid/hid-core.c on 2012-04-03. See: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=dc3c78e43469063c5bf4b744214508f94c4129f9

The issue is definitely a discrepancy between the descriptor as fixed up by the hid_logitech driver and the descriptor as read after resume by the usbhid driver. The latter reads the descriptor directly off the bus, so it doesn't include any report_fixup changes. report_fixup is a standard method used by many other HID drivers, though, and I'd say the patch above potentially created this regression for all drivers that have report_fixup. The check in hid_post_reset needs to call report_fixup on its local rdesc copy before comparing it to the one in the existing hid_device.

Kevin Daughtridge (kdau) wrote :

I've edited hid_post_reset to behave as I suggested above and tested with my modified usbhid.ko. This fixes the problem for me; after resume, the mouse responds normally. New dmesg output below. Patch attached.

> dmesg|egrep -e 'usb(hid)? ?5' -e 'usb.*dev:5'
[ 0.252595] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
[ 0.252596] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.252598] usb usb5: Product: UHCI Host Controller
[ 0.252599] usb usb5: Manufacturer: Linux 3.5.0-14-generic uhci_hcd
[ 0.252601] usb usb5: SerialNumber: 0000:00:1a.2
[ 0.870586] usb 5-1: new low-speed USB device number 2 using uhci_hcd
[ 1.049605] usb 5-1: New USB device found, idVendor=046d, idProduct=c517
[ 1.049608] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1.049611] usb 5-1: Product: USB Receiver
[ 1.049613] usb 5-1: Manufacturer: Logitech
[ 15.291430] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.2/usb5/5-1/5-1:1.0/input/input10
[ 15.292733] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.2/usb5/5-1/5-1:1.1/input/input11
[ 110.520777] usb usb5: root hub lost power or was reset
[ 110.744034] PM: resume of drv:usb dev:5-1 complete after 221.048 msecs
[ 111.004034] usb 5-1: reset low-speed USB device number 2 using uhci_hcd
[ 111.354225] PM: resume of drv:usbhid dev:5-1:1.0 complete after 831.226 msecs
[ 111.354230] PM: resume of drv:usbhid dev:5-1:1.1 complete after 831.208 msecs

summary: - Usb mouse not working after resume
+ [PATCH] 3.5.0 regression: usbhid doesn't call report_fixup before
+ comparing descriptors after resume
tags: added: patch
Joseph Salisbury (jsalisbury) wrote :

Thanks for finding that patch, Kevin. I'll build a test kernel with it applied and post a link to this bug.

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: quantal regression-release
Joseph Salisbury (jsalisbury) wrote :

There have been some additional changes in HID: usbhid in the latest mainline kernel. Would it be possible for you to test the latest mainline kernel[0] to confirm this bug isn't already resolved?

Thanks in advance!

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/

Joseph Salisbury (jsalisbury) wrote :

The specific kernel to test would be v3.6-rc5:

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.6-rc5-quantal/

Kevin Daughtridge (kdau) wrote :

I suspended and resumed on 3.6-rc5, and the mouse still freezes. Same error message as well (starred below).

> dmesg|egrep -e Linux.version -e 'usb(hid)? ?5' -e 'usb.*dev:5'
[ 0.000000] Linux version 3.6.0-030600rc5-generic (apw@gomeisa) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #201209082035 SMP Sun Sep 9 00:36:02 UTC 2012
[ 0.316604] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
[ 0.316606] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.316607] usb usb5: Product: UHCI Host Controller
[ 0.316609] usb usb5: Manufacturer: Linux 3.6.0-030600rc5-generic uhci_hcd
[ 0.316611] usb usb5: SerialNumber: 0000:00:1a.2
[ 0.924020] usb 5-1: new low-speed USB device number 2 using uhci_hcd
[ 1.101613] usb 5-1: New USB device found, idVendor=046d, idProduct=c517
[ 1.101617] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1.101619] usb 5-1: Product: USB Receiver
[ 1.101621] usb 5-1: Manufacturer: Logitech
[ 7.239479] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.2/usb5/5-1/5-1:1.0/input/input2
[ 7.240261] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.2/usb5/5-1/5-1:1.1/input/input3
[ 90.144434] usb usb5: root hub lost power or was reset
[ 90.628019] usb 5-1: reset low-speed USB device number 2 using uhci_hcd
**[ 90.975461] usbhid 5-1:1.1: reset_resume error 1
[ 106.048038] usb 5-1: USB disconnect, device number 2
[ 109.100013] usb 5-1: new low-speed USB device number 3 using uhci_hcd
[ 109.277025] usb 5-1: New USB device found, idVendor=046d, idProduct=c517
[ 109.277029] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 109.277032] usb 5-1: Product: USB Receiver
[ 109.277035] usb 5-1: Manufacturer: Logitech
[ 109.294290] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.2/usb5/5-1/5-1:1.0/input/input12
[ 109.325621] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.2/usb5/5-1/5-1:1.1/input/input13

Joseph Salisbury (jsalisbury) wrote :

@Keven,

Would it be possible for you to send your patch upstream for review?

People affected by this bug are probably wondering why the kernel team doesn't just apply the patch and fix it. The reason is that the kernel team is reluctant (not opposed) to apply any patch to a stable kernel that is not from upstream. Applying patches that don't come from upstream add greatly to the support of the kernel as other upstream patches may touch the same area as the non-upstream patch and may prevent them from applying cleanly.

To submit your patch, send your patch with the detailed description/changelog and your Signoff (ending with Signed-off-by: your name <email>), to the emails listed from ./scripts/get_maintainer.pl drivers/hid/usbhid/hid-core.c (the get_maintainer.pl is from the kernel sources). Once you have sent the patch upstream and it's accepted, please drop a note here so that we can cherry-pick/include the patch into Ubuntu kernel.

Changed in linux (Ubuntu):
status: Confirmed → Triaged
tags: added: kernel-da-key
Kevin Daughtridge (kdau) wrote :

I've sent the patch upstream. I'll advise of progress.

Joseph Salisbury (jsalisbury) wrote :

Thanks, Kevin.

Kevin Daughtridge (kdau) wrote :

Hi all. A revised version of the patch has been accepted upstream (3.5 and 3.6) as commit 86e6b77eb7cf9ca2e9c7092b4dfd588f0a3307b6. I'm attaching the final patch for 3.6-stable.

I've had the same issue with a logitech mouse as well. Kernels as of 3.6.1 from http://kernel.ubuntu.com/~kernel-ppa/mainline/ fix the issue for me (Kevin's patch was included as of 3.6.1). Thank you for all your effort!

I'll downgrade back to 3.5 if/when this patch gets back-ported to the main Quantal kernel.

Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel for Quantal in -proposed solves the problem (3.5.0-18.29). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-quantal' to 'verification-done-quantal'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-quantal
Kevin Daughtridge (kdau) wrote :

3.5.0-18.29 is working for me. No error logged and no mouse freeze after resume.

tags: added: verification-done-quantal
removed: verification-needed-quantal

Removed Kernel 3.6.1, confirmed mouse still froze after resume on 3.5.0-17.28. Installed 3.5.0-18.29 from Proposed, mouse no longer freezes on resume.

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :
Download full text (16.4 KiB)

This bug was fixed in the package linux - 3.5.0-18.29

---------------
linux (3.5.0-18.29) quantal-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1068224

  [ Andy Whitcroft ]

  * [packaging] do not fail secure copy on older kernels
  * SAUCE: efivarfs: efivarfs_file_read ensure we free data in error paths
    - LP: #1063061
  * SAUCE: efivars: efivarfs_create() ensure we drop our reference on inode
    on error
    - LP: #1063061
  * SAUCE: efivarfs: efivarfs_fill_super() fix inode reference counts
    - LP: #1063061
  * SAUCE: efivarfs: efivarfs_fill_super() ensure we free our temporary
    name
    - LP: #1063061
  * SAUCE: efivarfs: efivarfs_fill_super() ensure we clean up correctly on
    error
    - LP: #1063061
  * [Config] add fs/udf to linux-image to support DVD/CD formats in virtual
    instances
    - LP: #1066921

  [ Jeremy Kerr ]

  * SAUCE: efi: Handle deletions and size changes in efivarfs_write_file
    - LP: #1063061
  * SAUCE: efivarfs: Implement exclusive access for {get, set}_variable
    - LP: #1063061

  [ Kamal Mostafa ]

  * SAUCE: input: Cypress PS/2 Trackpad list additional contributors

  [ Kyle Fazzari ]

  * SAUCE: input: Cypress PS/2 Trackpad fix lost sync upon palm contact
    - LP: #1048258
  * SAUCE: input: Cypress PS/2 Trackpad fix taps turning into hardware
    clicks
    - LP: #1064086

  [ Leann Ogasawara ]

  * Revert "SAUCE: ext4: fix crash when accessing /proc/mounts
    concurrently"
    - LP: #1066176
  * Revert "SAUCE: ALSA: hda/realtek - Fix detection of ALC271X codec"
    - LP: #1066176

  [ Lee, Chun-Yi ]

  * SAUCE: efi: add efivars kobject to efi sysfs folder
    - LP: #1063061

  [ Matt Fleming ]

  * SAUCE: efivarfs: Add documentation for the EFI variable filesystem
    - LP: #1063061

  [ Matthew Garrett ]

  * SAUCE: efi: Add support for a UEFI variable filesystem
    - LP: #1063061

  [ Sarveshwar Bandi ]

  * SAUCE: bridge: Pull ip header into skb->data before looking into ip
    header.
    - LP: #1065150

  [ Upstream Kernel Changes ]

  * Revert "drm/i915: correctly order the ring init sequence"
    - LP: #1066176
  * vfs: dcache: fix deadlock in tree traversal
    - LP: #1063761
  * dm mpath: only retry ioctl when no paths if queue_if_no_path set
    - LP: #1063761
  * dm: handle requests beyond end of device instead of using BUG_ON
    - LP: #1063761
  * dm table: clear add_random unless all devices have it set
    - LP: #1063761
  * dm verity: fix overflow check
    - LP: #1063761
  * usb: gadget: make g_printer enumerate again
    - LP: #1063761
  * usb: gadget: initialize the strings in tcm_usb_gadget properly
    - LP: #1063761
  * USB: option: blacklist QMI interface on ZTE MF683
    - LP: #1063761
  * USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support
    - LP: #1063761
  * USB: qcaux: add Pantech vendor class match
    - LP: #1063761
  * usb: host: xhci: Fix Null pointer dereferencing with 71c731a for
    non-x86 systems
    - LP: #1063761
  * USB: serial: fix up bug with missing {}
    - LP: #1063761
  * staging: speakup_soft: Fix reading of init string
    - LP: #1063761
  * tty: keyboard.c: Remove locking from vt_get_leds.
  ...

Changed in linux (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers