Bug 1226819 - /etc/X11/xdm/keytable destroys /etc/X11/xorg.conf.d/00-keyboard.conf
Summary: /etc/X11/xdm/keytable destroys /etc/X11/xorg.conf.d/00-keyboard.conf
Status: RESOLVED DUPLICATE of bug 1226347
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: X.Org (show other bugs)
Version: Leap 15.6
Hardware: x86-64 Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Gfx Bugs
QA Contact: Gfx Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-23 10:08 UTC by Henryk Hecht
Modified: 2024-06-23 11:31 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henryk Hecht 2024-06-23 10:08:57 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.
Comment 1 Stefan Dirsch 2024-06-23 11:31:52 UTC
Closing as dup.

*** This bug has been marked as a duplicate of bug 1226347 ***