Unlocking existing session yields black screen. Closing then reopening XFCE session fails with dbus error. xterm X session + startxfce4 works. Other users are ok.

Bug #1779667 reported by Stéphane Gourichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)
New
Undecided
Unassigned

Bug Description

# Context

* Xubuntu 18.04 using lightdm, no specific customization, no xscreensaver/gnome-screensaver.
* Problem observed two machines:
** one machine with several users often swapping sessions,
** one machine with just one regular user who just locks/unlocks session often

# Action

* Open a XFCE session.
* Lock it.
* On greeter, type password to unlock.

# Expected

* Get back to opened session.

# Observed

* After typing password, screen turns to black. All pixels are fully black.
* Not even a mouse pointer is visible.

# Reproducible

* Seems random.
* Perhaps one time out of 20-50 unlock operations.
* Never occurred in 16.04 14.04

# Detailed information

From start:

* On unlocking an already opened session, after typing password screen turns to full black.

## Investigation: is machine still okay?

* As a sanity check, switching to text VT works, login on text VT works.

## Investigation: problem does not affect all sessions at once

* Bug observed both in one system with one user at a time, and on another system with two users alternating X sessions.
* From tty1, using "dm-tool switch-to-greeter" with proper environment works, allows to select other user's session, type password and return to that other user's opened session. Any attempt to return to affected user session yields black screen.

## Investigation: problem affects user even after closing all their programs

* Manually killing affected user processes allows to close faulty session and see lightdm greeter come back.
* Trying to reopen a session (as usual with lightdm) as affected user shows an error dialog:

"Unable to contact settings server
Failed to connect to socket /run/user/1000/bus: Connection refused"
and a "Close" button.

Clicking on it yields a second dialog :

"Unable to load failsafe session
Unable to determine a failsafe session name. Possible causes:
xfconfd isn't running (D-Bus setup problem);
environment variable $XDG_CONFIG_DIRS is set incorrectly (must include "/etc"),
or xfce4-session is installed incorrectly."
and a "Quit" button.

Clicking "quit" button goes back to lightdm greeter.

## Investigation: reboot solves the problem

* Rebooting the machine solves the problem (but closes all user sessions and processes).
* Problem reappears after a few days.

## Investigation: startx affected, too

* From text VT, startx has same behavior as running from lightdm and thus also cannot reach a working XFCE desktop.

## Investigation: affected user has no dbus-daemon running.

* No "/usr/bin/dbus-daemon" runs as affected user while it runs as other users.

## Additional information

* It is believed that the multi-user system makes the bug more salient than usual workflow because users switch more often from one session to another.
* It is believed that the single-user system makes the bug more salient than usual workflow because users often locks and unlocks their session.

1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu

Description: Ubuntu 18.04 LTS
Release: 18.04

Actually Xubuntu 18.04.

2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center

export LC_ALL=C ; apt-cache policy dbus

dbus:
  Installed: 1.12.2-1ubuntu1
  Candidate: 1.12.2-1ubuntu1
  Version table:
 *** 1.12.2-1ubuntu1 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

3) What you expected to happen
4) What happened instead

Described above.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: dbus 1.12.2-1ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-23.25-generic 4.15.18
Uname: Linux 4.15.0-23-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
Date: Mon Jul 2 13:43:08 2018
InstallationDate: Installed on 2018-05-25 (38 days ago)
InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: dbus
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :
Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

Also, the problem is not specific to any user.

It randomly affects any of the users of the machine. At that moment only that user is affected.

Next time it may affect the same user or another.

We believe that it may affect several users at a time, if we keep the machine running until problem affects a second user. In practice, however, users have some work to do, so we reboot the machine to let them continue their work.

Revision history for this message
Simon McVittie (smcv) wrote :

Please attach anything vaguely relevant-looking from the system log (systemd Journal if you use systemd, or /var/log/syslog). The bug will probably be somewhere in the vicinity of logind, PAM, dbus-daemon, lightdm, X or XFCE, or possibly graphics drivers in the kernel (which have been known to lock up during fast-user-switching), but without looking at the log it's impossible to say which.

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

## Log: soon

Thanks @smcv for your feedback.

I believe ubuntu-bug used to automatically attach a number of log files automatically, it appears it did not this time.

Bug happens several times a week. I have captured a log.

## Workaround!

I wanted to test if running another X session would work.

One session type available in lightdm greeter is "xterm". So I chose that.

Session opens okay and shows xterm. So, X itself is not affected.

I then typed "startxfce4" in the xterm.

* xfce session started quickly but something was different in the appearance, as if the screen DPI was slightly changed.
* xfce4-terminal showed slightly different font. Still "Envy Code R", but different rendering, off-grid. Checking in xfce4-appearance-settings, font hinting parameter was turned off, which was not the usual settings. Setting it back using xfce4-appearance-settings got usual font back in xfce4-terminal.
* thunderbird shows slightly bigger fonts than usual. I cannot compensate this exactly with xfce4-appearance-settings.

dbus-daemon now runs for the user.

# Conclusion

(1) affected user can still run XFCE, but through a xterm session first.
(2) changing title, because affected user *can* run an X session, just not XFCE session from regular lightdm.

summary: - Unlocking existing session yields black screen. Closing session does not
- help as affected user cannot open a successful X session until next
- reboot. Other users are ok.
+ Unlocking existing session yields black screen. Closing then reopening
+ XFCE session shows dbus error, xterm session can run startxfce4. Other
+ users are ok.
summary: Unlocking existing session yields black screen. Closing then reopening
- XFCE session shows dbus error, xterm session can run startxfce4. Other
- users are ok.
+ XFCE session fails with dbus error. xterm X session + startxfce4 works.
+ Other users are ok.
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.