Preventing Laptop From Sleeping When Lid Closed?

Home » CentOS » Preventing Laptop From Sleeping When Lid Closed?
CentOS 2 Comments

How can I prevent the laptop from sleeping when the lid is closed. I tried messing with the settings in gnome-power-preferences but that doesn’t seem to prevent it when no one is logged in. Any suggestions?
Thanks, Dave

2 thoughts on - Preventing Laptop From Sleeping When Lid Closed?

  • With C7 that is caused by systemd.

    Somewhere in /etc/systemd/logind.conf there is a option about “suspend” or “lid”

    “grep Lid /etc/systemd/logind.conf” gives:
    logind.conf:#HandleLidSwitch=suspend logind.conf:#HandleLidSwitchDocked=ignore logind.conf:#LidSwitchIgnoreInhibited=yes

    “man 5 logind.conf” for further info on defaults and how to configure.

    – Yamaban.