Keyboard doesn't work at the disk unlock prompt (at first)

I have disk encryption set up. Just now, i rebooted my machine; at the prompt to unlock the disk, pressing keys on the keyboard didn’t result in anything appearing in the password field. I have two keyboards attached, and this was the case for both of them. I tried unplugging the keyboard, plugging it in again, in the same port, a different port, etc, and it seems that if i unplug, wait a bit, and plug it in again, then it works as usual.

I haven’t seen this problem before. The reboot was after an update with `dnf offline-upgrade`; the last time i did that was about a week ago, so this could be due to a recent change.

Some quick searching didn’t find anyone reporting this problem on current Fedora, but there was something similar on Arch a few years ago: Keyboard does not work at LUKS password prompt / Installation / Arch Linux Forums

Which was blamed on systemd: udev fails to trigger loading of modules · Issue #11314 · systemd/systemd · GitHub

Has anyone seen or heard of anything like this?

You might get clues from journalctl --no-hostname -b [N] --no-pager -g hid for 2 values of N: one with the keyboard problem and one that worked properly.

Yes with a keyboard that fails to init on cold power up. Can you try another model of keyboard?

Also with a BIOS that was set to not wait for USB devices to finish initialisation before booting. does the keyboard work to enter the BIOS?

I have two keyboards of different makes plugged in. Both fail at the disk unlock prompt. One of them works at the GRUB prompt to select a kernel, haven’t tried the other one. And both of these have been working fine for months before this. It seems unlikely both have developed a hardware fault simultaneously.

The output is a bit surprising to me:

$ journalctl --no-hostname -b 0 --no-pager -g hid
Oct 09 18:25:14 kernel: hid: raw HID events driver (C) Jiri Kosina
Oct 09 18:25:14 kernel: usbcore: registered new interface driver usbhid
Oct 09 18:25:14 kernel: usbhid: USB HID core driver
Oct 09 18:25:14 kernel: hid-generic 0003:048D:5702.0001: hiddev96,hidraw0: USB HID v1.12 Device [ITE Tech. Inc. ITE Device] on usb-0000:10:00.0-6/input0
Oct 09 18:26:20 kernel: hid-generic 0003:1A2C:2D43.0002: input,hidraw1: USB HID v1.10 Keyboard [SEMICO USB Keyboard] on usb-0000:10:00.0-3.4.2/input0
Oct 09 18:26:20 kernel: hid-generic 0003:1A2C:2D43.0003: input,hiddev97,hidraw2: USB HID v1.10 Keyboard [SEMICO USB Keyboard] on usb-0000:10:00.0-3.4.2/input1
Oct 09 18:26:20 kernel: hid-generic 0003:1532:00A5.0004: input,hidraw3: USB HID v1.11 Mouse [Razer Razer Viper V2 Pro] on usb-0000:10:00.0-3.4.3/input0
Oct 09 18:26:20 kernel: hid-generic 0003:1532:00A5.0005: input,hidraw4: USB HID v1.11 Keyboard [Razer Razer Viper V2 Pro] on usb-0000:10:00.0-3.4.3/input1
Oct 09 18:26:20 kernel: hid-generic 0003:1532:00A5.0006: input,hidraw5: USB HID v1.11 Keyboard [Razer Razer Viper V2 Pro] on usb-0000:10:00.0-3.4.3/input2
Oct 09 18:26:21 kernel: hid-generic 0003:17A0:0305.0007: input,hidraw6: USB HID v1.00 Device [Samson Technologies Samson Go Mic] on usb-0000:10:00.0-3.4.4.1/input3
Oct 09 18:26:30 kernel: hid-generic 0003:24F0:0140.0008: input,hidraw7: USB HID v1.10 Keyboard [Metadot - Das Keyboard Das Keyboard] on usb-0000:10:00.0-3.4.1.4/input0
Oct 09 18:26:31 kernel: hid-generic 0003:24F0:0140.0009: input,hidraw8: USB HID v1.10 Device [Metadot - Das Keyboard Das Keyboard] on usb-0000:10:00.0-3.4.1.4/input1
Oct 09 19:58:08 kernel: hid-generic 0003:2972:0099.000A: hiddev98,hidraw9: USB HID v1.00 Device [FIIO FiiO K11 R2R] on usb-0000:10:00.0-3.3/input0

And:

$ journalctl --no-hostname -b 1 --no-pager -g hid
May 25 18:22:58 kernel: hid: raw HID events driver (C) Jiri Kosina
May 25 18:22:58 kernel: usbcore: registered new interface driver usbhid
May 25 18:22:58 kernel: usbhid: USB HID core driver
May 25 18:22:59 kernel: hid-generic 0003:048D:5702.0001: hiddev96,hidraw0: USB HID v1.12 Device [ITE Tech. Inc. ITE Device] on usb-0000:10:00.0-6/input0
May 25 18:22:59 kernel: hid-generic 0003:17A0:0305.0002: input,hidraw1: USB HID v1.00 Device [Samson Technologies Samson Go Mic] on usb-0000:10:00.0-3.4.2/input3
May 25 18:22:59 kernel: hid-generic 0003:1532:00A5.0003: input,hidraw2: USB HID v1.11 Mouse [Razer Razer Viper V2 Pro] on usb-0000:10:00.0-3.4.3/input0
May 25 18:22:59 kernel: hid-generic 0003:1532:00A5.0004: input,hidraw3: USB HID v1.11 Keyboard [Razer Razer Viper V2 Pro] on usb-0000:10:00.0-3.4.3/input1
May 25 18:22:59 kernel: hid-generic 0003:1532:00A5.0005: input,hidraw4: USB HID v1.11 Keyboard [Razer Razer Viper V2 Pro] on usb-0000:10:00.0-3.4.3/input2
May 25 18:23:01 kernel: hid-generic 0003:1A2C:2D43.0006: input,hidraw5: USB HID v1.10 Keyboard [SEMICO USB Keyboard] on usb-0000:10:00.0-3.4.4.1/input0
May 25 18:23:01 kernel: hid-generic 0003:1A2C:2D43.0007: input,hiddev97,hidraw6: USB HID v1.10 Keyboard [SEMICO USB Keyboard] on usb-0000:10:00.0-3.4.4.1/input1
May 25 18:23:01 kernel: hid-generic 0003:24F0:0140.0008: input,hidraw7: USB HID v1.10 Keyboard [Metadot - Das Keyboard Das Keyboard] on usb-0000:10:00.0-3.4.4.2.4/input0
May 25 18:23:01 kernel: hid-generic 0003:24F0:0140.0009: input,hidraw8: USB HID v1.10 Device [Metadot - Das Keyboard Das Keyboard] on usb-0000:10:00.0-3.4.4.2.4/input1
May 25 18:25:04 packagekitd[2388]: Failed to get cache filename for hidapi

October 9th was yesterday, when i rebooted. But May 25th was ages ago; i have rebooted several times since then!

The differences i can see are:

  • a new device (FIIO FiiO K11 R2R); this has been there for a few weeks, during which i haven’t seen this problem
  • the order of the other devices (the microphone and SEMCO keyboard have moved earlier)

Is the order significant?

If you trust the hardware, then you want to look at software. Newer linux kernels sometimes need UEFI/BIOS updates. Sometimes nwer kernels or drivers remove support for historical UEFI/BIOS bugs (hopefully after the responsible vendor has fixed their bug with an update!). You can investigate using the journal, web searches for your hardware and issue, or just go looking for firmware updates.

You want -b -1 for the previous boot.

1 Like

Doh! Thanks. With -1:

Oct 09 18:21:27 kernel: hid: raw HID events driver (C) Jiri Kosina
Oct 09 18:21:27 kernel: usbcore: registered new interface driver usbhid
Oct 09 18:21:27 kernel: usbhid: USB HID core driver
Oct 09 18:21:27 kernel: hid-generic 0003:048D:5702.0001: hiddev96,hidraw0: USB HID v1.12 Device [ITE Tech. Inc. ITE Device] on usb-0000:10:00.0-6/input0
Oct 09 18:22:33 kernel: hid-generic 0003:1A2C:2D43.0002: input,hidraw1: USB HID v1.10 Keyboard [SEMICO USB Keyboard] on usb-0000:10:00.0-3.4.2/input0
Oct 09 18:22:33 kernel: hid-generic 0003:1A2C:2D43.0003: input,hiddev97,hidraw2: USB HID v1.10 Keyboard [SEMICO USB Keyboard] on usb-0000:10:00.0-3.4.2/input1
Oct 09 18:22:34 kernel: hid-generic 0003:24F0:0140.0004: input,hidraw3: USB HID v1.10 Keyboard [Metadot - Das Keyboard Das Keyboard] on usb-0000:10:00.0-3.4.1.4/input0
Oct 09 18:22:34 kernel: hid-generic 0003:24F0:0140.0005: input,hidraw4: USB HID v1.10 Device [Metadot - Das Keyboard Das Keyboard] on usb-0000:10:00.0-3.4.1.4/input1
Oct 09 18:22:34 kernel: hid-generic 0003:1532:00A5.0006: input,hidraw5: USB HID v1.11 Mouse [Razer Razer Viper V2 Pro] on usb-0000:10:00.0-3.4.3/input0
Oct 09 18:22:34 kernel: hid-generic 0003:1532:00A5.0007: input,hidraw6: USB HID v1.11 Keyboard [Razer Razer Viper V2 Pro] on usb-0000:10:00.0-3.4.3/input1
Oct 09 18:22:34 kernel: hid-generic 0003:1532:00A5.0008: input,hidraw7: USB HID v1.11 Keyboard [Razer Razer Viper V2 Pro] on usb-0000:10:00.0-3.4.3/input2
Oct 09 18:22:35 kernel: hid-generic 0003:17A0:0305.0009: input,hidraw8: USB HID v1.00 Device [Samson Technologies Samson Go Mic] on usb-0000:10:00.0-3.4.4.1/input3
Oct 09 18:22:45 kernel: hid-generic 0003:24F0:0140.000A: input,hidraw3: USB HID v1.10 Keyboard [Metadot - Das Keyboard Das Keyboard] on usb-0000:10:00.0-3.4.1.4/input0
Oct 09 18:22:45 kernel: hid-generic 0003:24F0:0140.000B: input,hidraw4: USB HID v1.10 Device [Metadot - Das Keyboard Das Keyboard] on usb-0000:10:00.0-3.4.1.4/input1

So on the previous boot, the Das Keyboard appeared twice. But the second appearance was ten seconds after the rest. I wonder if that was me unplugging it and then plugging it in again to try to make it work. I probably need to test this in a more controlled way.

journalctl -f will “follow” the output - run that and insert/remove to your hearts content and you’ll see these messages in real time