Troubleshooting

Full Guide: Disable Ubuntu Sleep Timer (14.04/16/04)

December 19, 2018
3 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 root
cd /etc/polkit-1/localauthority/50-local.d/
touch com.ubuntu.disable-suspend.pkla
nano com.ubuntu.disable-suspend.pkla
 ##insert the following
[Disable suspend (upower)]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend
ResultActive=no
ResultInactive=no
ResultAny=no
 [Disable suspend (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultActive=yes
ResultInactive=no
ResultAny=yes
 [Disable suspend when others are logged in (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend-multiple-sessions
ResultActive=yes
ResultInactive=no
ResultAny=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.suspend
    ResultActive=no
    ResultInactive=no
    ResultAny=no
     [Disable suspend (logind)]
    Identity=unix-user:*
    Action=org.freedesktop.login1.suspend
    ResultActive=yes
    ResultInactive=no
    ResultAny=yes
     [Disable suspend when others are logged in (logind)]
    Identity=unix-user:*
    Action=org.freedesktop.login1.suspend-multiple-sessions
    ResultActive=yes
    ResultInactive=no
    ResultAny=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

Topics

ai-codes-coding-247791.jpg
Troubleshooting

Full Guide: Disable Ubuntu Sleep Timer (14.04/16/04)

December 19, 20183 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 root
cd /etc/polkit-1/localauthority/50-local.d/
touch com.ubuntu.disable-suspend.pkla
nano com.ubuntu.disable-suspend.pkla
 ##insert the following
[Disable suspend (upower)]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend
ResultActive=no
ResultInactive=no
ResultAny=no
 [Disable suspend (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultActive=yes
ResultInactive=no
ResultAny=yes
 [Disable suspend when others are logged in (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend-multiple-sessions
ResultActive=yes
ResultInactive=no
ResultAny=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.suspend
    ResultActive=no
    ResultInactive=no
    ResultAny=no
     [Disable suspend (logind)]
    Identity=unix-user:*
    Action=org.freedesktop.login1.suspend
    ResultActive=yes
    ResultInactive=no
    ResultAny=yes
     [Disable suspend when others are logged in (logind)]
    Identity=unix-user:*
    Action=org.freedesktop.login1.suspend-multiple-sessions
    ResultActive=yes
    ResultInactive=no
    ResultAny=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

Topics