Linux/Sleep Suspend Hibernate

From Wiki
  • disabled sleep modes
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
  • enable sleep modes
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
  • /etc/systemd/logind.conf
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore