1

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.

  • 1
    what's the output of systemctl list-unit-files | grep sleep ? – intika May 27 at 16:53
  • @intika Updated question with the information – Perl Ancar May 28 at 3:45
  • 1
    can you add the output of systemctl list-unit-files --user and systemctl list-unit-files also please explain what are you trying to achieve with mark/unmark? suspend settings should not require you to play with systemd settings – intika May 28 at 9:38
  • 1
    Just install the plasmoid "Caffeine Plus" you will be able to prevent/revert sleep with a click – intika May 29 at 16:14
  • 1
    Well i guess that daemon-reload is not enough to re enable the sleep target, and service relying on sleep.target needs to be reloaded as well to make it work, you can try to start systemd-suspend.service, this will make the system sleep then check if the sleep work after that or try to enable/disable suspend service instead of masking/unmasking the target (because reboot solve the issue). – intika May 29 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.