I'm using Ubuntu 22.04. A few months ago, when still using 20.04, I started having an issue with my mechanical keyboard which until that moment had worked without flaws. This must have happened after an update but since this started months ago I can't retrace which updates were installed prior to this issue starting.
The problem occurs after a reboot and after switching a KVM switch from my work laptop (Windows) to my Ubuntu desktop. The KVM switch is not the issue, the problem also occurs when the keyboard is plugged directly into the desktop PC. The problem does not occur on my windows laptop.
The issue is that the keyboard gets probed and the probing fails; this happens dozens of times.
From journalctl (I have replaced the hostname with [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
Eventually the probe is successful and the keyboard works:
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)
I have tried other keyboards, other USB ports and a new good quality USB cable as this kind of behaviour could indicate a power issue, and I have tried different power profiles, all without success. The keyboard is a Ducky One2 RGB.
I have seen various posts on askubuntu, stackexchange and others that described similar issues, but all without a final solution. As a result, I spend a lot of time twiddling my thumbs after every reboot or after switching from laptop to desktop waiting for the keyboard to become available. Does anyone have an idea about what might be causing this?