I've edited my replies above as it looks like my system was behaving erratically, perhaps because I had forced-shutdown it many times when it was frozen. It turns out that at that seemingly "frozen screen", you can:
- blindly type the password to login "normally".
ctrl-alt-F1to get to a terminal toshutdown -r 0properly- or, from said terminal,
topto see running processes, find the xfce4 screensaver process and its PID number thenkill pidnumberthenctrl-alt-F7to get back to normal screen
After more experimentation, I understand this:
- For changes to
HandleLidSwitchin "/etc/systemd/logind.conf" to have any effects, it's crucial that the booleanlogind-handle-lid-switchbe set totruein Xfce's Settings editor, or via command line, as shown in my reply above. - Once that is set
truethen the Power Manager's options for System -> "Laptop Lid" in are ignored, but other settings within that manager, in particular Security -> "Lock screen when system is going to sleep" are still in effect. - But there's no need to let
logindmanage the Lid switch, unless one doesn't want any of the 3 options for it in Power manager (Suspend, Lock, Switch off display) - The issue with Xfce4 Power Manager is Locking/Unlocking in conjunction with Lid opening (when the Lid is opened, unlocking doesn't show the login screen but the desktop, however it accepts login input to unlock...)
Thus, until Xfce's devs fix that notorious issue, this should work for me:
- let Power Manager, not
logind, manage the Lid (setlogind-handle-lid-switchto FALSE/unchecked in Xfce's Settings editor,xfce4-power-manager) - don't let Power Manager lock (via the "Laptop Lid" and "Security" options in "System" tab)
- When need to, always lock explicitly via Start menu or shortcut keys.
So, Super+L then close lid => when open the lid, unlocks fine regardless whether Lit was set to suspend or just to turn off the screen.