English
Ask Your Question
6

how do I disable suspend when my laptop is plugged in and closed?

asked 2011-11-22 21:18:25 +0000

goozbach gravatar image

updated 2011-12-03 23:52:04 +0000

mether gravatar image

I want my laptop to only go into suspend mode when it's un-plugged, not when it is plugged in and the lid is closed. How can I disable that?

I'm using fedora 16

edit retag flag offensive close merge delete

Comments

It works this way out of the box in Fedora 19 (Dell Inspiron 17R)

alfC ( 2013-07-11 01:11:17 +0000 )edit

4 answers

Sort by ยป oldest newest most voted
3

answered 2011-12-05 21:26:28 +0000

ztank1013 gravatar image

updated 2011-12-05 21:48:56 +0000

Non command line approach:

Install dconf-editor

sudo yum install -y dconf-editor

then run dconf-editor program and browse to the power leaf :

org -> gnome -> settings-daemon -> plugins -> power

finally set the lid-close-ac-action field either to blank or nothing (but if you care about your planet choose blank, since it will probably save some power...)


Command line approach:

gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action blank

or

gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action nothing
edit flag offensive delete link more

Comments

the command line version should say lid-close-ac-action and not lid-close-battery-action to achieve the goal of the question.

alfC ( 2013-01-20 11:44:38 +0000 )edit

This doesn't work in my Fedora 18. Any ideas? I tried both with dconf-editor and sudo dconf-editor.

alfC ( 2013-03-23 18:35:58 +0000 )edit

worked like a charm on Fedora 17. Thanks!!

shadeslayer84 ( 2013-07-10 15:26:20 +0000 )edit

I have fedora 20 and LXDE desktop, no Gnome. This solution only messes up desktop. Removing dconf-editor solves what it caused. Further assist needed!

laamanni ( 2014-03-25 19:09:22 +0000 )edit

For Gnome 3.X this did not work! Read my solution and vote up if it works for you!

X3MBoy ( 2014-05-20 17:43:43 +0000 )edit
3

answered 2013-03-27 05:27:17 +0000

updated 2017-03-20 16:10:21 +0000

Since fedora choose to use gnome 3.x, the dconf-editor doesn't work. This is because systemd override Gnome's ACPI Settings. A non-elegant solution is to edit /etc/systemd/logind.conf:

su -c 'vi /etc/systemd/logind.conf'

and set HandleLidSwitch to ignore:

HandleLidSwitch=ignore

and then restart systemd

su -c 'systemctl restart systemd-logind.service'

Hope that help

X3MBoy

edit flag offensive delete link more

Comments

Spot on and easy. Thank you !

Sage ( 2013-07-04 00:23:46 +0000 )edit

This worked for me as well, while the other solutions didn't. Thank you!

liko ( 2014-02-06 01:48:40 +0000 )edit

I didn't have to edit anything, I found the line there by default (Fedora 20)

alfC ( 2014-05-21 07:52:41 +0000 )edit

It's weird, the default file is set in 'suspend' and is commented.

X3MBoy ( 2014-05-22 05:13:55 +0000 )edit
1

What are the other possible options? ignore, lock, anything else? I'd like to turn the screen off, but still have the system run.

Ayos ( 2014-11-11 01:36:43 +0000 )edit
2

answered 2011-11-22 21:52:56 +0000

Install gnome-tweak-tool

# su -
# yum install gnome-tweak-tool

After installation, open it and navigate to the left side Shell (entry). You will find on the right hand side options "Laptop lid close action on battery" "Laptop lid close action on AC".

Kindly select whatever you need to do when the Laptop Lid is closed and do a Alt+F2 "r" to reload gnome-shell or if required reboot to check its working for you or not.

edit flag offensive delete link more

Comments

Did the above help you to get your problem resolved ? If yes, can you mark the answer as favourite and help other users to get the correct solution.

SoumyaC ( 2011-12-02 19:08:16 +0000 )edit

Worked for me thanks

Mina Morcose Farage ( 2016-04-29 09:53:30 +0000 )edit
0

answered 2013-07-10 15:27:22 +0000

dconf-editor is very helpful for this kind of tweaking. Not just lid close, it provides a tons of other options. I'll suggest using dconf-editor.

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

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

Follow
2 followers

Stats

Asked: 2011-11-22 21:18:25 +0000

Seen: 52,329 times

Last updated: Mar 20