how to disable suspension in Ubuntu 20.04?
by linuxUser247 from LinuxQuestions.org on (#5AFQR)
How can i disable suspension in Ubuntu 20? I think i solved my problem but i wanted someone to look over it.
I applied the following solution:
Code:sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
based on https://askubuntu.com/a/1043652/881300
and this is perfectly working. I now am no longer able to select these options in the power off menu from the desktop.
Is this only disabled for the user or also for the system? I don't have `pm-hibernate` installed.
I tried to apply this solution to additionally disable automatic suspension. But the path to the file does not exist, i think it changed from
`/etc/polkit-1/localauthority/50-local.d/com.ubuntu.disable-suspend.pkla` to
`/etc/polkit-1/localauthority.conf.d/50-localauthority.conf`
but the file contents are very different.
I found this but power settings are no longer available.


I applied the following solution:
Code:sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
based on https://askubuntu.com/a/1043652/881300
and this is perfectly working. I now am no longer able to select these options in the power off menu from the desktop.
Is this only disabled for the user or also for the system? I don't have `pm-hibernate` installed.
I tried to apply this solution to additionally disable automatic suspension. But the path to the file does not exist, i think it changed from
`/etc/polkit-1/localauthority/50-local.d/com.ubuntu.disable-suspend.pkla` to
`/etc/polkit-1/localauthority.conf.d/50-localauthority.conf`
but the file contents are very different.
I found this but power settings are no longer available.