Skip to content

Linux.md


Disable Sleep on Lid Close

How laptop behave when we press the power button or close the lip can be controlled with a file in the systemd dir called logind.conf.

  • Modify the file and add/uncomment the following.

    HandleLidSwitch=ignore
    HandleLidSwitchExternalPower=ignore
    HandleLidSwitchDocked=ignore
    
  • Then restart the service: sudo systemctl restart systemd-logind


References: