Blog

Troubleshooting
Full Guide: Disable Ubuntu Sleep Timer (14.04/16/04)
December 19, 2018
11 min read
ai-codes-coding-247791.jpg

This method disables the 'automatic suspend', but should still allow you to 'manually suspend' the system. This method works for Ubuntu 14.04, 16.04 and 18.04.

General Instructions for Disabling Ubuntu Sleep Timer

##run as rootcd /etc/polkit-1/localauthority/50-local.d/touch com.ubuntu.disable-suspend.pklanano com.ubuntu.disable-suspend.pkla ##insert the following[Disable suspend (upower)]Identity=unix-user:*Action=org.freedesktop.upower.suspendResultActive=noResultInactive=noResultAny=no [Disable suspend (logind)]Identity=unix-user:*Action=org.freedesktop.login1.suspendResultActive=yesResultInactive=noResultAny=yes [Disable suspend when others are logged in (logind)]Identity=unix-user:*Action=org.freedesktop.login1.suspend-multiple-sessionsResultActive=yesResultInactive=noResultAny=yes ##save and reboot system

Detailed Instructions for Disabling Ubuntu Sleep Timer

  1. Obtain root permissions by using 'sudo bash'1.png
  2. Change directory (cd) into '/etc/polkit-1/localauthority/50-local.d/2.png
  3. Create the file 'com.ubuntu.disable-suspend.pkla' using the touch command; double check file creation and spelling using 'ls' in the current directory
  4. Edit the file you just created (I used nano)4.png
  5. Add the following (helps if you have SSH access so you can copy/paste the below entry); then user 'ctrl-x', then 'y' to confirm save, then 'enter' to proceed with saving the change
    [Disable suspend (upower)]Identity=unix-user:*Action=org.freedesktop.upower.suspendResultActive=noResultInactive=noResultAny=no [Disable suspend (logind)]Identity=unix-user:*Action=org.freedesktop.login1.suspendResultActive=yesResultInactive=noResultAny=yes [Disable suspend when others are logged in (logind)]Identity=unix-user:*Action=org.freedesktop.login1.suspend-multiple-sessionsResultActive=yesResultInactive=noResultAny=yes
  6. Double-check the entry saved to the file by re-entering the file either through editing the file or using 'cat7.png8.png
  7. Reboot system

last-one.png

Miccrok8s-1024x202.jpg

Free Resources

Browse our whitepapers, e-books, case studies, and reference architecture.

Explore
ai-codes-coding-247791.jpg
Troubleshooting
Full Guide: Disable Ubuntu Sleep Timer (14.04/16/04)
December 19, 2018 11 min read

This method disables the 'automatic suspend', but should still allow you to 'manually suspend' the system. This method works for Ubuntu 14.04, 16.04 and 18.04.

General Instructions for Disabling Ubuntu Sleep Timer

##run as rootcd /etc/polkit-1/localauthority/50-local.d/touch com.ubuntu.disable-suspend.pklanano com.ubuntu.disable-suspend.pkla ##insert the following[Disable suspend (upower)]Identity=unix-user:*Action=org.freedesktop.upower.suspendResultActive=noResultInactive=noResultAny=no [Disable suspend (logind)]Identity=unix-user:*Action=org.freedesktop.login1.suspendResultActive=yesResultInactive=noResultAny=yes [Disable suspend when others are logged in (logind)]Identity=unix-user:*Action=org.freedesktop.login1.suspend-multiple-sessionsResultActive=yesResultInactive=noResultAny=yes ##save and reboot system

Detailed Instructions for Disabling Ubuntu Sleep Timer

  1. Obtain root permissions by using 'sudo bash'1.png
  2. Change directory (cd) into '/etc/polkit-1/localauthority/50-local.d/2.png
  3. Create the file 'com.ubuntu.disable-suspend.pkla' using the touch command; double check file creation and spelling using 'ls' in the current directory
  4. Edit the file you just created (I used nano)4.png
  5. Add the following (helps if you have SSH access so you can copy/paste the below entry); then user 'ctrl-x', then 'y' to confirm save, then 'enter' to proceed with saving the change
    [Disable suspend (upower)]Identity=unix-user:*Action=org.freedesktop.upower.suspendResultActive=noResultInactive=noResultAny=no [Disable suspend (logind)]Identity=unix-user:*Action=org.freedesktop.login1.suspendResultActive=yesResultInactive=noResultAny=yes [Disable suspend when others are logged in (logind)]Identity=unix-user:*Action=org.freedesktop.login1.suspend-multiple-sessionsResultActive=yesResultInactive=noResultAny=yes
  6. Double-check the entry saved to the file by re-entering the file either through editing the file or using 'cat7.png8.png
  7. Reboot system

last-one.png

Miccrok8s-1024x202.jpg

Free Resources

Browse our whitepapers, e-books, case studies, and reference architecture.

Explore