You are not logged in.

#1 2014-11-04 14:00:29

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

USB detection fails after some resumes

Hello,

since recently, USB detection of connected devices fails after some resumes. lsusb shows only the internal devices, but nothing attached to the USB-ports:

lsusb
Bus 003 Device 002: ID 8087:8000 Intel Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 0b97:7772 O2 Micro, Inc. OZ776 CCID Smartcard Reader
Bus 001 Device 006: ID 0b97:7761 O2 Micro, Inc. Oz776 1.1 Hub
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

no matter what is pluged in or not.

dmesg | grep usb
....
[  441.675668] usb 1-1: USB disconnect, device number 2
[  441.675675] usb 1-1.3: USB disconnect, device number 4
[  441.703257] usb 1-1.4: USB disconnect, device number 5
[  448.578205] usb 1-6: reset high-speed USB device number 3 using xhci_hcd
[  448.578224] usb 1-6: hub failed to enable device, error -22
[  448.738324] usb 1-6: reset high-speed USB device number 3 using xhci_hcd
[  448.738342] usb 1-6: hub failed to enable device, error -22
[  448.898359] usb 1-6: reset high-speed USB device number 3 using xhci_hcd
[  449.185621] usb 1-6.3: reset full-speed USB device number 6 using xhci_hcd
[  449.185639] usb 1-6.3: hub failed to enable device, error -22
[  449.252153] usb 1-6.3: reset full-speed USB device number 6 using xhci_hcd
[  449.252175] usb 1-6.3: hub failed to enable device, error -22
[  449.318788] usb 1-6.3: reset full-speed USB device number 6 using xhci_hcd
[  449.332358] usb 1-6.3: ep 0x81 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[  449.605705] usb 1-6.3.2: reset full-speed USB device number 7 using xhci_hcd
[  449.605733] usb 1-6.3.2: hub failed to enable device, error -22
[  449.672239] usb 1-6.3.2: reset full-speed USB device number 7 using xhci_hcd
[  449.672281] usb 1-6.3.2: hub failed to enable device, error -22
[  449.739006] usb 1-6.3.2: reset full-speed USB device number 7 using xhci_hcd
[  449.752638] usb 1-6.3.2: ep 0x81 - rounding interval to 1024 microframes, ep desc says 2040 microframes

a bit context:

dmesg
....
[  448.221806] ACPI: Waking up from system sleep state S3
....
[  448.578205] usb 1-6: reset high-speed USB device number 3 using xhci_hcd
[  448.578222] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 2.
[  448.578224] usb 1-6: hub failed to enable device, error -22
...
[  448.738324] usb 1-6: reset high-speed USB device number 3 using xhci_hcd
[  448.738340] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 2.
[  448.738342] usb 1-6: hub failed to enable device, error -22

the strange thing is: these messages also appear after a successful resume:

dmesg
....
[  164.067394] usb 2-6.3.2: reset full-speed USB device number 4 using xhci_hcd
[  164.067408] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 3.
[  164.067410] usb 2-6.3.2: hub failed to enable device, error -22
[  164.133889] usb 2-6.3.2: reset full-speed USB device number 4 using xhci_hcd
[  164.133903] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 3.
[  164.133905] usb 2-6.3.2: hub failed to enable device, error -22
....

leads to

lsusb
Bus 001 Device 002: ID 8087:8000 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 004: ID 0b97:7772 O2 Micro, Inc. OZ776 CCID Smartcard Reader
Bus 002 Device 003: ID 0b97:7761 O2 Micro, Inc. Oz776 1.1 Hub
Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 002 Device 028: ID 0d48:0004 Promethean Limited ACTIVboard
Bus 002 Device 027: ID 0d48:0100 Promethean Limited Audio
Bus 002 Device 026: ID 05e3:0607 Genesys Logic, Inc. Logitech G110 Hub
Bus 002 Device 025: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

which is good and working.

Any idea how to fix this / workarounds to get USB working again apart from reboot?
thanks.

Last edited by Carl Karl (2014-11-04 14:09:01)

Offline

#2 2014-11-04 14:20:56

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: USB detection fails after some resumes

Try linux-lts, this is probably a kernel bug.

Offline

#3 2014-11-04 17:01:56

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: USB detection fails after some resumes

Thanks, I also thought about that.
But the disadvantage is, that my hardware is only fully supported since Linux 3.17.

So meanwhile, I have another suspicion:
Maybe I did:
Suspend --> unplug --> resume --> replug
?

Since that suspicion, I only did
unplug --> suspend --> resume --> replug

and that problem didn't occur since then....
...but that isn't a strong evidence regarding a only sometimes occurring problem. So I have to test a bit longer....

Offline

#4 2014-11-05 08:46:16

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: USB detection fails after some resumes

OK, it happened again even though
unplug --> suspend --> resume --> replug

As I said, i'd like to avoid using Linux < 3.17 because of my hardware.

Does anyone know a way to "reset" USB?
To avoid reboots in this case?

Offline

#5 2014-11-05 09:45:56

raggerv8
Member
From: Sweden
Registered: 2010-07-01
Posts: 113
Website

Re: USB detection fails after some resumes

Hey, I seem to have the same or similar issue, I posted about it here https://bbs.archlinux.org/viewtopic.php … 1#p1472161 but I'll post it in here too:

raggerv8 wrote:

Same here, but it works when I connect a USB 3.0 combatible drive.

dmesg when I use the USB 2.0 stick:

[Nov 3 15:45] usb 3-1: new high-speed USB device number 111 using xhci_hcd
[  +0.166266] usb-storage 3-1:1.0: USB Mass Storage device detected
[  +0.000050] scsi8 : usb-storage 3-1:1.0
[  +1.154893] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.000011] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 30.
[  +0.000002] usb 3-1: hub failed to enable device, error -22
[  +0.152817] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.000061] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 30.
[  +0.000003] usb 3-1: hub failed to enable device, error -22
[  +0.152937] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.011906] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8801400d4288
[  +0.000003] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8801400d4240
[  +0.159249] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.000012] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 30.
[  +0.000003] usb 3-1: hub failed to enable device, error -22
[  +0.152880] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.000022] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 30.
[  +0.000006] usb 3-1: hub failed to enable device, error -22
[  +0.152929] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.011625] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8801400d4288
[  +0.000003] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8801400d4240
[  +0.158529] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.000012] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 30.
[  +0.000003] usb 3-1: hub failed to enable device, error -22
[  +0.152878] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.000013] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 30.
[  +0.000003] usb 3-1: hub failed to enable device, error -22
[  +0.152946] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.011844] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8801400d4288
[  +0.000003] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8801400d4240
[  +0.159307] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.000009] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 30.
[  +0.000002] usb 3-1: hub failed to enable device, error -22
[  +0.152912] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.000014] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 30.
[  +0.000003] usb 3-1: hub failed to enable device, error -22
[  +0.152958] usb 3-1: reset high-speed USB device number 111 using xhci_hcd
[  +0.011608] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8801400d4288
[  +0.000002] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8801400d4240

dmesg when I use the USB 3.0 drive:

[Nov 3 15:49] usb 4-1: new SuperSpeed USB device number 3 using xhci_hcd
[  +0.012629] usb-storage 4-1:1.0: USB Mass Storage device detected
[  +0.000115] scsi9 : usb-storage 4-1:1.0
[  +1.003510] scsi 9:0:0:0: Direct-Access     WD       My Passport 0740 1003 PQ: 0 ANSI: 6
[  +0.000171] scsi 9:0:0:1: Enclosure         WD       SES Device       1003 PQ: 0 ANSI: 6
[  +0.001546] ses 9:0:0:1: Attached Enclosure device
[  +7.043219] sd 9:0:0:0: [sdc] 1953458176 512-byte logical blocks: (1.00 TB/931 GiB)
[  +0.000496] sd 9:0:0:0: [sdc] Write Protect is off
[  +0.000003] sd 9:0:0:0: [sdc] Mode Sense: 47 00 10 08
[  +0.000355] sd 9:0:0:0: [sdc] No Caching mode page found
[  +0.000002] sd 9:0:0:0: [sdc] Assuming drive cache: write through
[  +0.054991]  sdc: sdc1
[  +0.000981] sd 9:0:0:0: [sdc] Attached SCSI disk

It's probably worth to note that I am connecting both these devices to my front panel, USD 3.0 ports. It might have to do with that... The USB 3.0 drive works in the USB 3.0 ports, but not the USB 2.0 stick...

This seems to be a similar issue too https://bbs.archlinux.org/viewtopic.php?pid=1472390

Last edited by raggerv8 (2014-11-05 09:51:22)


Brottweiler at #archlinux

Use IRC and Mumble for online communication!

Offline

#6 2014-11-12 13:28:29

nfnty
Member
Registered: 2013-08-09
Posts: 4

Re: USB detection fails after some resumes

I reported this issue on the bug tracker. Add your votes, logs and comments there!

https://bugs.archlinux.org/task/42681

Offline

#7 2014-11-14 12:54:29

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: USB detection fails after some resumes

For my luck, it didn't happen anymore.
What did I change?

1. Kernel options in /etc/default/grub from

GRUB_CMDLINE_LINUX_DEFAULT="quiet pcie_aspm=force acpi_osi=Linux acpi=force acpi_enforce_resources=lax i915.enable_rc6=1 i915.enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 drm.vblankoffdelay="

to just

GRUB_CMDLINE_LINUX_DEFAULT="quiet"

(and of course #grub-mkconfig -o /boot/grub/grub.cfg afterwards)
I red about these options as energy saving options for pentium processors.

2. Uninstalled powerdown

I don't know which or any of these was the cause, the important thing is, I have a reliable USB-connection again.

Offline

Board footer

Powered by FluxBB