Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatpak-system-update.service fails to start: Cannot autolaunch D-Bus without X11 $DISPLAY #168

Open
1player opened this issue Dec 7, 2023 · 7 comments
Labels

Comments

@1player
Copy link

1player commented Dec 7, 2023

Dec 04 11:06:17 tranquility systemd[1]: Starting flatpak-system-update.service - Flatpak Automatic Update...
Dec 04 11:06:17 tranquility flatpak[423203]: These runtimes in installation 'system' are pinned and won't be removed; see flat>
Dec 04 11:06:17 tranquility flatpak[423203]:   runtime/org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/23.08
Dec 04 11:06:17 tranquility flatpak[423203]: Nothing unused to uninstall
Dec 04 11:06:18 tranquility flatpak[423210]: error: Cannot autolaunch D-Bus without X11 $DISPLAY
Dec 04 11:06:18 tranquility systemd[1]: flatpak-system-update.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 11:06:18 tranquility systemd[1]: flatpak-system-update.service: Failed with result 'exit-code'.
Dec 04 11:06:18 tranquility systemd[1]: Failed to start flatpak-system-update.service - Flatpak Automatic Update.

Looks like flatpak/flatpak#3847

Of course it works when I execute the commands manually. I'm pretty sure it used to work months ago, and it's only recently that I find that my Flatpaks are not updating automatically anymore.

@1player 1player changed the title flatpak-system-update.service fails to start flatpak-system-update.service fails to start: Cannot autolaunch D-Bus without X11 $DISPLAY Dec 7, 2023
@ArtikusHG
Copy link
Contributor

I will (probably) take a look at that tomorrow or in the next few days at least. Was the upstream issue ever resolved? The one you linked doesn't seem so

@ArtikusHG
Copy link
Contributor

Unfortunately I cannot reproduce the issue on my machine, the service runs fine for me. Can you provide a bit more details about your system, what image you're using, etc.?

@1player
Copy link
Author

1player commented Dec 8, 2023 via email

@ArtikusHG
Copy link
Contributor

I'm on silverblue and I don't get this, the fact that it's different on kinoite is weird. Does the same error pop up when calling the daemon manually? (not the command - the daemon, by running systemctl start flatpak-system-update.service)

@1player
Copy link
Author

1player commented Jan 14, 2024

Just fixed this annoying issue by prepending /usr/bin/dbus-launch to each flatpak invocation in the systemd unit, as suggested by flatpak/flatpak#3847

Snip:

ExecStart=/usr/bin/dbus-launch /usr/bin/flatpak --system uninstall --unused -y --noninteractive ; /usr/bin/dbus-launch  /usr/bin/flatpak --system update -y --noninteractive ; /usr/bin/dbus-launch /usr/bin/flatpak --system repair

To answer your previous question, yes the issue was easily reproducible by running systemctl start flatpak-system-update.service

@nicorum
Copy link

nicorum commented Mar 26, 2024

Hi I get exactly the same error on kinoite. The fix from 1player solves the problem for me. Maybe GNOME starts something in the background which is not started by KDE?
I installed kinoite in january and the flatpak-system-update.service never worked for me.

@1player
Copy link
Author

1player commented Mar 26, 2024

Keep in mind that recent Fedora versions have adopted dbus-broker, so /usr/bin/dbus-launch doesn't exist any more but should instead be replaced with /usr/bin/dbus-run-session

I noticed a few days ago that my flatpaks were not being updated any more because of this. This is my current ExecStart line for reference:

ExecStart=/usr/bin/dbus-run-session /usr/bin/flatpak --system uninstall --unused -y --noninteractive ; /usr/bin/dbus-run-session  /usr/bin/flatpak --system update -y --noninteractive ; /usr/bin/dbus-run-session /usr/bin/flatpak --system repair

Also, I'm back on GNOME/Silverblue and still was able to reproduce the DBus issue, so it does not strictly affect KDE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants