3

I use a USB C Hub with integrated SD card slots, and audio, ethernet, VGA and HDMI ports with my laptop. Often (I feel like ~30% of the time), after unplugging it, it is not recognized again until I reboot. Even dmesg shows nothing when plugging it in. I found that every time it fails on unplugging, the following lines appear in dmesg:

[33177.368938] xhci_hcd 0000:01:00.0: xHCI host not responding to stop endpoint command.
[33177.369008] xhci_hcd 0000:01:00.0: xHCI host controller not responding, assume dead
[33177.369037] xhci_hcd 0000:01:00.0: HC died; cleaning up
[33177.369197] xhci_hcd 0000:01:00.0: Timeout while waiting for configure endpoint command

After rebooting it works again for some time.

Is there a way I can reset a USB port without rebooting? Or better yet, do you know a possible fix/workaround for this altogether? I am not afraid of doing some deeper digging, if you can show me a guide to follow (I apparently don't know the right keywords to research this on my own).


Some system information:

$ uname -a
Linux ws-arch-tux 5.4.50-1-lts #1 SMP Wed, 01 Jul 2020 14:53:03 +0000 x86_64 GNU/Linux
$ lsb_release -a
LSB Version:    1.4
Distributor ID: Arch
Description:    Arch Linux
Release:        rolling
Codename:       n/a

Full (I hope) plug-in output in dmesg (includes connected mouse and keyboard):

[  994.664432] usb 4-1: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
[  994.715431] usb 4-1: New USB device found, idVendor=05e3, idProduct=0626, bcdDevice=62.02
[  994.715433] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  994.715434] usb 4-1: Product: USB3.1 Hub
[  994.715435] usb 4-1: Manufacturer: GenesysLogic
[  994.719009] hub 4-1:1.0: USB hub found
[  994.720994] hub 4-1:1.0: 4 ports detected
[  994.853652] usb 3-1: new high-speed USB device number 8 using xhci_hcd
[  995.051420] usb 3-1: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice=62.02
[  995.051425] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  995.051428] usb 3-1: Product: USB2.1 Hub
[  995.051431] usb 3-1: Manufacturer: GenesysLogic
[  995.056085] hub 3-1:1.0: USB hub found
[  995.057415] hub 3-1:1.0: 4 ports detected
[  995.143947] usb 4-1.1: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[  995.193083] usb 4-1.1: New USB device found, idVendor=0bda, idProduct=8153, bcdDevice=31.00
[  995.193089] usb 4-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[  995.193093] usb 4-1.1: Product: USB 10/100/1000 LAN
[  995.193096] usb 4-1.1: Manufacturer: Realtek
[  995.193098] usb 4-1.1: SerialNumber: 001000001
[  995.314306] usb 4-1.1: reset SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[  995.473646] usb 3-1.1: new high-speed USB device number 9 using xhci_hcd
[  995.509080] r8152 4-1.1:1.0 eth0: v1.10.11
[  995.557403] r8152 4-1.1:1.0 enp1s0u1u1: renamed from eth0
[  995.643965] usb 3-1.1: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.00
[  995.643966] usb 3-1.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[  995.643967] usb 3-1.1: Product: USB2.0 HUB
[  995.645494] hub 3-1.1:1.0: USB hub found
[  995.645533] hub 3-1.1:1.0: 4 ports detected
[  995.773595] usb 3-1.2: new low-speed USB device number 10 using xhci_hcd
[  996.015277] usb 3-1.2: New USB device found, idVendor=046d, idProduct=c31c, bcdDevice=64.00
[  996.015282] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  996.015285] usb 3-1.2: Product: USB Keyboard
[  996.015288] usb 3-1.2: Manufacturer: Logitech
[  996.024006] input: Logitech USB Keyboard as /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/usb3/3-1/3-1.2/3-1.2:1.0/0003:046D:C31C.0005/input/input29
[  996.094376] hid-generic 0003:046D:C31C.0005: input,hidraw0: USB HID v1.10 Keyboard [Logitech USB Keyboard] on usb-0000:01:00.0-1.2/input0
[  996.100244] input: Logitech USB Keyboard Consumer Control as /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/usb3/3-1/3-1.2/3-1.2:1.1/0003:046D:C31C.0006/input/input30
[  996.173867] input: Logitech USB Keyboard System Control as /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/usb3/3-1/3-1.2/3-1.2:1.1/0003:046D:C31C.0006/input/input31
[  996.174091] hid-generic 0003:046D:C31C.0006: input,hidraw1: USB HID v1.10 Device [Logitech USB Keyboard] on usb-0000:01:00.0-1.2/input1
[  996.203586] usb 3-1.1.1: new full-speed USB device number 11 using xhci_hcd
[  996.512524] usb 3-1.1.1: New USB device found, idVendor=1b3f, idProduct=2008, bcdDevice= 1.00
[  996.512525] usb 3-1.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  996.512526] usb 3-1.1.1: Product: USB Audio Device
[  996.512527] usb 3-1.1.1: Manufacturer: GeneralPlus
[  996.526911] input: GeneralPlus USB Audio Device as /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/usb3/3-1/3-1.1/3-1.1.1/3-1.1.1:1.3/0003:1B3F:2008.0007/input/input32
[  996.593956] hid-generic 0003:1B3F:2008.0007: input,hidraw2: USB HID v2.01 Device [GeneralPlus USB Audio Device] on usb-0000:01:00.0-1.1.1/input3
[  996.793698] usb 3-1.1.2: new low-speed USB device number 12 using xhci_hcd
[  997.103766] usb 3-1.1.2: New USB device found, idVendor=046d, idProduct=c077, bcdDevice=72.00
[  997.103771] usb 3-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  997.103775] usb 3-1.1.2: Product: USB Optical Mouse
[  997.103778] usb 3-1.1.2: Manufacturer: Logitech
[  997.108047] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/usb3/3-1/3-1.1/3-1.1.2/3-1.1.2:1.0/0003:046D:C077.0008/input/input33
[  997.108763] hid-generic 0003:046D:C077.0008: input,hidraw3: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:01:00.0-1.1.2/input0
[  997.303643] usb 3-1.1.3: new high-speed USB device number 13 using xhci_hcd
[  997.547453] usb 3-1.1.3: New USB device found, idVendor=05e3, idProduct=0751, bcdDevice=14.04
[  997.547457] usb 3-1.1.3: New USB device strings: Mfr=3, Product=4, SerialNumber=0
[  997.547461] usb 3-1.1.3: Product: USB Storage
[  997.547463] usb 3-1.1.3: Manufacturer: USB Storage
[  997.551294] usb-storage 3-1.1.3:1.0: USB Mass Storage device detected
[  997.551541] scsi host3: usb-storage 3-1.1.3:1.0
[  998.565178] scsi 3:0:0:0: Direct-Access     Generic  STORAGE DEVICE   1404 PQ: 0 ANSI: 6
[  998.565844] sd 3:0:0:0: Attached scsi generic sg2 type 0
[  998.795068] sd 3:0:0:0: [sdc] Attached SCSI removable disk

Full unplug/failure output in dmesg:

[33171.844814] usb 3-1: USB disconnect, device number 8
[33171.844821] usb 3-1.1: USB disconnect, device number 9
[33171.844825] usb 3-1.1.1: USB disconnect, device number 11
[33171.932552] r8152 4-1.1:1.0 enp1s0u1u1: Stop submitting intr, status -71
[33172.009610] usb 3-1.1.2: USB disconnect, device number 12
[33172.170046] usb 3-1.1.3: USB disconnect, device number 13
[33172.668961] usb 4-1: USB disconnect, device number 4
[33172.668966] usb 4-1.1: USB disconnect, device number 5
[33177.368938] xhci_hcd 0000:01:00.0: xHCI host not responding to stop endpoint command.
[33177.369008] xhci_hcd 0000:01:00.0: xHCI host controller not responding, assume dead
[33177.369037] xhci_hcd 0000:01:00.0: HC died; cleaning up
[33177.369197] xhci_hcd 0000:01:00.0: Timeout while waiting for configure endpoint command
[33177.370176] usb 3-1.2: USB disconnect, device number 10

1 Answer 1

4

SlightResult pointed out a workaround over on r/linuxquestions: https://www.reddit.com/r/linuxquestions/comments/htwo8n/usb_c_port_becomes_unusable_after_unplugging/fyjwk2p

As root:

cd /sys/bus/pci/drivers/xhci_hcd
echo 0000:01:00.0 > unbind
echo 0000:01:00.0 > bind

It removes the PCI device (USB controller) from the driver and adds it back.

A big thank you to SlightResult!

If you read this and have additional information to fill in, please feel free to share!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.