Skip to content

suspend with screen lock does not work

Commit 32f76126 ("screensaver: Run lock command synchronously (Fixes #70 (closed))") broke suspending with a screen locker.

  • in Settings Power Manager check 'Lock screen when system is going to sleep' (xfconf-query -c xfce4-session -p /shutdown/LockScreen should show true)
  • run xfce4-session-logout -s (or click 'Suspend' from taskbar button)
  • what used to happen: machine is suspended. On resume, screen locker is running.
  • what happens now: machine is not suspended, but screen locker runs! After entering password and unlocking the screen locker, now the machine suspends.

The problem is xfce4-session calls xfce_screensaver_lock before suspending (in xfsm_systemd_lock_screen). If xfce_screensaver_lock blocks, then the suspend is delayed until after the screensaver is unlocked.

Edited by Chris Bainbridge