FS#63565 - [kbd] unknown keymap applied on upgrade

Attached to Project: Arch Linux
Opened by George Rawlinson (rawlinsong) - Tuesday, 27 August 2019, 01:21 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 29 August 2019, 06:47 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description: Upon upgrade of kbd, unable to press enter after entering LUKS passphrase on boot. ALT behaved as ENTER and CTRL was emitting ^@. Could not figure out what other keys were emitting due to LUKS passphrase prompt.

A downgrade from 2.2.0-1 to 2.0.4-2 and regeneration of initramfs (using mkinitcpio) solved the issue.


Additional info:
* package version(s): affects kbd 2.2.0-1, issue not present with kbd 2.0.4-2 installed.
* config and/or log files, etc - mkinitcpio.conf has HOOKS=(base udev keyboard keymap consolefont autodetect modconf block encrypt filesystems fsck)
* link to upstream bug report, if any

mkinitcpio.conf:
MODULES=()
BINARIES=()
FILEs=()
HOOKS=(base udev keyboard keymap consolefont autodetect modconf block encrypt filesystems fsck)

vconsole.conf:
KEYMAP=us
FONT=ter-132n


Steps to reproduce: Upgrade to kbd 2.2.0-1 causes this issue. I cannot provide exact steps, unfortunately.
This task depends upon

Closed by  Antonio Rojas (arojas)
Thursday, 29 August 2019, 06:47 GMT
Reason for closing:  Fixed
Additional comments about closing:  kbd 2.2.0-3
Comment by George Rawlinson (rawlinsong) - Tuesday, 27 August 2019, 01:42 GMT
Forgot to mention that Gentoo updated[1] kbd to 2.2.0 since 2019-07-31.

EDIT:

I have also tried a different keyboard, presents the same symptoms as the main one.

I can successfully boot off the current archiso (USB), as well as use cryptsetup to successfully open and mount the volume.

[1]:https://gitweb.gentoo.org/repo/gentoo.git/log/sys-apps/kbd
Comment by Armin Fisslthaler (afics) - Tuesday, 27 August 2019, 13:00 GMT
I am seeing the same issue with KEYMAP=de in vconsole.conf.
Downgrading to 2.0.4-2 fixed it for me too.

This is a major nuisance for people using the encrypt hook as the passphrase can not be entered.
Comment by Antonio Rojas (arojas) - Tuesday, 27 August 2019, 13:49 GMT
Please test 2.2.0-2
Comment by Armin Fisslthaler (afics) - Tuesday, 27 August 2019, 19:25 GMT
2.2.0-2 does not work for me and exhibits the same problems as 2.2.0-1.
Comment by Giancarlo Razzolini (grazzolini) - Tuesday, 27 August 2019, 20:13 GMT
I have been trying to reproduce this issue on a VM to see if it's an issue with kbd or mkinitcpio keymap hook. This happens AFTER typing the password or the ALT key can also be used BEFORE typing it? Also, please paste the full mkinitcpio.conf, full /etc/locale.conf and full /etc/vconsole.conf. If you can also provide the output of lsinicpio -l /boot/initramfs-linux.img, it would be helpful.
Comment by Giancarlo Razzolini (grazzolini) - Tuesday, 27 August 2019, 20:18 GMT
Also, can you see if this happens using a mkinitcpio.conf WITHOUT the keymap hook? If your password is alphanumeric it shouldn't be an issue.
Comment by George Rawlinson (rawlinsong) - Tuesday, 27 August 2019, 20:27 GMT
Once the passphrase prompt has been reached, I can press ALT and it will state the "cannot find passphrase" (I don't recall the exact wording, it's the same message as an incorrect passphrase). It makes no difference if ALT is entered before or after the passphrase.
Comment by George Rawlinson (rawlinsong) - Tuesday, 27 August 2019, 20:30 GMT
I can confirm that removing the 'keymap' hook resolves this issue.

The requested files are attached.
Comment by Giancarlo Razzolini (grazzolini) - Tuesday, 27 August 2019, 22:17 GMT
For purposes of documenting it:

The font used on vconsole.conf, ter-132n, is not part of the kbd package. It is part of terminus-font.

I was not able to reproduce this either on a VM or on real hardware, replicating the locale.conf and vconsole.conf. But, given that suppressing the keymap hook seems to work, it's most likely related to kdb and not mkinitcpio keymap hook.
Comment by Giancarlo Razzolini (grazzolini) - Tuesday, 27 August 2019, 22:51 GMT
Due to a quirk on my VM, the snapshot reverted so I was using a previous kbd package on my attempts to reproduce the issue. I was able to reproduce it on my VM. I'll now investigate further to see if the issue is on kbd or mkinitcpio.
Comment by Antonio Rojas (arojas) - Wednesday, 28 August 2019, 06:23 GMT
Offending commit is https://github.com/legionus/kbd/commit/a3751c10 (yay for useful commit messages), which makes keymap.bin be saved to a format incompatible with busybox's loadkmap. According to the comments on the commit page a fix should be available soon.
Comment by Giancarlo Razzolini (grazzolini) - Wednesday, 28 August 2019, 12:28 GMT
I could change the keymap hook to add the loadkeys binary to the initramfs. But, if a fix is in the works, lets wait and see.
Comment by loqs (loqs) - Wednesday, 28 August 2019, 19:27 GMT
Change type back to short (with explicit conversion so no gcc warning) seems to be what the discussed fix would involve and worked for me.
Comment by Antonio Rojas (arojas) - Wednesday, 28 August 2019, 20:30 GMT
@loqs thanks a lot for the patch! It makes one test fail, but that is expected since all it does is compare a binary dump with a provided file and the patch changes the binary format.

I've pushed 2.2.0-3 to testing, please test.
Comment by loqs (loqs) - Wednesday, 28 August 2019, 20:39 GMT
With 2.2.0-3 no issues with the keymap hook.
Comment by Giancarlo Razzolini (grazzolini) - Thursday, 29 August 2019, 01:42 GMT
I can also confirm no issues with 2.2.0-3.
Comment by Viktor Jägersküpper (viktorjk) - Thursday, 29 August 2019, 06:46 GMT
2.2.0-3 resolves the issue for me.

Loading...