Linux – Configure linux laptop to switch off screen but otherwise remain running when lid closed

laptoplinuxsystemd

Hi i'm trying to set up an old laptop as a 'server' for testing purposes.

As such, I don't want the screen on all day, however i do want the cpu running 24×7.

Can the 'lid close' switch be configured somehow to simply turn off the screen but otherwise the laptop is running as normal?

FYI: I'm running coreos, but i'm willing to switch to another docker container OS if it makes life easier.

Best Answer

I'm not sure how you missed it in the docs, because when I looked it was plainly there.

Place this in logind.conf:

HandleLidSwitch=ignore
Related Question