我有一台 Dell Precision 8520,从 18.04 开始一直运行 Ubuntu,现在运行的是 22.04。很长一段时间以来,我都遇到一个问题,就是它偶尔无法从睡眠状态唤醒。后来我发现,这是因为鼠标和键盘(都是 USB)不知怎么地停止工作了。大约一年前,这个问题一直没有解决,直到大约一个月前才出现,但这次更糟了:键盘和鼠标会随机停止工作(例如,我在输入聊天消息的中途就停止输入了)。我不知道是哪个软件更新让它再次出现,但它会降低工作效率。
有解决办法吗?我知道 USB 并没有完全坏掉,因为我连接到盒子的测试手机仍然显示lsusb
:
Bus 002 Device 005: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 014: ID 1973:0019 Spectralink Corporation Versity
Bus 001 Device 003: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
解决此问题的唯一方法是重新启动。在此过程中,我可以通过 ssh 进入盒子,其他一切都正常。
对于那些建议更换键盘/鼠标的人,我已经更换了两者。过去几个月,我有一个 KVM,当发生这种情况时,键盘/鼠标在另一台机器上工作正常。
检查后dmesg
我发现有一堆似乎相关的错误:
[238321.762101] usb 1-8.3: USB disconnect, device number 7
[238321.874047] usb 1-8.4: USB disconnect, device number 13
[238323.969295] usb 2-9: device descriptor read/8, error -110
[238324.278385] usb 2-9: new SuperSpeed USB device number 77 using xhci_hcd
[238329.601353] usb 2-9: device descriptor read/8, error -110
[238329.706195] usb 2-9: new SuperSpeed USB device number 77 using xhci_hcd
[238334.977313] usb 2-9: device descriptor read/8, error -110
[238335.090315] usb usb2-port9: attempt power cycle
[238336.018324] usb 2-9: new SuperSpeed USB device number 78 using xhci_hcd
[238341.377324] usb 2-9: device descriptor read/8, error -110
[238341.482154] usb 2-9: new SuperSpeed USB device number 78 using xhci_hcd
[238346.753334] usb 2-9: device descriptor read/8, error -110
[238347.062371] usb 2-9: new SuperSpeed USB device number 79 using xhci_hcd
[238352.385342] usb 2-9: device descriptor read/8, error -110
[238352.490131] usb 2-9: new SuperSpeed USB device number 79 using xhci_hcd
[238357.761339] usb 2-9: device descriptor read/8, error -110
[238357.874456] usb usb2-port9: unable to enumerate USB device
[238357.882179] usb 2-8: USB disconnect, device number 73
[238357.882187] usb 2-8.1: USB disconnect, device number 74
[238357.986208] usb 2-8.3: USB disconnect, device number 75
[238358.002136] usb 1-8: new high-speed USB device number 15 using xhci_hcd
[238363.518120] usb 1-8: device descriptor read/64, error -110
[238387.942254] usb usb2-port8: attempt power cycle