I have asked the power manager to lock the screen when suspending to ram, but it doesn't. This has happened on every computer I have tried it on. Incidentally, I run archlinux and I have tried it on 32- and 64-bit computers.
I was going to open a bug but I will just add to this. In my case doing this fixes the issue: xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false I'm not using lightdm. Can you share your details before I add more info to this bug?
(In reply to Federico G. Schwindt from comment #1) > In my case doing this fixes the issue: > > xfconf-query -c xfce4-power-manager -p > /xfce4-power-manager/logind-handle-lid-switch -s false This has had no effect. > Can you share your details before I add more info to this bug? My dm is slim, though I have tried startx as well, with the same results. All logind settings are set to their defaults. That is if xfce4 hadn't started, logind would be handling lid and button events and executing the various default actions. I have also tried disabling logind's lid and button handling. This has had no effect.
As a temporary workaround, I have done the following: xfce4-session-logout --suspend; slock Replace slock with whatever screen-locking solution you use. This works from sh-like shells. It can be mapped to a global keyboard shortcut like Fn-sleep or given an alias in the shell. Hibernation is basically the same: xfce4-session-logout --hibernate; slock I can't understand why the power manager can't just do this by itself!
I'm also using xfce with slim and works fine in my case after setting the property I mentioned to false. Can you share the output for these 2 commands? xfconf-query -c xfce4-power-manager -l -v xfconf-query -c xfce4-session -l -v
[eric@lazarus ~]% xfconf-query -c xfce4-power-manager -l -v /xfce4-power-manager/brightness-level-on-battery 1 /xfce4-power-manager/brightness-on-battery 17 /xfce4-power-manager/brightness-switch 0 /xfce4-power-manager/brightness-switch-restore-on-exit 0 /xfce4-power-manager/critical-power-action 1 /xfce4-power-manager/lid-action-on-ac 0 /xfce4-power-manager/lid-action-on-battery 0 /xfce4-power-manager/logind-handle-lid-switch false /xfce4-power-manager/show-tray-icon 1 [eric@lazarus ~]% xfconf-query -c xfce4-session -l -v /general/FailsafeSessionName Failsafe /general/SaveOnExit false /general/SessionName Default /sessions/Failsafe/Client0_Command <<UNSUPPORTED>> /sessions/Failsafe/Client0_PerScreen false /sessions/Failsafe/Client1_Command <<UNSUPPORTED>> /sessions/Failsafe/Client1_PerScreen false /sessions/Failsafe/Client2_Command <<UNSUPPORTED>> /sessions/Failsafe/Client2_PerScreen false /sessions/Failsafe/Client3_Command <<UNSUPPORTED>> /sessions/Failsafe/Client3_PerScreen false /sessions/Failsafe/Client4_Command <<UNSUPPORTED>> /sessions/Failsafe/Client4_PerScreen false /sessions/Failsafe/Count 5 /sessions/Failsafe/IsFailsafe true /splash/Engine [eric@lazarus ~]%
Sorry for the late reply, but what happens if you call "xflock4"? Does it lock your session as expected? Theoretically it should support slock and xfce4-power-manager uses this script (usually residing in /usr/bin) to lock your session.
@Eric: I also forgot about this. Judging by the xfconf-query output, it doesn't look like you have instructed xfce to lock the screen at all. Have you set up the respective settings under power manager?
I just doublechecked the Power Manager settings, and "Lock screen when system is going for sleep" is indeed checked. When I call xflock4, the screen does lock.
The line I don't see in your xfce4-session output is this: /shutdown/LockScreen true What versions of xfce4-session and xfce4-power-manager are you using exactly? Thing is, at some point this setting was handled by both the power-manager and the session, which seemed like an unnecessary and confusing duplication, so we made the xfce4-session-settings dialog handle it and the "lock screen on suspend" checkbox should only show up in xfce4-power-manager when used without xfce4-session.
Name : xfce4-power-manager Version : 1.4.4-1 Name : xfce4-session Version : 4.12.1-3 This is on x86-64 archlinux with slim as a DM. XFCE is started with "exec startxfce4" in ~/.xinitrc. I found the setting in the power manager settings. Looks like it should never have appeared there, though. I found the second setting you mentioned in the "Session and Startup" UI under "Advanced". It works just fine. So, yay? I have a workaround now. Thanks! The problem remains, but it looks like the problem *really* is that "lock screen" appears in the power manager settings when it shouldn't.
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/12. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev