My laptop is running KDE on LinuxMint 18.3. Automatic suspend was working so far. KDE version is 5.8.9, Framworks version 5.36.0. QT version 5.6.1, kernel version 4.10.0-38-generic.
In the Energy Saving module's dialog box, Suspend session is turned on and set to, e.g. after 10 minutes.
I then did a 'systemctl mask sleep.target' as root, followed by 'systemctl unmask sleep.target' to restore it.
After this, automatic suspension no longer works. After 10 minutes, the laptop is still not suspended. The screen is blank and locked. After I unlock, the Authentication Required dialog box is showing up and is asking for password, instead of suspension being done automatically.
Manual suspend via pm-suspend still works.
How do I fix this?
UPDATE 2019-05-28 #1: Output of
systemctl list-unit-files | grep sleep:
systemd-hybrid-sleep.service static hybrid-sleep.target static sleep.target static
UPDATE 2019-05-28 #2: The problem seems to heal itself after reboot. But when system is not rebooted, after doing
systemctl mask sleep.target followed by
systemctl unmask sleep.target, automatic suspend action is blocked by the Authentication Required dialog box.
UPDATE 2019-05-28 #3: I'm still trying to find out how to reproduce this consistently. This does not always happen. After I reboot (and the problem disappears), if I do
systemctl mask sleep.target + unmask, automatic suspend sometimes still runs OK.
UPDATE 2019-05-29: To reproduce this, after masking, let time pass so automatic suspend timeout (from Energy Saving setting) is triggering. Then unmask. Afterwards, everytime automatic suspend timeout is triggering, the Authentication Required dialog box is showing instead of automatically suspending.