*** RESOLVED/SOLUTION: Turns out it was custom UDEV keyboard rules causing the issue, and had NOTHING to do with the Kernel settings/LUKS/cryptsetup prompt
Hi,
Since upgrading to Kernel 5.10.0-20, I can no longer enter anything at the LUKS/cryptsetup password entry screen using any keyboard (internal or external). I press buttons but nothing shows on screen. Same for 5.10.0.21. But it works fine when using 5.10.0-19 and earlier versions. So it appears something in the most recent kernels is causing it.
I also tested an external keyboard, and it also does not recognize it.
Also I tested on LIVE versions (obviously without LUKS/crypsetup enabled on boot) and the keyboard works fine during normal OS usage. So at least it seems narrowed down to the pre-OS LUKS/CRYPTSETUP related processes.
Any ideas what could have changed to cause this, and what I can do to get it working again ?
** Macbook Pro 2015 version
** Debian STABLE, fully updated
Thanks
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[Hardware] After kernel update, Macbook keyboard stops working at boot LUKS/crypsetup prompt (Stable)
[Hardware] After kernel update, Macbook keyboard stops working at boot LUKS/crypsetup prompt (Stable)
Last edited by jt8391 on 2023-02-05 02:37, edited 2 times in total.
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: [Hardware] After kernel update, Macbook keyboard stops working at boot LUKS/crypsetup prompt (Stable)
IIRC this is expected when booting without plymouth (splash screen). Just like when typing the password for su or sudo.
Does it reboot if you press Ctrl+Alt+Del ? Does pressing NumLock and CapLock change the status lights ?
If you add "break=modules" to the kernel command line, does the keyboard work at the initramfs prompt ?
-
- Posts: 7
- Joined: 2022-12-04 16:07
- Been thanked: 2 times
Re: [Hardware] After kernel update, Macbook keyboard stops working at boot LUKS/crypsetup prompt (Stable)
Hi!
Try booting into an older kernel version (5.10.0-19) to see if that resolves the issue.
Check if there are any updates available for the keyboard drivers, and if so, update them.
Try booting into an older kernel version (5.10.0-19) to see if that resolves the issue.
Check if there are any updates available for the keyboard drivers, and if so, update them.
Re: [Hardware] After kernel update, Macbook keyboard stops working at boot LUKS/crypsetup prompt (Stable)
So everything works perfectly on 5.10.19 and earlier kernels. At the LUKS/Cryptsetup entry for those it always show "asterisks" when you type your password (*******) and works fine.p.H wrote: ↑2023-02-03 19:48IIRC this is expected when booting without plymouth (splash screen). Just like when typing the password for su or sudo.
Does it reboot if you press Ctrl+Alt+Del ? Does pressing NumLock and CapLock change the status lights ?
If you add "break=modules" to the kernel command line, does the keyboard work at the initramfs prompt ?
With 5.10.20 and 5.10.21, it shows nothing at all, no asterisks. The caps lock key does not light up at all.
I tried "break=modules" and the keyboard still does not show any signs of life. The only change I noticed was it dropped me to a "BusyBox (initram)" shell instead of password entry prompt, but still cannot type anything with the keyboard.
Re: [Hardware] After kernel update, Macbook keyboard stops working at boot LUKS/crypsetup prompt (Stable)
Yeah everything has always worked perfectly on 5.10.19 and earlier kernels, so I am still using that for now. The problem just began with 5.10.20 and 5.10.21.ChristianMorris wrote: ↑2023-02-04 14:04 Hi!
Try booting into an older kernel version (5.10.0-19) to see if that resolves the issue.
Check if there are any updates available for the keyboard drivers, and if so, update them.
Not sure about keyboard drivers since it's the internal Macbook keyboard I am trying to get working, how would I go about updating those ?
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: [Hardware] After kernel update, Macbook keyboard stops working at boot LUKS/crypsetup prompt (Stable)
Even with the external (USB ?) keyboard ?
What about "break=premount" ?
Did you compare /boot/config-* ?
Did you compare the contents of /boot/initramfs.img-* with lsinitramfs ?
Re: [Hardware] After kernel update, Macbook keyboard stops working at boot LUKS/crypsetup prompt (Stable)
Both internal and external keyboards still not working. Also tried "break=premount" but same thing (goes to BusyBox initram prompt but typing does nothing).
I used the DIFF command to compare some of the files you mentioned:
1) Interestingly, DIFF on the /boot/initramfs.img between 5.10.20 and 5.10.19 only shows my UDEV rules which I completely forgot about. But would these have any impact on initram/cryptsetup entry prompt ? I assumed these are only relevant AFTER unlocking for the OS. If they can affect things this early maybe that is the culprit.
2) DIFF of "/boot/config-" for 5.10.20 and 5.10.19:
Thanks again
I used the DIFF command to compare some of the files you mentioned:
1) Interestingly, DIFF on the /boot/initramfs.img between 5.10.20 and 5.10.19 only shows my UDEV rules which I completely forgot about. But would these have any impact on initram/cryptsetup entry prompt ? I assumed these are only relevant AFTER unlocking for the OS. If they can affect things this early maybe that is the culprit.
Code: Select all
< usr/lib/udev/rules.d/1-rules.rules
< usr/lib/udev/rules.d/2-rules.rules
< usr/lib/udev/rules.d/5-rules.rules
---
> usr/lib/udev/rules.d/10-rules.rules
2) DIFF of "/boot/config-" for 5.10.20 and 5.10.19:
Code: Select all
< # Linux/x86 5.10.158 Kernel Configuration
---
> # Linux/x86 5.10.149 Kernel Configuration
26c26
< CONFIG_BUILD_SALT="5.10.0-20-amd64"
---
> CONFIG_BUILD_SALT="5.10.0-19-amd64"
311d310
< CONFIG_DYNAMIC_PHYSICAL_MASK=y
421,422c420
< CONFIG_AMD_MEM_ENCRYPT=y
< # CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT is not set
---
> # CONFIG_AMD_MEM_ENCRYPT is not set
850d847
< CONFIG_ARCH_HAS_CC_PLATFORM=y
1134d1130
< CONFIG_INET_TABLE_PERTURB_ORDER=16
9423d9418
< CONFIG_ARCH_HAS_FORCE_DMA_UNENCRYPTED=y
9425d9419
< CONFIG_DMA_COHERENT_POOL=y
9704a9699
> # CONFIG_BPF_KPROBE_OVERRIDE is not set
9759c9754
< # CONFIG_FUNCTION_ERROR_INJECTION is not set
---
> CONFIG_FUNCTION_ERROR_INJECTION=y
Thanks again
Last edited by jt8391 on 2023-02-04 18:28, edited 2 times in total.
Re: [Hardware] After kernel update, Macbook keyboard stops working at boot LUKS/crypsetup prompt (Stable)
Updated the above information
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: [Hardware] After kernel update, Macbook keyboard stops working at boot LUKS/crypsetup prompt (Stable)
As you can see, udev rules are copied into the initramfs and active as soon as udev is started by the initramfs (i.e. very early).
What do these udev rules do ?
The issue is not related with cryptsetup but the whole keyboard operation. It might be a regression in the newer kernels or related with a change in the initramfs contents. I do not see how the kernel configuration changes between -19 and -20 could affect the keyboard.
To test the initramfs changes, you could:
1) Backup the current initramfs for any working kernel version.
2) Rebuild the initramfs for that kernel version with update-initramfs -u -k <version>.
3) Check the contents is the same as -20 and -21.
3) Reboot with that kernel version and check whether the keyboard works.
Re: [Hardware] After kernel update, Macbook keyboard stops working at boot LUKS/crypsetup prompt (Stable)
You were right, it had nothing to do with the kernel settings -- it was the custom keyboard udev rules. The keyboard udev rules were built/updated into the newer 20/21 initrd.imgs (the non-working ones) but were never updated into the current working initrd.imgs (18/19).
"sudo update-initramfs" confirmed it so now I can just scrap the udev rules completely or leave them out of the initrd.imgs so they only apply later for the OS.
Thanks for your help!
"sudo update-initramfs" confirmed it so now I can just scrap the udev rules completely or leave them out of the initrd.imgs so they only apply later for the OS.
Thanks for your help!