1.15 Disable Sleeping Processes (Suspending) - Tomato6966/Debian-Cheat-Sheet-Setup GitHub Wiki
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
sudo nano /etc/systemd/logind.conf
[Login]
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
Then save (CTRL+S) and exit (CTRL+X)
systemctl restart systemd-logind.service
sudo nano /etc/systemd/sleep.conf
AllowSuspend=no
AllowHibernation=no
Then save (CTRL+S) and exit (CTRL+X)
sudo reboot