Zorin OS 17.2 Lite Freezes after kept idle (laptop lid closed)

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-F1 to get to a terminal to shutdown -r 0 properly
  • or, from said terminal, top to see running processes, find the xfce4 screensaver process and its PID number then kill pidnumber then ctrl-alt-F7 to get back to normal screen

After more experimentation, I understand this:

  • For changes to HandleLidSwitch in "/etc/systemd/logind.conf" to have any effects, it's crucial that the boolean logind-handle-lid-switch be set to true in Xfce's Settings editor, or via command line, as shown in my reply above.
  • Once that is set true then 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 logind manage 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:

  1. let Power Manager, not logind, manage the Lid (set logind-handle-lid-switch to FALSE/unchecked in Xfce's Settings editor, xfce4-power-manager )
  2. don't let Power Manager lock (via the "Laptop Lid" and "Security" options in "System" tab)
  3. 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.