Categories
Tag Cloud
Disable Sleep Suspend and Hibernation Modes in Ubuntu
- 16
-
Tired of reading? Press play to listen instead. N/B. Might not work on some articles
Ready

Disable Sleep, Suspend and Hibernation Modes in Ubuntu can be achieved by performing several actions using the terminal. Ubuntu usually comes with ‘power management’ enabled. It’ll work just fine for server installs, but this is aimed specifically at the Ubuntu release.
Suspending your system helps save power when you are not using your system. But sometimes you don't want your system to suspend or sleep if you are running an application which should stay active.
Once you have your terminal open, you’re to kill everything that has to do with suspend, sleep, or hybrid-sleep. It’s actually pretty easy. Start by opening said terminal, by pressing CTRL + ALT + T and then enter the following commands:
1. First, you mask ‘sleep.target‘:
sudo systemctl mask sleep.target
2. Then mask ‘suspend.target‘:
sudo systemctl mask suspend.target
3. And mask ‘hibernate.target‘:
sudo systemctl mask hibernate.target
4. Finally, mask ‘hybrid-sleep.target‘:
sudo systemctl mask hybrid-sleep.target
To revert these changes ou can unmask them and that’ll enable them again. This can be achieved by changing the ‘mask’ command to ‘unmask’ and running the commands again.
Verify you actions by using the below command
systemctl status sleep.target
N/B You can change ‘sleep.target’ to one of the above services and check them individually.
I this article was of help, kindly hit the thumbs-up button to help others benefit as well. God bless you in Christ Jesus!