I just installed elementary OS 5.1. I'd like to know how to set the laptop to not go into sleep mode and not ask for the password every time.

I did go into power control and set everything for never, however it still goes into sleep mode.

  • 1
    Disabling sleep mode is not very advisable for your computer's battery and do not ask for the password even less, in case your computer is stolen or someone malicious has come to your computer. Why you like to do that? Dec 15, 2019 at 9:16
  • I am looking for something similar, all I want is that when the laptop (ThinkPad X1 E) is plugged in, do NOT go to sleep. It can turn off the display, but I dont want the system to go into sleep mode. I have it set (when on battery) to never sleep. But it always goes to sleep even with the battery plugged in. Jun 8, 2020 at 19:34

1 Answer 1


How do not ask password after suspend with elementary OS?

Check the value of the configuration

$ gsettings get apps.light-locker lock-on-suspend

If true : The screen will be locked when the computer goes to sleep
If false : Screen will not be locked when computer goes to sleep


$ gsettings set apps.light-locker lock-on-suspend 'true'


$ gsettings set apps.light-locker lock-on-suspend 'false'

How to never suspend my laptop on elementary OS?

In command line

Check config

# AC Mode
gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type
# Battery Mode
gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type
  • blank
  • suspend
  • shutdown
  • hibernate
  • interactive
  • nothing
  • logout

# AC mode
$ gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout
#Battery Mode
$ gsettings get org.gnome.settings-daemon.plugins.power sleep-battery-ac-timeout
  • 0 = NEVER
  • 300 = 5 min
  • 600 = 10 min
  • 900 = 15 min
  • 1800 = 30 min
  • 2700 = 45 min
  • 3600 = 1 hour
  • 7200 = 2 hours
# AC Mode
gsettings ste org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing
# Battery Mode
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type nothing
# AC mode
$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
#Battery Mode
$ gsettings set org.gnome.settings-daemon.plugins.power sleep-battery-ac-timeout 0

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.