Laptop keyboard not working at luks password prompt

Issue description

When asked for luks password internal laptop keyboard is not working. Keyboard works in uefi, works in grub, works after luks but not when luks asks for password. The only workaround is to connect external usb keyboard and type in luks password. This problem seems to pop up some years ago and affects many laptops, can be easily googled, no solution or cause of the problem found so far. There are some recommendations to change order in HOOKS=“base udev autodetect modconf block keyboard keymap encrypt filesystems fsck” in /etc/mkinitcpio.conf but this does not help at all or in rare cases causes internal keyboard to randomly work on luks pas prompt - lets say every 5 boot attempts or so.

Steps for reproducing the issue

setup is:

/boot is on unencrypted partition

/ is on encrypted

liamk@zen ~]$ uname -a

Linux zen 5.12.1-2-MANJARO #1 (closed) SMP PREEMPT Sun May 2 13:56:40 UTC 2021 x86_64 GNU/Linux

[liamk@zen ~]$ cryptsetup -V

cryptsetup 2.3.5

hardware is:

[liamk@zen ~]$ sudo dmesg | grep nput
[sudo] password for liamk:
[ 0.448139] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:33/PNP0C09:00/PNP0C0D:00/input/input0
[ 0.448170] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
[ 16.753656] input: CM Storm Quickfire Rapid i as /devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb3/3-2/3-2:1.0/0003:2516:0020.0001/input/input2
[ 16.809437] hid-generic 0003:2516:0020.0001: input,hidraw0: USB HID v1.11 Keyboard [CM Storm Quickfire Rapid i] on usb-0000:04:00.4-2/input0
[ 16.812815] hid-generic 0003:2516:0020.0002: hiddev96,hidraw1: USB HID v1.11 Device [CM Storm Quickfire Rapid i] on usb-0000:04:00.4-2/input1
[ 16.817526] input: CM Storm Quickfire Rapid i System Control as /devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb3/3-2/3-2:1.2/0003:2516:0020.0003/input/input3
[ 16.872203] input: CM Storm Quickfire Rapid i Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb3/3-2/3-2:1.2/0003:2516:0020.0003/input/input4
[ 16.872515] input: CM Storm Quickfire Rapid i Keyboard as /devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb3/3-2/3-2:1.2/0003:2516:0020.0003/input/input5
[ 16.872992] hid-generic 0003:2516:0020.0003: input,hidraw2: USB HID v1.11 Keyboard [CM Storm Quickfire Rapid i] on usb-0000:04:00.4-2/input2
[ 24.075661] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:13/LNXVIDEO:00/input/input6
[ 24.177875] input: PC Speaker as /devices/platform/pcspkr/input/input7
[ 24.222861] input: ASUE140A:00 04F3:3134 Mouse as /devices/platform/AMDI0010:03/i2c-0/i2c-ASUE140A:00/0018:04F3:3134.0004/input/input8
[ 24.223067] input: ASUE140A:00 04F3:3134 Touchpad as /devices/platform/AMDI0010:03/i2c-0/i2c-ASUE140A:00/0018:04F3:3134.0004/input/input9
[ 24.223186] input: ASUE140A:00 04F3:3134 Keyboard as /devices/platform/AMDI0010:03/i2c-0/i2c-ASUE140A:00/0018:04F3:3134.0004/input/input10
[ 24.223424] hid-generic 0018:04F3:3134.0004: input,hidraw3: I2C HID v1.00 Mouse [ASUE140A:00 04F3:3134] on i2c-ASUE140A:00
[ 24.529328] input: HD-Audio Generic HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:08.1/0000:04:00.1/sound/card0/input11
[ 24.529391] input: HD-Audio Generic HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:08.1/0000:04:00.1/sound/card0/input12
[ 24.529437] input: HD-Audio Generic HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:08.1/0000:04:00.1/sound/card0/input13
[ 24.539776] snd_hda_codec_realtek hdaudioC1D0: inputs:
[ 24.978316] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input14
[ 24.992206] input: Asus WMI hotkeys as /devices/platform/asus-nb-wmi/input/input15
[ 25.145595] input: ASUE140A:00 04F3:3134 Mouse as /devices/platform/AMDI0010:03/i2c-0/i2c-ASUE140A:00/0018:04F3:3134.0004/input/input16
[ 25.145744] input: ASUE140A:00 04F3:3134 Touchpad as /devices/platform/AMDI0010:03/i2c-0/i2c-ASUE140A:00/0018:04F3:3134.0004/input/input17
[ 25.145861] input: ASUE140A:00 04F3:3134 Keyboard as /devices/platform/AMDI0010:03/i2c-0/i2c-ASUE140A:00/0018:04F3:3134.0004/input/input18
[ 25.146123] hid-multitouch 0018:04F3:3134.0004: input,hidraw3: I2C HID v1.00 Mouse [ASUE140A:00 04F3:3134] on i2c-ASUE140A:00
[ 25.589951] input: USB2.0 HD UVC WebCam: USB2.0 HD as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3:1.0/input/input19
[ 25.592954] input: USB2.0 HD UVC WebCam: USB2.0 IR as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3:1.2/input/input20

where CM storm is external keyboard used to type in luks password.
also I created same ticket on luks gitlab but as I already suspected this problem has nothing to do with luks/dm-crypt itself. Here is the link:

I solved this by adding missing modules to mkinitcpio.conf.
After boot with external keyboard I used lsmod to list all the modules when internal keyboard was working and then I put all modules that looked to me like keyboard or asus input devices related into MODULES section in mkinitcpio.conf and ran mkinitcpio -P.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.