How to stop GNOME 3 in Fedora 19 from suspending the laptop when the lid is closed

I thought you could take care of turning off suspend when the laptop lid is shut under GNOME 3 by using GNOME Tweak Tool. That doesn’t work.

Automatic suspend when the lid is closed doesn’t work for me because suspend/resume doesn’t function on my HP hardware, and I’d like to close the damn lid every once in awhile without having to do a hard boot afterward.

It’s the little things.

So I dug in a bit and found out in the Fedora Forum what you have to do (thanks to forum poster jvroig):

In a terminal:

su -
cd /etc/systemd/
gedit logind.conf

Once you’re in logind.conf, uncomment (i.e. remove the #) on this line:

#HandleLidSwitch=suspend

Then change “suspend” to “lock”

It should now read like this:

HandleLidSwitch=lock

Save and close the logind.conf file.

Once you reboot, closing the lid should lock the screen and not suspend the laptop.

Note: Xfce doesn’t suffer from the same inability as GNOME 3 to control what happens when you close the laptop lid.

Alternate instructions if you want to use vi and sudo:

Open a terminal and type:

$ sudo vi /etc/systemd/logind.conf

Change this line:

#HandleLidSwitch=suspend

to this (remove #, replace suspend with lock):

HandleLidSwitch=lock

Save and close the file in vi, then reboot.

One thought on “How to stop GNOME 3 in Fedora 19 from suspending the laptop when the lid is closed

Comments are closed.