Fedora 17 and 18: How to disable auto suspend when laptop lid is closed

Right after install Fedora 17 with LXDE (and update to 18), I noticed this annoying behavior when closing the laptop lid: it just stop replying pings and went to sleep, even with the AC power plugged in.

Since I didn’t have the GNOME config tools available here (and didn’t want to install tons of libs and applications just to config this), I investigated a bit and found that logind was the culprit for that. After google a bit more, I’ve found this procedure that solves the issue:

All you have to do is edit the file /etc/systemd/logind.conf (as root) and uncomment/set the variable “HandleLidSwitch” to “ignore”, as in the example below:


With this change, reboot your system (or just restart your display manager (thanks dmelo87)) and feel free to close your laptop lid that it will no longer go to sleep inadvertently.

Source: https://bbs.archlinux.org/viewtopic.php?id=154368