Disable suspend when the laptop lid is closed on a systemd-based GNU/Linux system:
sudo sed -i 's/#HandleLidSwitch=suspend/HandleLidSwitch=ignore/g' /etc/systemd/logind.conf
sudo sed -i 's/#HandleLidSwitchExternalPower=suspend/HandleLidSwitchExternalPower=ignore/g' /etc/systemd/logind.conf
sudo systemctl restart systemd-logind
If you are in a TTY, you can blank the screen before closing the lid to prevent burn-in.
After running this, come back later and press a key to turn the screen on again.
alias blankscreen='setterm --blank=force; read ans; setterm --blank=poke'
Came here to say this. All three of the major desktop operating systems have built-in controls to ignore the closing of the lid. Being forced to keep the lid open to keep a laptop on is a rookie workaround.
Disable suspend when the laptop lid is closed on a systemd-based GNU/Linux system:
sudo sed -i 's/#HandleLidSwitch=suspend/HandleLidSwitch=ignore/g' /etc/systemd/logind.conf sudo sed -i 's/#HandleLidSwitchExternalPower=suspend/HandleLidSwitchExternalPower=ignore/g' /etc/systemd/logind.conf sudo systemctl restart systemd-logindIf you are in a TTY, you can blank the screen before closing the lid to prevent burn-in. After running this, come back later and press a key to turn the screen on again.
alias blankscreen='setterm --blank=force; read ans; setterm --blank=poke'sir this is a shitpost
Shitposts are serious business. For some.
WELL I AM OFFENDED
Came here to say this. All three of the major desktop operating systems have built-in controls to ignore the closing of the lid. Being forced to keep the lid open to keep a laptop on is a rookie workaround.