Since !2445 gnome-kiosk on X.org (as launched by Fedora installer) displays nothing if `/etc/X11/xorg.conf.d/00-keyboard.conf` is present
This is an upstream report of the downstream Fedora 39 bug https://bugzilla.redhat.com/show_bug.cgi?id=2241632 . I've tried to triage and bisect it as best I can.
The bug as we experience it in Fedora is that when we do a kickstart (scripted) install using a kickstart that has a keyboard
directive, on a system with a graphical display, nothing is shown on the screen. (What should be shown is the installer interface proceeding through the install, or pausing for interaction if the kickstart is not complete and some human input is needed). The install does proceed, but the screen is black the entire time.
This is definitely caused by mutter - the bug happens with mutter 45, not with mutter 44. I bisected it further and got it down to six of the commits from !2445 (merged) :
The first bad commit could be any of:
0f88f0931c11431354556b1ffaae082048e98777
3e95609073b3a455693e19e58b365688b7f877ba
a27b9d9707b0c5ccfd6aec3e5f335937c1796429
02a436d607481492a37ad15fcc401abf6385eeff
761a254e6f8b8643ce6530e85daf041f25edc683
15b25568b29ec0e082f6a18fef550078102aaca1
We cannot bisect more!
I can't get any more precise because all the intermediate builds just crash on startup.
When there is a keyboard
directive in the kickstart, what anaconda actually does is ask localed - via dbus - to set the layout. What localed does when asked this is to write a file /etc/X11/xorg.conf.d/00-keyboard.conf
with contents like this:
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us"
Option "XkbModel" "pc105"
EndSection
if I hack up the installer to wipe that file again before starting X, the bug goes away. So it's definitely the presence of that file which triggers the bug, somehow.
The code anaconda uses to start X is here. It's called from here. So pretty much it sets up some signal handlers, then runs Xorg -br -logfile /tmp/X.log :1 vt6 -s 1440 -ac -nolisten tcp -dpi 96 -noreset
. Then the code that runs gnome-kiosk is right after that, and similarly simple - it sets up a signal handler, decides on the XDG_DATA_DIRS
value, then runs gnome-kiosk --display :1 --sm-disable --x11
. Note the comment on that function specifically states that no care is taken to ensure the window manager connects to the X server before anaconda does; the code just trusts the window manager to sort everything out even if anaconda connects first. I've messed around with sticking sleeps in at various points in this process, but haven't found yet that sleeping anywhere makes the bug go away.