FS#50543 - [xfce4-session] dbus 1.10 prevents X starting correctly

Attached to Project: Arch Linux
Opened by Steve (Roken) - Sunday, 28 August 2016, 10:37 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 03 January 2017, 17:13 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 11
Private No

Details

Description: dbus 1.10.10 removes libdbus, presumably providing it itself now, instead of it being split. Last version of libdbus seems to be 1.10.8

The error provided by my (very limited - no window borders, can't alt-tab etc. No wallpaper) xfce session is

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

The last message on TTY1 (I run X on TTY7) is

a start job is running for user manager for uid 1000

Which has gone to 1min 30 secs and just stops there.

I can get to a fully working desktop again by killing lightdm, which forces a re-login. However, the blinking light on my webcam suggests something is still awry (possibly connected to pulseaudio)

downgrading dbus to 1.10.8-3 and reinstalling libdbus 1.10.8-3 gets things back to normal. For now, I have them added to ignore in pacman.conf.

The only other ignored package is ttf-ms-win10 until I have time to extract and sha256sum the fonts, but since this is an AUR package it shouldn't have any bearing. Everything else is up to date (xorg, xfce4, lightdm) and as far as I know they haven't been updated recently. I can't find anything on the wiki, unless I'm searching for the wrong thing.


Additional info:
* dbus 1.10.10

Steps to reproduce:
Not required. Upgrading from 1.10.8 causes the problem. Downgrading fixes it·
This task depends upon

Closed by  Doug Newgard (Scimmia)
Tuesday, 03 January 2017, 17:13 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Configuration issue
Comment by Ray Maslinski (rmaslinski) - Monday, 29 August 2016, 01:24 GMT
I encountered this as well in a vncserver session running xfce4 after the dbus update (on multiple systems). Commenting out the following line in $HOME/.vnc/xstartup seems to work around the issue:

unset DBUS_SESSION_BUS_ADDRESS

Based on the startup script /etc/xdg/xfce4/xinitrc, it looks like xfce4 startup (possibly through xfce4-session) tries to launch dbus via dbus-launch if above variable is not set, which seems incompatible with the updated dbus package. Comments here https://bbs.archlinux.org/viewtopic.php?id=216001 suggest dbus should be started through systemd rather than dbus-launch.
Comment by Nicky726 (Nicky726) - Monday, 29 August 2016, 07:55 GMT
I encountered this on my machine with KDE lounched by SDDM with error message like: Could not connect to DBUS, can you run qdbus? Running that in terminal resulted in error message about dbus autolaunch by X11 disabled at compile time and a suggestion to set DBUS_SESSION_BUS_ADDRESS. I could not find anything unseting it as Ray, but after some more searching I remembered, that back in 2014 I experimented with X services launched by systemd-user, finally finding some old custom dbus units in /etc/systemd/user (dbus.service and dbus.socket) which of course override the system supplied units (where the DBUS_SESSION_BUS_ADDRESS is set) causing the problem for me.
Comment by frajibe (frajibe) - Tuesday, 30 August 2016, 15:34 GMT
@Nicky726 : thank you, problem solved.
I removed dbus files located at /etc/systemd/user (dbus.service, dbus.socket, default.target.wants/dbus.socket) and SDDM is now visible.
Comment by Steve (Roken) - Tuesday, 30 August 2016, 18:32 GMT
I have no specific dbus services in /etc/systemd/user
Comment by Ray Maslinski (rmaslinski) - Tuesday, 30 August 2016, 19:46 GMT
After a bit more testing, it looks like my workaround of commenting the DBUS_SESSION_BUS_ADDRESS line in vncserver xstartup file only seems to work when vnc is the only X session running for the user. If the user is running an xfce session on the console, then vncserver startup fails with the following messages in vnc log file:

Xvnc TigerVNC 1.6.0 - built Dec 25 2015 15:34:25
Copyright (C) 1999-2015 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11800000, The X.Org Foundation


Tue Aug 30 15:36:42 2016
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
/usr/bin/startxfce4: X server already running on display :1
xfce4-session: Another session manager is already running
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
after 112 requests (112 known processed) with 0 events remaining.
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
after 140 requests (140 known processed) with 0 events remaining.

So it seems like with the new dbus arrangements, xfce fails to start up if it tries to launch dbus (DBUS_SESSION_BUS_ADDRESS not set), or if it tries to use already running dbus and another xfce session is already connected to it (DBUS_SESSION_BUS_ADDRESS set with another xfce session already running for the user and presumably using that dbus address).

I have no files in /etc/systemd/user directory.
Comment by Andy Dicken (andydicken) - Friday, 02 September 2016, 07:27 GMT
I also have no specific dbus services in /etc/systemd/user, so downgraded.
Comment by Ray Clancy (lilsirecho) - Saturday, 03 September 2016, 16:47 GMT
Received the same failure without user file and /tmp/dbus error message.
Severe effect is to prevent boot on all systems in my computer following the upgrade involving libdbus.
Tried a reinstall arch....worked until reboot and then resulted in same fail mode.
System uses all ssd drives and xfce4. In all five ssd's cannot now boot in the computer.
Using another computer to make this report.
As some of you know, I am 91 yrs old.
Ray Clancy (lilsirecho)
Comment by stef binde (steff) - Monday, 05 September 2016, 07:09 GMT
[duplicate sorry]
Comment by stef binde (steff) - Monday, 05 September 2016, 07:42 GMT
Same here, sddm with LXQt or openbox opens an completely unusable session, xsession-errors:
Failed to connect to bus: File o directory non esistente
dbus-update-activation-environment: error: unable to connect to D-Bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead

startx with .~/xinitrc works well instead, I'm using that for the moment.

No dbus files to remove in /etc/systemd/user directory.
This bug affects only my 32bit laptop, both systems are quite similar using SDDM and LXQt
EDIT: Modifying startlxqt with
$ dbus-launch lxqt-session
works well with sddm too.

Comment by stef binde (steff) - Monday, 05 September 2016, 18:34 GMT
Solved here,there was a file /etc/pam.d/systemd-user.pacnew which I missed, everything is working.
# This file is part of systemd.
#
# Used by systemd --user instances.

account include system-login

session required pam_loginuid.so
session include system-login
Comment by Steve (Roken) - Monday, 05 September 2016, 19:49 GMT
Nope - no pacnew files in pam.d. The PKGBUILD "fixes" in place, and the fix is there, but no joy.
Comment by Mikhail Shiryaev (Felixoid) - Wednesday, 14 September 2016, 09:52 GMT
as posted on bbs:
remove dbus-launch --exec-with-session from ~/.xinitrc
Comment by Steve (Roken) - Wednesday, 14 September 2016, 20:18 GMT
Already commented out.
Comment by André (FredericChopin) - Tuesday, 20 September 2016, 05:21 GMT
I'm also affect, although in a different way. I do not use any login manager and have configured automatic login with startxfce4 in my .xinitrc. After upgrading dbus to 1.10.10, the xfce4-session started normally. However, after pressing a media key the session immediately freezes and all associated processes go to state "T". This happens also after a random time, but I do not know, how it is caused, since there is no log-message anywhere (journal, .xsession-erros, .xfce4-session.verbose-log, Xorg.0.log)

I tried several of the suggested fixes here and in the forum on related issues (checked that no dbus-launch is called, deleted dbus.{service,socket} under /etc/systemd/user) with the result, that the session did not freeze anymore, but every program using dbus only started after a certain timeout with error org.freedesktop.dbus.noreply.

Only solution at the moment was to downgrade dbus -> 1.10.8 and to add "dbus-launch xfce4-session" to the .xinitrc and everything went back to normal.

UPDATE 10/22/2016: From some older dbus problem, I had added a drop-in to user@.service "Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/dbus/user_bus_socket", which caused all the trouble. Thanks @Chad for hinting me to this service file. XFCE4 can now be started by calling just startxfce4 from .xinitrc.
Comment by Dan Panzarella (pzl) - Sunday, 25 September 2016, 18:27 GMT
Same situation as André here. No login manager, not even using xfce4. But upgrading to 1.10.10 gives me the multimedia keys (those extra xf86 keys like Mail and Brightness and Volume) freezing my X session. Was not able to track down any logs, not even using xev to record me pressing the key that freezes it all.

Downgrading helped
Comment by Chad Bergeron (laurion) - Thursday, 13 October 2016, 20:05 GMT
Same here as André and Dan. One thing I can add is that xfce4-session seems to segfault as part of the happenings. Have downgraded for now.

For context: debian mailing list confirms that dbus 1.10 deprecates the old dbus-launch method explicitly used by xfce4-session : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836061 and the filed xfce bug is at https://bugzilla.xfce.org/show_bug.cgi?id=12801

Edit: Resolved it for myself.... systemctl --failed confirmed that for some reason user@uid was failing, so I looked into it, and it was timing out because of syncthing. Because it timed out, XDG_RUNTIME_DIR and therefore DBUS_SESSION_BUS_ADDRESS were not being set properly. Check those user service files!
Comment by Weitian Leung (timxx) - Friday, 18 November 2016, 08:31 GMT
Thanks @steff, it works for me changing exec startxfce4 to dbus-launch xfce4-session in ~/.vnc/xstartup. (for tigervnc server)
Comment by Noel Kuntze (thermi) - Monday, 21 November 2016, 15:19 GMT
So what is the ultimate fix here right now for people that didn't do anything to their user session setups?
Comment by Steve (Roken) - Monday, 21 November 2016, 15:50 GMT
I moved ~/.config to ~/.config.bak, to recreate, and then started copying back the important stuff from the backup to the new directory. That got me back up and running. Still don't know what the problem was, though.
Comment by Henrique Capeleiro (henriquemaia) - Sunday, 27 November 2016, 22:55 GMT
As of today, I have the same bug. When I tried to use some altgr combos, my xfce4 session would just freeze. The system was still working, for I could access tty and kill it.

I solved the problem for now downgrading dbus and libdbus to 1.10.8-1, as suggested by other users.
Comment by Noel Kuntze (thermi) - Tuesday, 03 January 2017, 16:59 GMT
I'm still stuck on the old dbus and libdbus versions. Is there a known broken combination to avoid?

Loading...