You are not logged in.
So I'm using LUKS encryption with the sd-encrypt hook. What happens is that the password prompt appears before the keyboard has been detected, and my keyboard presses don't get registered for about 5 seconds, is there a way to make the keyboard appear faster, or make the password prompt always appear after the keyboard has loaded?
I'm using the linux kernel.
Relevant log:
systemd[1]: Started Dispatch Password Requests to Console.
systemd-tty-ask-password-agent[283]: Starting password query on /dev/tty1.
kernel: usb 1-1: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice= 1.00
kernel: usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
kernel: usb 1-1: Product: USB OPTICAL MOUSE
kernel: input: USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-1/1-1:1.0/0003:XXXX:XXXX.0001/input/input3
kernel: hid-generic 0003:XXXX:XXXX.0001: input,hidraw0: USB HID v1.10 Mouse [USB OPTICAL MOUSE ] on usb-0000:05:00.3-1/input0
kernel: input: USB OPTICAL MOUSE Keyboard as /devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-1/1-1:1.1/0003:XXXX:XXXX.0002/input/input4
kernel: hid-generic 0003:XXXX:XXXX.0002: input,hiddev96,hidraw1: USB HID v1.10 Keyboard [USB OPTICAL MOUSE ] on usb-0000:05:00.3-1/input1
kernel: usb 1-3: new high-speed USB device number 3 using xhci_hcd
kernel: usb 1-3: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice= 0.11
kernel: usb 1-3: New USB device strings: Mfr=3, Product=1, SerialNumber=2
kernel: usb 1-3: Product: Integrated Camera
kernel: usb 1-3: Manufacturer: Chicony Electronics Co.,Ltd.
kernel: usb 1-3: SerialNumber: 0001
kernel: usb 1-4: new high-speed USB device number 4 using xhci_hcd
kernel: usb 1-4: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice= 1.00
kernel: usb 1-4: New USB device strings: Mfr=5, Product=6, SerialNumber=7
kernel: usb 1-4: Product: Wireless_Device
kernel: usb 1-4: Manufacturer: MediaTek Inc.
kernel: usb 1-4: SerialNumber: 000000000
kernel: usb 1-5: new high-speed USB device number 5 using xhci_hcd
kernel: usb 1-5: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice=61.60
kernel: usb 1-5: New USB device strings: Mfr=0, Product=1, SerialNumber=0
kernel: usb 1-5: Product: USB2.0 Hub
kernel: hub 1-5:1.0: USB hub found
kernel: hub 1-5:1.0: 2 ports detected
kernel: usb 1-5.1: new full-speed USB device number 6 using xhci_hcd
kernel: usb 1-5.1: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice= 8.00
kernel: usb 1-5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
kernel: usb 1-5.1: Product: ITE Device(8176)
kernel: usb 1-5.1: Manufacturer: ITE Tech. Inc.
kernel: input: ITE Tech. Inc. ITE Device(8176) Keyboard as /devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-5/1-5.1/1-5.1:1.0/0003:XXXX:XXXX.0003/input/input6
kernel: input: ITE Tech. Inc. ITE Device(8176) Wireless Radio Control as /devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-5/1-5.1/1-5.1:1.0/0003:XXXX:XXXX.0003/input/input7
kernel: hid-generic 0003:XXXX:XXXX.0003: input,hiddev97,hidraw2: USB HID v1.10 Keyboard [ITE Tech. Inc. ITE Device(8176)] on usb-0000:05:00.3-5.1/input0
systemd-tty-ask-password-agent[283]: Password query on /dev/tty1 finished successfully.Offline
$ grep ^HOOKS /etc/mkinitcpio.confWhat's the order?
Offline
You can try adding required usb/keyboard modules in mkinitcpio.conf MODULES (will be translated to /etc/modules-load.d/MODULES.conf you can see in lsinitcpio) and see if it gets loaded earlier that way.
Offline
$ grep ^HOOKS /etc/mkinitcpio.confWhat's the order?
Here you go:
HOOKS=(base systemd autodetect microcode modconf keyboard sd-vconsole block sd-encrypt filesystems fsck)Offline
You can try adding required usb/keyboard modules in mkinitcpio.conf MODULES (will be translated to /etc/modules-load.d/MODULES.conf you can see in lsinitcpio) and see if it gets loaded earlier that way.
I've tried these, with no success:
MODULES=(usbhid hid_generic xhci_hcd)Offline
I added loglevel=7 to the kernel parameters and noticed that it hangs on a specific part:
Before hang:
systemd[1]: Started Dispatch Password Requests to Console.
systemd-tty-ask-password-agent[283]: Starting password query on /dev/tty1.
kernel: usb 1-1: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice= 1.00
kernel: usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
kernel: usb 1-1: Product: USB OPTICAL MOUSE
kernel: input: USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-1/1-1:1.0/0003:XXXX:XXXX.0001/input/input3
kernel: hid-generic 0003:XXXX:XXXX.0001: input,hidraw0: USB HID v1.10 Mouse [USB OPTICAL MOUSE ] on usb-0000:05:00.3-1/input0
kernel: input: USB OPTICAL MOUSE Keyboard as /devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-1/1-1:1.1/0003:XXXX:XXXX.0002/input/input4
kernel: hid-generic 0003:XXXX:XXXX.0002: input,hiddev96,hidraw1: USB HID v1.10 Keyboard [USB OPTICAL MOUSE ] on usb-0000:05:00.3-1/input1
kernel: usb 1-3: new high-speed USB device number 3 using xhci_hcd
kernel: usb 1-3: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice= 0.11
kernel: usb 1-3: New USB device strings: Mfr=3, Product=1, SerialNumber=2
kernel: usb 1-3: Product: Integrated Camera
kernel: usb 1-3: Manufacturer: Chicony Electronics Co.,Ltd.
kernel: usb 1-3: SerialNumber: 0001
kernel: usb 1-4: new high-speed USB device number 4 using xhci_hcd
kernel: usb 1-4: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice= 1.00
kernel: usb 1-4: New USB device strings: Mfr=5, Product=6, SerialNumber=7
kernel: usb 1-4: Product: Wireless_Device
kernel: usb 1-4: Manufacturer: MediaTek Inc.
kernel: usb 1-4: SerialNumber: 000000000
kernel: usb 1-5: new high-speed USB device number 5 using xhci_hcd
kernel: usb 1-5: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice=61.60
kernel: usb 1-5: New USB device strings: Mfr=0, Product=1, SerialNumber=0
kernel: usb 1-5: Product: USB2.0 Hub
kernel: hub 1-5:1.0: USB hub found
kernel: hub 1-5:1.0: 2 ports detectedhang:
kernel: usb 1-5.1: new full-speed USB device number 6 using xhci_hcd <--- Hangs on this line
kernel: usb 1-5.1: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice= 8.00
kernel: usb 1-5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
kernel: usb 1-5.1: Product: ITE Device(8176)
kernel: usb 1-5.1: Manufacturer: ITE Tech. Inc.
kernel: input: ITE Tech. Inc. ITE Device(8176) Keyboard as /devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-5/1-5.1/1-5.1:1.0/0003:XXXX:XXXX.0003/input/input6
kernel: input: ITE Tech. Inc. ITE Device(8176) Wireless Radio Control as /devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-5/1-5.1/1-5.1:1.0/0003:XXXX:XXXX.0003/input/input7
kernel: hid-generic 0003:XXXX:XXXX.0003: input,hiddev97,hidraw2: USB HID v1.10 Keyboard [ITE Tech. Inc. ITE Device(8176)] on usb-0000:05:00.3-5.1/input0
systemd-tty-ask-password-agent[283]: Password query on /dev/tty1 finished successfully.Offline
Does the same also happen if you use linux-lts?
Offline
Does the same also happen if you use linux-lts?
I have tried three kernels: linux, linux-lts, and the cachyos kernel. I've also noticed that adding those kernel modules to the initramfs does improve the speed of keyboard initialization, which I hadn’t noticed before. However, it still feels like a half solution, since the keyboard loads after the password prompt appears. Ideally, I would like the password prompt to always appear only after the keyboard has fully loaded, no matter how long it takes. I’d appreciate it if anyone has a solution like that.
Offline
I added loglevel=7 to the kernel parameters and noticed that it hangs on a specific part:
You can run 'dmesg' later to get the same output, with timestamps.
kernel: usb 1-5.1: new full-speed USB device number 6 using xhci_hcd <--- Hangs on this line
So this line appears and then it hangs (how long?) or it hangs before this line appears?
You seem to have the keyboard plugged into a hub. Did you try connecting it directly to the motherboard?
Offline