Bugzilla – Bug 1226819
/etc/X11/xdm/keytable destroys /etc/X11/xorg.conf.d/00-keyboard.conf
Last modified: 2024-06-23 11:31:52 UTC
Behaviorally, this bug has several manifestations, depending on what is in /etc/vconsole.conf. One example: vconsole.conf: KEYMAP=emacs2 FONT=lat9w-16.psfu FONT_MAP=trivial XKBLAYOUT=us XKBOPTIONS=ctrl:nocaps,compose:lctrl,terminate:ctrl_alt_bksp,altwin:swap_lalt_lwin XKBMODEL=pc101 This vconsole.conf was generated by localectl (actually written by systemd-localed, but nevermind), so presumably it is well-formed despite not conforming to vconsole.conf(5); I guess the systemd guys decided against updating the documentation to make things more interesting for users. When the system boots, display-manager.service runs /usr/lib/X11/display-manager which runs /etc/X11/xdm/keytable. The latter sources vconsole.conf and mis-parses it: it ignores xkblayout, xkboptions, and xkbmodel, and runs localectl (with an implicit --convert) with just $KEYMAP and $KEYMAP_TOGGLE. Since "emacs2" is a valid kbd (console) map, but not directly one for X11 nor one mapped in /usr/share/systemd/kbd-model-map, localectl does the reasonable (for systemd) thing and panics, deleting 00=keyboard.conf and truncating vconsole.conf. So there is certainly a bug here with localectl/systemd-localed, but that is another matter (for someone who has figured out how to communicate with the systemd devs). Here, the bug is basically that keytable seems to be expecting a version of vconsole.conf from an earlier era of systemd and thus does not parse the added options. Probably this has been going on for some time, but was not noticeable until 00-keyboard.conf went from "read and parsed by systemd-localed" in openSUSE 15.5 to "Written by systemd-localed" in 15.6. Other contents of vconsole.conf lead to other bugs: losing existing xkboptions is pretty much guaranteed, but what else happens is highly variable. I do not understand the use case for keytable. If these files are to be managed by the pair of systemd-localed and localectl, keytable seems surplus to requirements. If it is in fact useful, then it needs to understand the whole of (v. 254.10's) vconsole.conf and (conditionally) build an appropriate commandline for localectl. E.g., relying on KEYMAP +/- kbd-model-map only makes sense if XKBLAYOUT is unset.
Closing as dup. *** This bug has been marked as a duplicate of bug 1226347 ***