Created
June 4, 2021 10:43
-
-
Save Piotr1215/bbdd23b5118ed489d3ae8ff81c7f8250 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Thanks for dropping a comment!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Helpful script, thanks for share.