logind.conf not working, closing lid will not suspend laptop
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
logind.conf not working, closing lid will not suspend laptop
I am running Fedora 22 on a Dell Latitude E6230. At some point I got a software patch that broke the laptop suspending when I close the lid. It was working, and now it is not. I am not sure what patch caused this, or why. I am also a newbie to Linux (but not computers), so sorry if I did not investigate something I should have.
What I have looked into:
I tried un-commenting these lines in /etc/systemd/logind.conf and then rebooting:
sudo journalctl -b -u systemd-logind
shows that the lid is detecting that it is closing and opening.
I tried installing gnome-power-manager... but this seemed to have no effect.
I installed gnome tweak tool and set "don't suspend on lid close" to "off". In playing with this, I also changed "power button action" to "hibernate", yet the power button just turns the laptop off, and closing the lid still does not suspend it.
I then went back to /etc/systemd/logind.conf and un-commented the lines:
PHP Code:
HandlePowerKey=suspend HandleSuspendKey=poweroff
Yes, that is backward... but this setting did not take hold. I.e., even after a reboot, the power button still turns the laptop off, and the suspend button will suspend the laptop. This seems to prove to me that the /etc/systemd/logind.conf file and the gnome tweak tool setting do not have any effect.
I tried this command... but I am not 100% what it does:
PHP Code:
gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup do-nothing
I found this on one of the threads. I did notice at this point that closing the lid while on the dock will suspend the laptop.
I thought that maybe there was some double negative action going on. I changed these lines just to test:
Yes, I noticed similar a while back - a systemd update replaced the logind.conf. Resolution for me was to simply replace "HandleLidSwitch=suspend" and restart systemd-logind. This is on a Dell Studio XPS.
So you seem to have been looking in the right area. I'd be guessing you have some other power manager running that is conflicting. But that's just a guess.
update: I got another software update. Now the laptop will suspend any time I close the lid, even on the dock. It should not suspend while on the dock as I have put the setting "HandleLidSwitchDocked=ignore" back. Also, and power and suspend buttons remain impervious to suggestions of change.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.