I upgraded my system today from Fedora 14 to 15 using the preupgrade tool. Everything went VERY smoothly. My nVidia card (Quadro FX 880M) is completely supported with full hardware acceleration, which is awesome!
But the first thing I noticed once I booted into Gnome 3 was that, when I closed my laptop lid, the system went into suspend mode. Not what I want to have happen: unless I'm on battery, I want the system to just blank the screen when I close the lid.
I went into power settings and could not find a setting for what to do when the lid is closed. Something that was very easy to find in past, but now is not obvious.
So a quick google search turned up this solution:
To set the action when the laptop lid is closed, simply enter the following commandline:
gsettings set org.gnome.settings-daemon.plugins.power lid-close-MODE-action “ACTION”
where you replace MODE with either ac or battery depending on which mode you're setting, and replace ACTION with blank, suspend, hibernate or shutdown.
But the first thing I noticed once I booted into Gnome 3 was that, when I closed my laptop lid, the system went into suspend mode. Not what I want to have happen: unless I'm on battery, I want the system to just blank the screen when I close the lid.
I went into power settings and could not find a setting for what to do when the lid is closed. Something that was very easy to find in past, but now is not obvious.
So a quick google search turned up this solution:
To set the action when the laptop lid is closed, simply enter the following commandline:
gsettings set org.gnome.settings-daemon.plugins.power lid-close-MODE-action “ACTION
where you replace MODE with either ac or battery depending on which mode you're setting, and replace ACTION with blank, suspend, hibernate or shutdown.
I guess it doesn't work for see the following output:
ReplyDelete[root@localhost john]# gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action “blank”
0:expected value
try to put the action without quotes as in:
Deletegsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action blank
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action suspend
Strange. I just enter the same command on my system and it worked fine:
ReplyDelete(mcpierce@mcpierce-laptop:~)$ gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action "blank"
(mcpierce@mcpierce-laptop:~)$
I see you entered it as root. Does root have a Gnome desktop setting?
Thank you very helpful!!!
ReplyDeleteDon't enter as root or sudo will not work.
Actually if you download the Gnome Tweak Tool and click on the shell tab it has the settings for closing the laptop lid.
ReplyDeleteThanks a ton Larry. Remembering names of apps such as that is much better than trying to remember commands on top of everything else you have to know.
ReplyDeleteThanks, I had remembered reading about the fact that GNOME devs decided to remove this setting, and then forgot about it. Installed Fedora last night, started installing a bunch of stuff, closed the lid (not all the way even) to go to sleep without the light disturbing, woke up this morning, and opened my laptop to discover the download hadn't progressed since I closed the lid and that wifi had turned off. This is exactly the behaviour I hated on my old iBook, where you would have to wait for the damn thing to actually shut down before closing the lid, or it would suspend/hibernate (I'm just not a fan).
ReplyDeleteFunny, I would like the default setting but it doesn't work for me. :) Close-when-on-battery works, close-when-on-AC works, close-when-on-dock doesn't...
ReplyDeletethanks you for writing this blog entry. it worked perfect on my fedora 15 x86_64 installation.
ReplyDeleteWorked.
ReplyDeleteI just got used to suspend on lid close. Worked on F16.
ReplyDeleteThanks, worked great! F16
ReplyDeleteNice, worked. For those who are getting "expected value", "value out of range", etc, try to put the action without quotes as in:
ReplyDeletegsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action blank
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action suspend
None of these work in Fedora 16. I've used gnome-tweak-tool and did the command line (both with and without the quotes). On ac power, shutting the lid suspends. when I reopen the lid, it is totally horked and I need to reboot.
ReplyDeleteCan you post the specific command line you tried? Also, what sort of laptop and which kernel version are you using?
DeleteHey Nathan,
DeleteI had the same problem on Fedora 18. The problem was with systemd APCI overriding the gnome settings. The fix was to edit the line in /etc/systemd/logind.conf containing "HandleLidSwitch" to:
HandleLidSwitch=ignore
and restart the service:
systemctl restart systemd-logind.service
Hope this helps.
Thank you! Fedora 17 x86
ReplyDelete