Xubuntu frozen when locking screen

To debug

  • Install accountsservice and xserver-xephyr, where:
    • accountsservice for Enhanced user accounts handling.
    • xserver-xephyr for LightDM test mode.

Then run LightDM as an X application for debugging: lightdm --test-mode --debug

  • LightDM's log file is /var/log/lightdm/lightdm.log, you will need root privilege to view it.
  • Or see output of dmesg with sudo dmesg.

List of workaround methods

  • Try to suspend and resume again

    Press CtrlAltF1, then login and type systemctl suspend. Press power button to resume and switch to tty7 by CtrlAltF7. In my case, I did 2 times to escape the blank screen.

  • Use DRI2 instead of DRI3 may solve the problem: https://wiki.archlinux.org/index.php/intel_graphics#DRI3_issues

  • Disable at-spi-dbus-bus.desktop (may NOT work)

    sudo mv -v -i /etc/xdg/autostart/at-spi-dbus-bus.desktop /etc/xdg/autostart/at-spi-dbus-bus.desktop.disabled

  • Replace light-locker with xscreensaver, then reboot.


References:

  • https://wiki.archlinux.org/index.php/LightDM#Testing
  • https://bbs.archlinux.org/viewtopic.php?pid=1671675#p1671675
  • https://bugs.launchpad.net/ubuntu/+source/light-locker/+bug/1320989 with comment #17
  • https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1617471 with comment #25

Well, sudo apt-get install --reinstall xscreensaver may do the work for you. If this doesn't work try sudo apt-get purge --auto-remove xscreensaver && sudo apt-get install xscreensaver.