LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   logind.conf not working, closing lid will not suspend laptop (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/logind-conf-not-working-closing-lid-will-not-suspend-laptop-4175550982/)

4art4 08-17-2015 02:49 PM

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:

    PHP Code:

    HandleLidSwitch=suspend
    LidSwitchIgnoreInhibited
    =yes
    HandleLidSwitchDocked
    =ignore 

  • 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:

    PHP Code:

    HandleLidSwitch=ignore
    HandleLidSwitchDocked
    =suspend 

    And the result is that the laptop no longer suspends while on the dock when the lid is closed, nor when the laptop is off the dock.
  • At no time are any external monitors hooked up.
So what the heck am I missing? What can override these settings?

ugjka 08-18-2015 08:40 AM

Check yum or dnf history, it would be a blessing if you could figure out which update possibly broke things

syg00 08-18-2015 08:50 AM

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.

4art4 08-18-2015 06:26 PM

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.

still broken... just in a different way.


All times are GMT -5. The time now is 05:13 AM.