Skip to content

Instantly share code, notes, and snippets.

@Piotr1215
Created June 4, 2021 10:43
Show Gist options
  • Save Piotr1215/bbdd23b5118ed489d3ae8ff81c7f8250 to your computer and use it in GitHub Desktop.
Save Piotr1215/bbdd23b5118ed489d3ae8ff81c7f8250 to your computer and use it in GitHub Desktop.
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
sudo vim /etc/systemd/logind.conf
# Replace whatever values of following to "ignore"
HandleHibernateKey=ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
# Restart the login service
systemctl restart systemd-logind
@sergsoares
Copy link

Helpful script, thanks for share.

@Piotr1215
Copy link
Author

Thanks for dropping a comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment