How to make laptop not suspend when the lid is closed

In addition, for laptop with external monitor, you can alter the settings in etc/systemd/logind.conf
e.g. to shut lid and keep laptop from suspend:
Uncomment the following:
LidSwitchIgnoreInhibited=yes
HandleLidSwitch=ignore
Then restart computer

2 Likes