You are not logged in.

#1 2021-11-04 17:03:04

OrakMoya
Member
Registered: 2019-09-22
Posts: 69

[Solved] xHCI host controller not responding after suspend/tlp

Heya,

I am using an Asus X509DA, and every time I suspend the laptop or turn on TLP all USB devices stop working until I reboot.
Running linux 5.14.16-arch1-1

Hopefully relevant dmesg output

[  179.103366] xhci_hcd 0000:03:00.4: xHCI host not responding to stop endpoint command.
[  179.103376] xhci_hcd 0000:03:00.4: USBSTS: HCHalted HSE
[  179.103399] xhci_hcd 0000:03:00.4: xHCI host controller not responding, assume dead
[  179.103423] xhci_hcd 0000:03:00.4: HC died; cleaning up
[  179.103473] usb 3-1: USB disconnect, device number 2
[  179.103990] xhci_hcd 0000:03:00.4: Timeout while waiting for stop endpoint command
[  179.103998] usb 3-2.2: Failed to suspend device, error -110
[  179.137629] usb 3-2: USB disconnect, device number 3
[  179.137639] usb 3-2.1: USB disconnect, device number 4
[  179.138452] usb 3-2.2: USB disconnect, device number 5

I found some kind of bind/unbind workaround on the arch forum from about 3 years ago, but it doesn't work at all.

Last edited by OrakMoya (2021-11-07 14:42:45)

Offline

#2 2021-11-04 17:16:30

Morta
Member
Registered: 2019-07-07
Posts: 655

Re: [Solved] xHCI host controller not responding after suspend/tlp

Go to the lts kernel. The newest kernel has a USB issue!

Offline

#3 2021-11-04 21:00:49

OrakMoya
Member
Registered: 2019-09-22
Posts: 69

Re: [Solved] xHCI host controller not responding after suspend/tlp

Morta wrote:

Go to the lts kernel. The newest kernel has a USB issue!

I still have the issue on kernel 5.10.76-1-lts

Offline

#4 2021-11-04 21:55:14

seth
Member
Registered: 2012-09-03
Posts: 51,275

Re: [Solved] xHCI host controller not responding after suspend/tlp

Please post the complete system journal for a boot covering this ("sudo journalctl -b -1" for the previous one) as well as the output of "lsusb -tv"  (before this happens)
Chances are that a single offender spoils the entire bus sad

Online

#5 2021-11-04 22:12:55

OrakMoya
Member
Registered: 2019-09-22
Posts: 69

Re: [Solved] xHCI host controller not responding after suspend/tlp

seth wrote:

Please post the complete system journal for a boot covering this ("sudo journalctl -b -1" for the previous one) as well as the output of "lsusb -tv"  (before this happens)
Chances are that a single offender spoils the entire bus sad

Journalctl log: https://pastebin.com/ny89WnYz
lsusb -tv before suspending

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M
        ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
    |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 05e3:0608 Genesys Logic, Inc. Hub
        |__ Port 1: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
            ID 13d3:3529 IMC Networks 
        |__ Port 1: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
            ID 13d3:3529 IMC Networks 
        |__ Port 2: Dev 5, If 0, Class=Video, Driver=uvcvideo, 480M
            ID 13d3:5a11 IMC Networks 
        |__ Port 2: Dev 5, If 1, Class=Video, Driver=uvcvideo, 480M
            ID 13d3:5a11 IMC Networks 
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 3: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        ID 03f0:a407 HP, Inc Wireless Optical Comfort Mouse
    |__ Port 3: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
        ID 03f0:a407 HP, Inc Wireless Optical Comfort Mouse

Offline

#6 2021-11-04 22:33:02

seth
Member
Registered: 2012-09-03
Posts: 51,275

Re: [Solved] xHCI host controller not responding after suspend/tlp

Smells like the Azurewave USB2.0 VGA UVC WebCam - can you try w/o it?

Online

#7 2021-11-04 22:37:30

OrakMoya
Member
Registered: 2019-09-22
Posts: 69

Re: [Solved] xHCI host controller not responding after suspend/tlp

seth wrote:

Smells like the Azurewave USB2.0 VGA UVC WebCam - can you try w/o it?

It's the built in camera on the laptop, kinda can't.

Offline

#8 2021-11-04 22:41:57

seth
Member
Registered: 2012-09-03
Posts: 51,275

Re: [Solved] xHCI host controller not responding after suspend/tlp

Can you deactivate it in the BIOS?

Online

#9 2021-11-04 23:03:06

OrakMoya
Member
Registered: 2019-09-22
Posts: 69

Re: [Solved] xHCI host controller not responding after suspend/tlp

seth wrote:

Can you deactivate it in the BIOS?

I can, didn't fix it. Also had the unfortunate side effect of turning off the bluetooth chip too.
journalctl: https://pastebin.com/EmswNmDc
lsusb:

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M
        ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 3: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        ID 03f0:a407 HP, Inc Wireless Optical Comfort Mouse
    |__ Port 3: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
        ID 03f0:a407 HP, Inc Wireless Optical Comfort Mouse

I should mention that this issue is not present in the archiso. Suspending with systemctl suspend and waking work just fine from a quick test.

Last edited by OrakMoya (2021-11-04 23:08:57)

Offline

#10 2021-11-05 06:40:55

seth
Member
Registered: 2012-09-03
Posts: 51,275

Re: [Solved] xHCI host controller not responding after suspend/tlp

Disable TLP, still an issue?
If not, try to re-enable the webcam.


Edit:

Nov 04 23:55:48 archTop kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Nov 04 23:55:48 archTop kernel: task:kworker/3:0     state:D stack:    0 pid:   33 ppid:     2 flags:0x00004000
Nov 04 23:55:48 archTop kernel: Workqueue: pm pm_runtime_work
Nov 04 23:55:48 archTop kernel: Call Trace:
Nov 04 23:55:48 archTop kernel:  __schedule+0x295/0x7f0
Nov 04 23:55:48 archTop kernel:  ? usleep_range+0x90/0x90
Nov 04 23:55:48 archTop kernel:  schedule+0x46/0xb0
Nov 04 23:55:48 archTop kernel:  schedule_timeout+0x103/0x140
Nov 04 23:55:48 archTop kernel:  __wait_for_common+0xc4/0x170
Nov 04 23:55:48 archTop kernel:  xhci_stop_device.constprop.0.isra.0+0x174/0x1e0
Nov 04 23:55:48 archTop kernel:  xhci_hub_control+0x1731/0x2200
Nov 04 23:55:48 archTop kernel:  ? __switch_to_asm+0x42/0x70
Nov 04 23:55:48 archTop kernel:  ? __switch_to+0x11b/0x470
Nov 04 23:55:48 archTop kernel:  ? usb_hcd_submit_urb+0x1aa/0xc00
Nov 04 23:55:48 archTop kernel:  usb_hcd_submit_urb+0x415/0xc00
Nov 04 23:55:48 archTop kernel:  ? __next_timer_interrupt+0x100/0x100
Nov 04 23:55:48 archTop kernel:  ? usb_start_wait_urb+0xc7/0x190
Nov 04 23:55:48 archTop kernel:  ? kfree+0xc3/0x470
Nov 04 23:55:48 archTop kernel:  usb_start_wait_urb+0x8a/0x190
Nov 04 23:55:48 archTop kernel:  usb_control_msg+0xe9/0x150
Nov 04 23:55:48 archTop kernel:  usb_port_suspend+0x1f3/0x3a0
Nov 04 23:55:48 archTop kernel:  usb_generic_driver_suspend+0x28/0x40
Nov 04 23:55:48 archTop kernel:  usb_suspend_both+0x19e/0x230
Nov 04 23:55:48 archTop kernel:  usb_runtime_suspend+0x2b/0x70
Nov 04 23:55:48 archTop kernel:  ? usb_autoresume_device+0x50/0x50
Nov 04 23:55:48 archTop kernel:  ? usb_autoresume_device+0x50/0x50
Nov 04 23:55:48 archTop kernel:  __rpm_callback+0x81/0x140
Nov 04 23:55:48 archTop kernel:  ? usb_autoresume_device+0x50/0x50
Nov 04 23:55:48 archTop kernel:  rpm_callback+0x1f/0x70
Nov 04 23:55:48 archTop kernel:  ? usb_autoresume_device+0x50/0x50
Nov 04 23:55:48 archTop kernel:  rpm_suspend+0x174/0x720
Nov 04 23:55:48 archTop kernel:  pm_runtime_work+0x8e/0x90
Nov 04 23:55:48 archTop kernel:  process_one_work+0x1b6/0x350
Nov 04 23:55:48 archTop kernel:  worker_thread+0x53/0x3e0
Nov 04 23:55:48 archTop kernel:  ? process_one_work+0x350/0x350
Nov 04 23:55:48 archTop kernel:  kthread+0x11b/0x140
Nov 04 23:55:48 archTop kernel:  ? kthread_associate_blkcg+0xa0/0xa0
Nov 04 23:55:48 archTop kernel:  ret_from_fork+0x22/0x30

Also

Nov 04 23:51:46 archTop kernel: random: tlp-readconfs: uninitialized urandom read (4 bytes read)
…
Nov 04 23:51:47 archTop kernel: random: crng init done
Nov 04 23:51:47 archTop kernel: random: 7 urandom warning(s) missed due to ratelimiting

crng is late, not sure whether it's related, but see https://wiki.debian.org/BoottimeEntropyStarvation and https://wiki.archlinux.org/title/Haveged

Last edited by seth (2021-11-05 06:44:29)

Online

#11 2021-11-05 13:26:32

OrakMoya
Member
Registered: 2019-09-22
Posts: 69

Re: [Solved] xHCI host controller not responding after suspend/tlp

TLP was disabled the entire time. But the problem was somewhat fixed after enabling the webcam again. USB devices no longer died on suspend, but on plugging out AC power.

I tried installing and enabling Haveged, but it reported "start condition not met" or something similar. After enabling TLP and rebooting, I found in systemctl logs that something sent a SIGTERM signal to TLP and auto-cpufreq on boot, causing both to be off despite being enabled.

After this I gave up and nuked my OS subvolume. New install so far doesn't have the issue on latest stable kernel, but USB devices still die with a different error when starting TLP.

Nov 05 14:18:29 archyToppy systemd[1]: Starting TLP system startup/shutdown...
Nov 05 14:18:29 archyToppy kernel: xhci_hcd 0000:03:00.3: WARNING: Host System Error
...
Nov 05 14:18:31 archyToppy kernel: usb 2-2: device not accepting address 2, error -108
...
Nov 05 14:18:34 archyToppy kernel: usb 2-2: USB disconnect, device number 2
Nov 05 14:18:34 archyToppy udisksd[1129]: Cleaning up mount point /run/media/orakmoya/ARCH_202111 (device 8:1 no longer exists)
Nov 05 14:18:34 archyToppy systemd[1]: run-media-orakmoya-ARCH_202111.mount: Deactivated successfully.
Nov 05 14:18:34 archyToppy kernel: usb usb2-port2: couldn't allocate usb_device

Offline

#12 2021-11-05 14:45:12

seth
Member
Registered: 2012-09-03
Posts: 51,275

Re: [Solved] xHCI host controller not responding after suspend/tlp

Online

#13 2021-11-05 17:42:02

OrakMoya
Member
Registered: 2019-09-22
Posts: 69

Re: [Solved] xHCI host controller not responding after suspend/tlp

It is, sadly, already off. It's one of the first things I tried when I tried to fix this problem.

Offline

#14 2021-11-05 21:45:25

seth
Member
Registered: 2012-09-03
Posts: 51,275

Re: [Solved] xHCI host controller not responding after suspend/tlp

Next level would be ASPM, disable it for Battery and AC: https://linrunner.de/tlp/settings/runtimepm.html

Online

#15 2021-11-07 14:37:41

OrakMoya
Member
Registered: 2019-09-22
Posts: 69

Re: [Solved] xHCI host controller not responding after suspend/tlp

seth wrote:

Next level would be ASPM, disable it for Battery and AC: https://linrunner.de/tlp/settings/runtimepm.html

Solved! Thanks!

Offline

Board footer

Powered by FluxBB