USB C 端口在拔出后变得不可用(直到重新启动)

USB C 端口在拔出后变得不可用(直到重新启动)

我用一个USB C 集线器我的笔记本电脑配有集成 SD 卡插槽以及音频、以太网、VGA 和 HDMI 端口。通常(我感觉大约有 30% 的情况),拔掉插头后,直到重新启动后才能再次识别它。甚至dmesg在插入时什么也没有显示。我发现每次拔出失败时,都会出现以下几行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

重新启动后,它会再次工作一段时间。

有没有一种方法可以在不重新启动的情况下重置 USB 端口?或者更好的是,您知道这个问题的可能修复/解决方法吗?如果你能给我一个可以遵循的指南,我并不害怕做一些更深入的挖掘(我显然不知道自己研究这个问题的正确关键词)。


一些系统信息:

$ 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

完整(我希望)插件输出dmesg(包括连接的鼠标和键盘):

[  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

完全拔出/故障输出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

轻微结果指出了一个解决方法r/linux问题:https://www.reddit.com/r/linuxquestions/comments/htwo8n/usb_c_port_becomes_unusable_after_unplugging/fyjwk2p

作为根用户:

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

它从驱动程序中删除 PCI 设备(USB 控制器)并将其添加回来。

非常感谢轻微结果

如果您阅读本文并需要填写其他信息,请随意分享!

相关内容