Originally Posted by
takeawaydave
Ok that didn‘t work
Show the result of:
Code:
systemctl status sleep.target
Like:
Code:
systemctl status sleep.target
○ sleep.target - Sleep
Loaded: loaded (/usr/lib/systemd/system/sleep.target; static)
Active: inactive (dead)
Docs: man:systemd.special(7)
All right then to disable:
Code:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Result:
Code:
Created symlink /etc/systemd/system/sleep.target → /dev/null.
Created symlink /etc/systemd/system/suspend.target → /dev/null.
Created symlink /etc/systemd/system/hibernate.target → /dev/null.
Created symlink /etc/systemd/system/hybrid-sleep.target → /dev/null.
Now:
Code:
systemctl status sleep.target
○ sleep.target
Loaded: masked (Reason: Unit sleep.target is masked.)
Active: inactive (dead)
If the occasion arises to re-enable it:
Code:
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
Result:
Code:
Removed /etc/systemd/system/sleep.target.
Removed /etc/systemd/system/suspend.target.
Removed /etc/systemd/system/hibernate.target.
Removed /etc/systemd/system/hybrid-sleep.target.