Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1921947 - Live installer fails to run on current Rawhide Plasma / KDE: "RuntimeError: Gtk couldn't be initialized."
Summary: Live installer fails to run on current Rawhide Plasma / KDE: "RuntimeError: G...
Alias: None
Product: Fedora
Classification: Fedora
Component: kwin
Version: 34
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
Whiteboard: openqa
Depends On:
Blocks: F34BetaBlocker
TreeView+ depends on / blocked
Reported: 2021-01-28 22:37 UTC by Adam Williamson
Modified: 2021-02-12 21:49 UTC (History)
15 users (show)

Fixed In Version: kwin-5.20.90-4.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-02-12 21:49:48 UTC
Type: Bug

Attachments (Terms of Use)
Screenshot of Anaconda working with xhost + (deleted)
2021-02-07 09:50 UTC, Neal Gompa
no flags Details
Diff of the environment variables between GNOME and KDE Plasma (deleted)
2021-02-07 11:02 UTC, Neal Gompa
no flags Details

System ID Private Priority Status Summary Last Updated
KDE Software Compilation 432625 0 NOR RESOLVED KWin does not set up Xauthority socket in the Plasma Wayland session, breaking Anaconda 2021-02-12 20:32:20 UTC

Description Adam Williamson 2021-01-28 22:37:25 UTC
Trying to run the live installer on current Rawhide KDE images fails with this output:

[liveuser@localhost-live ~]$ liveinst 
Starting installer, one moment...
anaconda 34.20-1.fc34 for Fedora 34 (pre-release) started.
 * installation log files are stored in /tmp during the installation
 * shell is available on TTY2 and in second TMUX pane (ctrl+b, then press 2)
 * when reporting a bug add logs from /tmp as separate text/plain attachments
No protocol specified
No protocol specified
Traceback (most recent call last):
  File "/sbin/anaconda", line 516, in <module>
    display.setup_display(anaconda, opts)
  File "/usr/lib64/python3.9/site-packages/pyanaconda/", line 359, in setup_display
  File "/usr/lib64/python3.9/site-packages/pyanaconda/", line 284, in initInterface
    self._intf = GraphicalUserInterface(None, self.payload,
  File "/usr/lib64/python3.9/site-packages/pyanaconda/ui/gui/", line 554, in __init__
    self.mainWindow = MainWindow(fullscreen=fullscreen, decorated=conf.ui.decorated_window)
  File "/usr/lib64/python3.9/site-packages/pyanaconda/ui/gui/", line 261, in __init__
  File "/usr/lib/python3.9/site-packages/gi/overrides/", line 515, in __init__
    raise RuntimeError(
RuntimeError: Gtk couldn't be initialized. Use Gtk.init_check() if you want to handle this case.

This does not happen on the Workstation image, so it's something to do with the KDE environment (possibly related to its recent switch to Wayland?), but I'm not sure what. CCing rdieter.

Comment 1 Adam Williamson 2021-01-28 22:38:11 UTC
This is a clear violation of , "The installer must run when launched normally from the release-blocking images."

Comment 3 Adam Williamson 2021-01-29 23:29:10 UTC
So...not really figured this out yet, but got a bit more data anyway.

It broke between 20210124.n.0 and 20210127.n.1 (there are no successful composes between those too), by the looks of things. anaconda didn't change in 01217.n.1, and neither did anything GTK+-y or gobject-y that I can see. What did change is indeed plasma-workspace, from 5.20.90-3 to 5.20.90-5, which included the systemd user sessions change.

The problem seems to be that GTK initialization is failing at the bottom of gi/overrides/ , where it does (for GTK+ 3, which is what we're on) `initialized, argv = Gtk.init_check(sys.argv)` . If you add a debug print right there, it shows that `initialized` winds up as False. The console line "No protocol specified" is printed during this check, but I'm not sure if that's significant or not.

I reduced to what should be a simple reproducer, but it *doesn't* reproduce, at least not when run directly:

    import sys

    from gi.repository import GObject
    from gi.module import get_introspection_module

    Gtk = get_introspection_module('Gtk')
    initialized, argv = Gtk.init_check(sys.argv)


if I run that directly as liveuser or root, it prints True. So either something else about what does, or what gets done before it, or about running through consolehelper, results in the different outcome, I guess.

Comment 4 Adam Williamson 2021-01-29 23:30:32 UTC
re-assigning to plasma-workspace, at least tentatively.

Comment 5 Neal Gompa 2021-02-04 04:18:19 UTC
Switching off systemd user sessions by renaming /etc/xdg/startkderc to /etc/xdg/startkderc.disabled does not fix this.

I attempted to run Anaconda (by running liveinst in Konsole) and still get the same traceback as I do with systemd user sessions enabled.

Comment 6 Neal Gompa 2021-02-04 04:36:12 UTC
(In reply to Neal Gompa from comment #5)
> Switching off systemd user sessions by renaming /etc/xdg/startkderc to
> /etc/xdg/startkderc.disabled does not fix this.
> I attempted to run Anaconda (by running liveinst in Konsole) and still get
> the same traceback as I do with systemd user sessions enabled.

I forgot to mention, I rebooted between those runs where I disabled or enabled systemd user sessions. Since Anaconda is installed on an installed system, I attempted to run that from Konsole, and that's where I saw the tracebacks.

Comment 7 Rex Dieter 2021-02-04 13:09:52 UTC
I can reproduce this on fedora 33 plasma wayland session as well. plasma x11 session starts ok.

Comment 8 Neal Gompa 2021-02-07 09:50:01 UTC
Created attachment 1755447 [details]
Screenshot of Anaconda working with xhost +

Some *weird* progress...

I was able to get Anaconda to run by doing the following (in Rawhide 20210206.n.0 build):

$ xhost +
$ liveinst

That causes Anaconda to start up correctly and I can run through installation.

Comment 9 Neal Gompa 2021-02-07 11:02:17 UTC
Created attachment 1755462 [details]
Diff of the environment variables between GNOME and KDE Plasma

I took a sample of the environment variables between GNOME and KDE with the same Rawhide compose, and attached the output of the diff between the two.

The main differences I note that might have an impact:

* No XAUTHORITY variable pointed to Xauthority socket
* Different value for DISPLAY

I suspect the lack of Xauthority socket is the failure mode here.

Comment 10 Neal Gompa 2021-02-07 11:08:09 UTC
This is likely caused by Kwin, since it starts the Xwayland bits in the Wayland session...

Comment 11 Rex Dieter 2021-02-07 14:28:21 UTC
When investigating a prior sddm issue, I found it only sets xauthority bar for x sessions.  We could consider setting it unconditionally.

Comment 12 Neal Gompa 2021-02-07 22:14:38 UTC
liveinst-setup does some "xhost" stuff, but it doesn't work:

I tried it manually, and "xhost +si:localuser:root" does not work in Plasma. This is *definitely* because of the difference in Wayland session initialization in Plasma vs GNOME. Even switching to GDM does not fix it.

Comment 13 Neal Gompa 2021-02-07 22:32:28 UTC
I've filed a bug upstream with KDE:

Comment 14 Adam Williamson 2021-02-08 18:23:56 UTC
Thanks for figuring that out, Neal!

Comment 15 Neal Gompa 2021-02-08 18:33:54 UTC
I've cherry-picked a fix proposed upstream into our kwin package[1] and notified upstream that it fixes our issue in my local testing.

I've pushed a build into Koji too:

It should be fixed with the next compose.


Comment 16 Ben Cotton 2021-02-09 16:13:51 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 17 Ben Cotton 2021-02-12 20:36:54 UTC
FEDORA-2021-2a1eb24b14 contains a potential fix. Setting to ON_QA.

Comment 18 Adam Williamson 2021-02-12 21:49:48 UTC
Yes, this is indeed fixed now.

Note You need to log in before you can comment on or make changes to this bug.