USB 键盘在注册前需要进行数十次探测

USB 键盘在注册前需要进行数十次探测

我使用的是 Ubuntu 22.04。几个月前,当我还在使用 20.04 时,我的机械键盘开始出现问题,在此之前,它一直运行正常。这肯定是在更新后发生的,但由于这个问题是几个月前开始的,我无法追溯在出现此问题之前安装了哪些更新。

问题出现在重新启动后,以及将 KVM 切换器从我的工作笔记本电脑 (Windows) 切换到我的 Ubuntu 桌面后。KVM 切换器不是问题,当键盘直接插入台式电脑时也会发生问题。这个问题不会出现在我的 Windows 笔记本电脑上。

问题是键盘被探测并且探测失败;这种情况发生了几十次。

从 journalctl(我已将主机名替换为 [hostname]):

aug 08 17:20:43 [hostname] kernel: usb 1-5.1.4: new full-speed USB device number 86 using xhci_hcd
aug 08 17:20:43 [hostname] kernel: usb 1-5.1.4: New USB device found, idVendor=04d9, idProduct=0348, bcdDevice= 1.10
aug 08 17:20:43 [hostname] kernel: usb 1-5.1.4: New USB device strings: Mfr=3, Product=1, SerialNumber=0
aug 08 17:20:43 [hostname] kernel: usb 1-5.1.4: Product: Ducky Keyboard
aug 08 17:20:43 [hostname] kerl: usb 1-5.1.4: Manufacturer: DuckyChannel International Co., Ltd.
aug 08 17:20:43 [hostname] kernel: input: DuckyChannel International Co., Ltd. Ducky Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1.4/1-5.1.4:1.0/0003:04D9:0348.0>
aug 08 17:20:43 [hostname] kernel: hid-generic 0003:04D9:0348.0055: input,hidraw6: USB HID v1.11 Keyboard [DuckyChannel International Co., Ltd. Ducky Keyboard] on usb-0000:00:14.0-5>
aug 08 17:20:43 [hostname] kernel: usbhid 1-5.1.4:1.1: can't add hid device: -32
aug 08 17:20:43 [hostname] kernel: usbhid: probe of 1-5.1.4:1.1 failed with error -32
aug 08 17:20:43 [hostname] kernel: usbhid 1-5.1.4:1.2: can't add hid device: -32
aug 08 17:20:43 [hostname] kernel: usbhid: probe of 1-5.1.4:1.2 failed with error -32
aug 08 17:20:43 [hostname] kernel: usb 1-5.1.4: USB disconnect, device number 86
aug 08 17:20:43 [hostname] acpid[1320]: input device has been disconnected, fd 23
aug 08 17:20:43 [hostname] libvirtd[2050]: internal error: Missing udev property 'ID_VENDOR_ID' on '1-5.1.4'
aug 08 17:20:43 [hostname] libvirtd[2050]: internal error: Missing udev property 'ID_VENDOR_ID' on '1-5.1.4'
aug 08 17:20:43 [hostname] gnome-shell[2493]: Could not open device /dev/input/event21: Could not get device info for path /dev/input/event21: No such file or directory

最终探测成功,键盘工作正常:

aug 08 17:47:26 [hostname] kernel: usb 1-5.1.4: new full-speed USB device number 126 using xhci_hcd
aug 08 17:47:26 [hostname] kernel: usb 1-5.1.4: New USB device found, idVendor=04d9, idProduct=0348, bcdDevice= 1.10
aug 08 17:47:26 [hostname] kernel: usb 1-5.1.4: New USB device strings: Mfr=3, Product=1, SerialNumber=0
aug 08 17:47:26 [hostname] kernel: usb 1-5.1.4: Product: Ducky Keyboard
aug 08 17:47:26 [hostname] kernel: usb 1-5.1.4: Manufacturer: DuckyChannel International Co., Ltd.
aug 08 17:47:26 [hostname] kernel: input: DuckyChannel International Co., Ltd. Ducky Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1.4/1-5.1.4:1.0/0003:04D9:0348.0>
aug 08 17:47:26 [hostname] kernel: hid-generic 0003:04D9:0348.0C79: input,hidraw6: USB HID v1.11 Keyboard [DuckyChannel International Co., Ltd. Ducky Keyboard] on usb-0000:00:14.0-5>
aug 08 17:47:26 [hostname] kernel: hid-generic 0003:04D9:0348.0C7A: hiddev2,hidraw7: USB HID v1.11 Device [DuckyChannel International Co., Ltd. Ducky Keyboard] on usb-0000:00:14.0-5>
aug 08 17:47:26 [hostname] kernel: input: DuckyChannel International Co., Ltd. Ducky Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1.4/1-5.1.4:1.2/0>
aug 08 17:47:26 [hostname] kernel: input: DuckyChannel International Co., Ltd. Ducky Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1.4/1-5.1.4:1.2>
aug 08 17:47:26 [hostname] kernel: input: DuckyChannel International Co., Ltd. Ducky Keyboard Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1.4/1-5.1.4:1.2/0003:04D9:>
aug 08 17:47:26 [hostname] kernel: input: DuckyChannel International Co., Ltd. Ducky Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1.4/1-5.1.4:1.2/0003:04D9:0348.0>
aug 08 17:47:26 [hostname] kernel: hid-generic 0003:04D9:0348.0C7B: input,hidraw8: USB HID v1.11 Mouse [DuckyChannel International Co., Ltd. Ducky Keyboard] on usb-0000:00:14.0-5.1.>
aug 08 17:47:26 [hostname] mtp-probe[267460]: checking bus 1, device 126: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1.4"
aug 08 17:47:26 [hostname] mtp-probe[267460]: bus: 1, device: 126 was not an MTP device
aug 08 17:47:26 [hostname] systemd-logind[1412]: Watching system buttons on /dev/input/event21 (DuckyChannel International Co., Ltd. Ducky Keyboard)
aug 08 17:47:26 [hostname] systemd-logind[1412]: Watching system buttons on /dev/input/event22 (DuckyChannel International Co., Ltd. Ducky Keyboard System Control)
aug 08 17:47:27 [hostname] systemd-logind[1412]: Watching system buttons on /dev/input/event25 (DuckyChannel International Co., Ltd. Ducky Keyboard)

我尝试过其他键盘、其他 USB 端口和一条新的优质 USB 电缆,因为这种行为可能表明存在电源问题,并且我尝试过不同的电源配置文件,但都没有成功。键盘是 Ducky One2 RGB。

我在 askubuntu、stackexchange 和其他网站上看到过各种描述类似问题的帖子,但都没有最终解决方案。因此,每次重启后或从笔记本电脑切换到台式机后,我都会花很多时间无所事事地等待键盘可用。有人知道是什么原因造成的吗?

相关内容