Ask Your Question

Preventing Lid Close Suspension

asked 2013-07-05 17:02:26 -0500

maxm11 gravatar image

updated 2014-09-28 08:44:15 -0500

mether gravatar image

I'm a new fedora switch over from Ubuntu, my laptop screen is broken, and I am using an external display, to login to my computer I close the screen to login. Then, after I login and GNOME is loaded it suspends. This is a huge pain, does anyone know how to prevent this suspension.

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2013-07-06 00:43:06 -0500

spot gravatar image

For GNOME, this is now handled by systemd in Fedora 18+.

As root, edit /etc/systemd/logind.conf. You're looking for the definition for HandleLidSwitch, it may be commented out.

The default is: HandleLidSwitch=suspend

You can set it to ignore, poweroff, reboot, halt, suspend, hibernate, hybrid-sleep, lock or kexec. Since your laptop screen is broken, you just want to set it to ignore, so add this to /etc/systemd/logind.conf:


Then, run systemctl restart systemd-logind, or simply reboot for it to take effect.

edit flag offensive delete link more


Thanks, It worked perfectly.

maxm11 gravatar imagemaxm11 ( 2013-07-06 02:07:58 -0500 )edit

Please mark his answer as correct if it helped you

mether gravatar imagemether ( 2013-07-06 23:26:25 -0500 )edit

also working in fedora 19

Hohenheimsenberg gravatar imageHohenheimsenberg ( 2013-09-13 17:28:02 -0500 )edit

unforunaly it does not work for me on Fedora 20. any suggestions?

Antt gravatar imageAntt ( 2014-01-23 05:49:46 -0500 )edit

Worked on Fedora 22.

xyain gravatar imagexyain ( 2015-06-01 20:04:00 -0500 )edit

answered 2016-01-14 17:10:40 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

(additional information for use with Spot's excellent answer)

Each of the following Options:


Can be set to one of the following:
"ignore", "poweroff", "reboot", "halt", "kexec",
"suspend", "hibernate", "hybrid-sleep", "lock".

(more information : )

edit flag offensive delete link more

answered 2018-07-26 10:23:36 -0500

Just stating the obvious - yuo'd need to remove the # at from the beginning of each line you edit, so it will take effect.

edit flag offensive delete link more

answered 2014-04-13 23:06:45 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Works fine with Fedora 20 so thank you. However I'd like no action to be performed when lid is closed except monitor should be switch off. How can I achieve this? Is there any "HandleLidSwitch" option for that?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-07-05 17:02:26 -0500

Seen: 29,089 times

Last updated: Jan 14 '16