12

In power settings, suspend is disabled. However, the PC still goes into a suspend state after approximately 30 minutes. This behavior does not happen under Ubuntu Budgie on another SSD in the same PC. This is a desktop, not a laptop. Is the behavior intended, or is there a way to disable this that I'm not finding?

1
  • I also noticed this, even on beta. And now in a fresh final release, I has just now masked the services, and follow now how it works. Dec 7, 2018 at 15:34

2 Answers 2

16

This is a known bug: https://github.com/elementary/switchboard-plug-power/issues/89

There's a workaround near the (current) bottom of the page:

This problem is because the power settings are used from the gconf configuration of the user lightdm, and not the current user. Just test:

sudo su
su - -s /bin/bash lightdm
gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type

If you change the settings of the user lightdm, the problem disappears

A little further down, it says you need to set the key to "nothing" (still as the lightdm user):

dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing

You might get a message No protocol specified, which you can ignore.

5
  • After the last command I get back No protocol specified. Is this the expected result?
    – Gabriel
    Mar 31, 2019 at 23:50
  • 1
    @Gabriel I also got that message, but it works for me nonetheless. Apr 4, 2019 at 8:42
  • I'm having this problems since i remember. Finally i can solve it with this tip , thank you . I like elementary os because of its style and simplicity i just added latest mesa from oibaf and latest liquorix kernel and i can say i'm pretty satisfied with my system. Now i'm gonna install it on my laptop too. This bug was disabling me for making it my dail driver cause i always leave my pc on downloading torrents,games from steam etc etc I wish it will be fixed on future updates it should have to be fixed cause its very old bug.
    – chrissss
    Jan 16, 2020 at 6:50
  • 1
    Don't use the Oibaf PPA! It does not package mesa releases but daily git snapshots. I think it's irresponsible of them that they removed the acoording disclaimer from the PPA description. Use the Ubuntu HWE packages, which privide updated mesa and kernel release packages. Jan 17, 2020 at 7:42
  • I tried this solution on Elementary Hera, the computer doesn't suspend now, but I cannot use the sleep / shutdown function from the menu, only the power buttons turns off the pc.
    – funder7
    Dec 12, 2020 at 7:50
2

I had the same issue. I had set "Suspend when inactive" to "Never", but it would still suspend when idle.

Because I don't care to EVER put this system into suspend mode (automatically or otherwise), I also did another couple of things:

I set the power button action to "do nothing".

And I did this command from the Debian wiki, to completely disable any suspend actions:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Now it doesn't suspend itself. I suspect that the systemctl command was the specific thing that did the trick, but I haven't done any further tests to see whether the power button setting also helped.

5
  • 1
    BTW my understanding was that this issue was fixed in 5.1, but the bad suspend behavior persists in my setup after upgrading to 5.1. Dec 4, 2019 at 5:26
  • 1
    My mistake, looks like we are waiting for this to merge: github.com/elementary/greeter/pull/343 Dec 4, 2019 at 5:33
  • I tried it and expected it to work on my system but it still suspends
    – Lurch
    Mar 18, 2020 at 5:44
  • The way I worked around the issue is simply after implementing those instructions to install Screensaver, then my screen doesn't shut down and I can recuperate my system.
    – Lurch
    Mar 19, 2020 at 14:24
  • Please add also the command to rollback the operation: sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target. I used it on Hera and the computer didn't respond to suspend/halt anymore
    – funder7
    Dec 12, 2020 at 20:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.