Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#61177 - [systemd] systemd 240 breaks graphical login

Attached to Project: Arch Linux
Opened by figue (figue) - Wednesday, 26 December 2018, 15:42 GMT
Last edited by Dave Reisner (falconindy) - Friday, 04 January 2019, 17:20 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Dave Reisner (falconindy)
Christian Hesse (eworm)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 9
Private No


When I login from lightdm or tty (using startxfce4), this message appears:

Failed to connect to socket /tmp/dbus-gZSu5AMyoH: Connection refused

XFCE doesn't start. Revert systemd to 239.370 and XFCE works normally.

Additional info:
* systemd 240.0 from [testing]
* lightdm + XFCE

Steps to reproduce:
Upgrade to systemd 240. Restart lightdm. XFCE doesn't start.

Patches to solve the issue, thanks to Manjaro forum:

also these commits need to be reverted:
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 04 January 2019, 17:20 GMT
Reason for closing:  Fixed
Additional comments about closing:  testing/systemd-240.0-2
Comment by Pryka (Pryka) - Wednesday, 26 December 2018, 17:56 GMT
I'm on KDE Plasma no issue with login. But I think my topic on arch forums can be related to this. My programs can't connect to gnome-keyring and kdewallet spiting around dbus errors. Downgrade systemd to 239 fix the issue for me as well.

Or should I make new ticket for that?
Comment by loqs (loqs) - Wednesday, 26 December 2018, 19:02 GMT Comment by loqs (loqs) - Wednesday, 26 December 2018, 19:42 GMT xfce4-session launches its own session when DBUS_SESSION_BUS_ADDRESS is not set.
Comment by figue (figue) - Wednesday, 26 December 2018, 22:05 GMT
Thanks loqs. So maybe not all patches are needed in my case...

If it helps:
figue@pluto ~ % echo $DBUS_SESSION_BUS_ADDRESS

Comment by loqs (loqs) - Thursday, 27 December 2018, 01:34 GMT
Possible cause of the chromium errors
Comment by loqs (loqs) - Thursday, 27 December 2018, 12:37 GMT
@figue can you please try patching xfce4-session with the first patch attached here and test with systemd 240 without 2b2b7228bffef626fe8e9f131095995f3d50ee3b reverted
The second patch should not be needed as xfce4-session supplies usr/bin/xfce4-session.
Comment by figue (figue) - Friday, 28 December 2018, 21:23 GMT
I'll be on vacation until next week. Will try ASAP. Thanks!
Comment by loqs (loqs) - Saturday, 29 December 2018, 17:14 GMT
Upstream bug report for xfce4-session opened by Debian in 2016
Comment by Christian Hesse (eworm) - Saturday, 29 December 2018, 23:11 GMT
Pushed xfce4-session-4.12.1-9 to [testing].
Comment by Balló György (City-busz) - Saturday, 29 December 2018, 23:16 GMT
The login is also broken for me with systemd 240.0-1 to GNOME and MATE.
Comment by loqs (loqs) - Saturday, 29 December 2018, 23:42 GMT Comment by Christian Hesse (eworm) - Sunday, 30 December 2018, 00:24 GMT
I do not have any gnome, cinnamon, mate or lxde boxes around... So I can not test and verify any packages.

Wondering if we should assign this to all *-session maintainers or split this bug for the effected packages...
Comment by Balló György (City-busz) - Sunday, 30 December 2018, 00:41 GMT
What was changed in systemd 240?
What should be changed in each desktop sessions?
Comment by loqs (loqs) - Sunday, 30 December 2018, 00:55 GMT pam_systemd: drop setting DBUS_SESSION_BUS_ADDRESS
session managers are exec'ing dbus-launcher if $DBUS_SESSION_BUS_ADDRESS is not set
Comment by Balló György (City-busz) - Sunday, 30 December 2018, 01:08 GMT
So the 'dbus-launch' command should not be run in any circumstances? Is it fine to comment out the whole code block?
Comment by Balló György (City-busz) - Sunday, 30 December 2018, 01:16 GMT
@eworm: I think you could add heftig and JGC to assignees. I would like to see their fix for gnome-session before I touching lxsession and maybe others in [community].
Comment by loqs (loqs) - Sunday, 30 December 2018, 01:22 GMT
Recommendations for desktop sessions
Desktop sessions may execute dbus-launch if they are started with
DBUS_SESSION_BUS_ADDRESS absent from the environment, and either
XDG_RUNTIME_DIR unset, or a socket named $XDG_RUNTIME_DIR/bus not existing
or owned by the wrong uid.
My understanding is libdbus will provide the right session bus according to the above rules if the whole code block is commented but it does not seem ideal.
Comment by Evangelos Foutras (foutrelis) - Sunday, 30 December 2018, 03:43 GMT
I made xfce4-session actually set DBUS_SESSION_BUS_ADDRESS, otherwise Chromium refuses to connect to the user bus. [1]

I think we need an /etc/X11/xinit/xinitrc.d script that sets DBUS_SESSION_BUS_ADDRESS. (Debian and Ubuntu do this. [2])

(Trying to "fix" each individual component that depends on DBUS_SESSION_BUS_ADDRESS is an exercise in futility IMO.)

Comment by Evangelos Foutras (foutrelis) - Sunday, 30 December 2018, 04:07 GMT
Also inquired upstream for a revert:
Comment by Janne Pettersson (wincc) - Sunday, 30 December 2018, 14:46 GMT
This fix works for me (xfce4-session-4.12.1-9).
Comment by Steve (Roken) - Sunday, 30 December 2018, 20:22 GMT
The fix worked for me using xfce4, but given the same issue surround other DMs, wouldn't it be better to use the debian/ubuntu solution as suggested by Evangelos Foutras?
Comment by loqs (loqs) - Sunday, 30 December 2018, 20:45 GMT
Hopefully the upstream bug report will produce guidelines on what the expected behavior of a session manager is for the dbus session bus.
Comment by Evangelos Foutras (foutrelis) - Sunday, 30 December 2018, 21:48 GMT
I've just realized that the xinitrc.d script won't work on Wayland (so it's not a complete fix). As a result, Chromium might still be broken there. [1]

Comment by Eli Schwartz (eschwartz) - Monday, 31 December 2018, 00:53 GMT
With systemd 240 installed, attempting to log in to cinnamon using lightdm results in messages along the lines of "could not connect to session bus: failed to connect to socket /tmp/dbus-xxxxxxxxxxxx: Connection refused" and cinnamon refusing to start. I'm told that using other lightdm greeters (not the default) does not display this problem...

When using startx/sx to start X.Org from the tty, cinnamon starts fine, although DBUS_SESSION_BUS_ADDRESS is "unix:abstract=/tmp/dbus-JJcsstx152,guid=3c6e16344be5812d943a5e645c294a46". chromium does not report any bus issues on stderr, didn't check further as I don't typically use chromium.
Comment by Pryka (Pryka) - Monday, 31 December 2018, 07:57 GMT
@eschwartz chromium/chrome will report issues only if you decide to store encrypted cookies or/and store passwords both need kwallet or gnome-keyring to do this. Otherwise, it will run with --password-store=basic. And store everything in a more insecure way without reporting any issues.
Comment by André Vitor Matos (andre.vmatos) - Wednesday, 02 January 2019, 00:32 GMT
My solution is to add the following line:
to ~/.pam_environment
Comment by Heinrich Siebmanns (Harvey) - Wednesday, 02 January 2019, 10:49 GMT
I suspect I have somthing related at least it sounds a bit like my problem:
My graphical login with sddm to kde using NIS provided users is failing as well with 240.0
relevant lines from journalctl:
Starting User Manager for UID 1000...
user@1000.service: Failed to determine user credentials: Invalid argument
user@1000.service: Failed at step USER spawning /usr/lib/systemd/systemd: Invalid argument
user@1000.service: Failed with result 'protocol'.
Failed to start User Manager for UID 1000.