Right after install Fedora 17 with LXDE (and update to 18), I noticed this annoying behavior when closing the laptop lid: it just stop replying pings and went to sleep, even with the AC power plugged in.
Since I didn’t have the GNOME config tools available here (and didn’t want to install tons of libs and applications just to config this), I investigated a bit and found that logind was the culprit for that. After google a bit more, I’ve found this procedure that solves the issue:
All you have to do is edit the file /etc/systemd/logind.conf (as root) and uncomment/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
With this change, reboot your system (or just restart your display manager (thanks dmelo87)) and feel free to close your laptop lid that it will no longer go to sleep inadvertently.
man you have resolve my problem , i am so thankfull to you.
Hi there,
I’m new in fedora and linux.
So, I have the same problem with my notebook when closing the lid.
I did the change in logind.conf, but the notebook still goes to suspend-mode.
I also tried “lock” and “poweroff”. No difference.
Is this a problem of my notebook?
Can anybody help me?
Thanks,
smiler
Hi smiler,
I’d try debugging systemd actions by editing /etc/systemd/system.conf and defining ‘LogLevel=debug’ (remember also to remove the ‘#’ from the beginning of the line). Then restart the system (or your display manager, as dmelo87 mentioned right below), close and open the lid and see if there is something related to suspend/hibernate on ‘journalctl’.
Hope it helps a bit, and let us know how it goes.
Thanks for the comment.
Instead of reboot the system, you just need to restart you display manager (service gdm restart, in my case).
I haven’t tried that, good to know that it works too.
Thanks for the tip!
Pingback: LXDE, Arch and shutting the laptop lid | The Fox from Switzerland
Since the admin of this web page is working, no hesitation very quickly it will be famous, due to its feature contents.
Pingback: Fedora laptop setup – Dell Inspiron 1420 | h@ck4ly57
I got what you intend, thankyou for putting up.Woh I am glad to find this website through google. It is a very hard undertaking to seek to please everybody. by Publilius Syrus. gcdcaebdgbgb
Pingback: AUTODEKOR s.r.o. 3M Armatur Design Cockpit Dekor
Hi,
It Works to mi on Centos 7.
Greetings