systemd-vconsole hook should fallback to adding default keymap "us"
Task Info (Flyspray) | |
---|---|
Opened By | Tim Ruffing (realorrandom) |
Task ID | 79287 |
Type | Bug Report |
Project | Arch Linux |
Category | Packages: Core |
Version | None |
OS | All |
Opened | 2023-08-03 09:49:24 UTC |
Status | Assigned |
Assignee | Christian Hesse (eworm) |
Details
Description:
systemd 254 introduced a default vconsole keymap that it sets when no KEYMAP is set in /etc/vconsole.conf, see https://github.com/systemd/systemd/commit/f129d0e77c4c9a0e12ae38cd241cd49846844a80. The default keymap is configurable at build time, the build config defaults to "us".
But the systemd-vconsole hook does not add any keymap to the initrd if no KEYMAP is set in /etc/vconsole.conf. This leads to errors in systemd-vconsole-setup.service in early userspace.
"journalctl --boot --unit systemd-vconsole-setup.service": [...] Aug 03 10:13:37 systemd-vconsole-setup[355]: loadkeys: Unable to open file: us: No such file or directory Aug 03 10:13:37 systemd-vconsole-setup[345]: /usr/bin/loadkeys failed with exit status 1. [...] (There are more warnings and errors, see attached log file, but I think they are separate issues, and some of them already existed before this issue appeared.)
On my system, this leads to multiple error messages "[FAIL] Failed to start Virtual Console Setup." (corresponding to multiple ttys) that appear even when "quiet" is set.
Anyway, I believe the proper fix is to build systemd with -D default-keymap="" (see https://github.com/systemd/systemd/pull/28505). Then systemd-vconsole-setup will not try to set anything, i.e., we keep the kernel keymap (which is what we always did, and which is the only fix that gives the user the possibility to stick to the kernel keymap). (I think "" should be the upstream build default, I'll comment in https://github.com/systemd/systemd/pull/28505).
Additional info:
- mkinitcpio 36-1
- systemd 254-1
Steps to reproduce:
- have a /etc/vconsole.conf without KEYMAP (e.g., the default file /usr/share/factory/etc/vconsole.conf as shipped with systemd)
- run "mkinitcpio -P"
- "lsinitcpio | grep keymaps" is empty
Workaround:
- set KEYMAP=us in /etc/vconsole.conf (which is the build-time-default default keymap https://github.com/systemd/systemd/blob/e3b7fe92e90fd107ea9be30112e00e227ca18501/meson_options.txt#L315, which is used by systemd if no KEYMAP is set explicitly https://github.com/systemd/systemd/blob/f129d0e77c4c9a0e12ae38cd241cd49846844a80/src/vconsole/vconsole-setup.c#L474 )
- run "mkinitcpio -P"
- "lsinitcpio | grep keymaps" has "usr/share/kbd/keymaps/i386/qwerty/us.map" (among others)