How to disable auto suspend when laptop lid is closed in Fedora 18/17

I don’t prefer my laptop to switch to suspend state when my laptop lid is closed. So I found an easy way to disable suspend when lid is close.

Here is how is it done:

  • Open Terminal
  • type in the command below (as root)

<strong>sudo gedit /etc/systemd/logind.conf</strong>

  • Now the logind.conf file will open in Gedit text editor
  • set the variable “HandleLidSwitch” to “ignore”, as in the example below:

[Login] #NAutoVTs=6 #ReserveVT=6 #KillUserProcesses=no #KillOnlyUsers= #KillExcludeUsers=root #Controllers= #ResetControllers=cpu #InhibitDelayMaxSec=5 #HandlePowerKey=poweroff #HandleSuspendKey=suspend #HandleHibernateKey=hibernate HandleLidSwitch=ignore #PowerKeyIgnoreInhibited=no #SuspendKeyIgnoreInhibited=no #HibernateKeyIgnoreInhibited=no #LidSwitchIgnoreInhibited=yes

  • Now reboot

With this change, reboot your system and feel free to close your laptop lid that it will no longer go to sleep. Now you are done!

Enjoy!

Published by Darryl

A visual effects artist and compositor, self learner, Linux enthusiast and Programmer and can write in Python and Rust. Contributor to open source projects.