Lock-screen doesn't load after resuming from suspend through the laptop lid switch Steps to reproduce: 1. close lid and let laptop suspend 2. open lid and and resume 3. desktop appears and no lock-screen Expected behavior: After resume from suspend, the lock-screen with password prompt should appear instead of the desktop. What works: Triggering suspend through Whisker Menu or xfce4-session-logout --suspend and resume shows lock-screen Version: xfce4-screensaver 0.1.3 Kernel: 4.19.2 Distro: openSUSE Tumbleweed
When you open the screensaver preferences, is there an infobar with the following text and "Resolve" button? Xfce Power Manager is not configured to handle laptop lid events Your computer may not be locked when you close the lid. Another thing to check is if the "Lock screen when system is going for sleep" in the System tab of Xfce Power Manager settings is enabled. Please let me know your findings. Thanks!
(In reply to Sean Davis from comment #1) > When you open the screensaver preferences, is there an infobar with the > following text and "Resolve" button? Yes it's enabled > Xfce Power Manager is not configured to handle laptop lid events > Your computer may not be locked when you close the lid. > > Another thing to check is if the "Lock screen when system is going for > sleep" in the System tab of Xfce Power Manager settings is enabled. Yes it's enabled > Please let me know your findings. Thanks! I can confirm that Xfce Power Manager is handling the lid actions. There was no such problem in version 0.1.2 of xfce4-screensaver. Also I confirm that other lockers such as xscreensaver or i3 lock work fine with the lid switch too. Please let me know what other info to provide to help debug this.
I was able to debug it with xfce power manager in debug mode. TRACE[xfpm-manager.c:440] xfpm_manager_lid_changed_cb(): LID close event: ((XfpmLidTriggerAction) LID_TRIGGER_SUSPEND) (xfce4-power-manager:19659): xfce4-power-manager-WARNING **: 13:59:25.859: Screensaver lock command not set when attempting to lock the screen. Please set the xfconf property /general/LockCommand in xfce4-session to the desired lock command. This option was missing from my xfconf and it was always looking to load xscreensaver, even if it wasnt running. I am not sure whether it's an upstream bug or the distro's. Adding this line in xfconf brings xfce screensaver back. Although this one is fixed, I think the laptop suspends before xfce4-screensaver has finished loading. When I resume I'm able to see the desktop for a second and then the xfce4-screensaver lock-screen loads. Is there a way for xfce4-screensaver to add a delay to the suspend so that it can fully load before suspend?
I'm closing this report as it's not a xfce4-screensaver bug.