Elementary OS Juno. Dell Inspiron 5767. I try to prevent my laptop from suspend after some time of inactivity. I choose "Never" in both Plugged In and On Battery, but Laptop still suspend after some time. And it cannot connect to my wifi network after wake up so I need to reboot laptop every time. Is there any other ways to change this option?


1 Answer 1


Got exactly the same issue on Juno stable, and found the solution here: https://superuser.com/a/1315412

The problem basically comes down to the fact that the power settings are not propagated to the 'lightdm' user, which is the active one on the login screen.

I fixed my issue as follows, copied from the answer in the above link:

sudo -s
su -s /bin/bash lightdm

dbus-launch gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type
dbus-launch gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout

This prints 'suspend' and '1200', respectively.

To turn off suspension, set:

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

UPDATE: If you're getting the No protocol specified issue, as @ankscorek and I ran into after upgrading to Juno 5.1.3, use the following command to add the lightdm user to the access control list:

sudo xhost +SI:localuser:lightdm

before changing to the lightdm user, so before all the above commands.

If above solution does not work (as is for me the case now as well this second time around), you can always ditch the pantheon greeter (as I did):

sudo apt install lightdm-gtk-greeter
  • I attempted to do it. But my pc sleeps even after this setting. Could you help, please.
    – MohananPG
    Commented Oct 23, 2018 at 8:57
  • biemster's answer works for me, I restarted the computer after making the settings change to make sure it's applied.
    – weelillad
    Commented Nov 17, 2018 at 13:53
  • This worked for me on Juno
    – schmoopy
    Commented Nov 27, 2018 at 1:42
  • the output of the command pasted below $ dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing No protocol specified
    – ankscorek
    Commented May 9, 2019 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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