Xfce4-power-manager not respecting laptop lid setting. Regardless of power manager setting (Switch off display or Lock screen), closing the lid always results in suspend on ac or battery. Oddly, this used to work for me a few months ago. Per ToZ "I would suggest creating a bug report and seeing if a developer will have a deeper look." I have tried: xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false and xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -n -t bool -s false No difference all actions still = suspend downgrading upower 0.99.10-1 > 0.99.9-1 No difference all actions still = suspend upgrading xfce4-power-manager 1.6.1 > xfce4-power-manager-git 1.6.1+164 No difference all actions still = suspend xfdesktop -V: This is xfdesktop version 4.13.3, running on Xfce 4.12. Built with GTK+ 3.24.7, linked with GTK+ 3.24.8. Build options: Desktop Menu: enabled Desktop Icons: enabled Desktop File Icons: enabled OS: Antergos Kernel: 5.0.7
Similar report: https://bugzilla.xfce.org/show_bug.cgi?id=15151
Update: Power manager 1.6.2-1 has a minor improvement. If both "On Battery" and "Plugged In" are set to: Switch off display then lid action is as expected on either battery or AC. However, any other combination results in Suspend. I can work with this. Adding this note to the bug report.
I am seeing this problem on my notebook. xfce4-power-manager-1.6.5-1.fc30.x86_64 I'm on Fedora 30 XFCE spin. In Applications->Settings->Power->Plugged In->"Laptop lid is closed" is set to "Lock Screen" ; yet every time I close the lid it suspends. And it doesn't lock the screen. I want it to suspend on battery, But just to lock the screen when plugged in. I see that there is nothing in the conf about lid-action on power.... wwalker@plutonium:~$ xfconf-query -c xfce4-power-manager -l -v /xfce4-power-manager/brightness-level-on-ac 100 /xfce4-power-manager/brightness-level-on-battery 100 /xfce4-power-manager/brightness-switch 0 /xfce4-power-manager/brightness-switch-restore-on-exit 0 /xfce4-power-manager/critical-power-action 1 /xfce4-power-manager/general-notification true /xfce4-power-manager/handle-brightness-keys true /xfce4-power-manager/hibernate-button-action 3 /xfce4-power-manager/inactivity-on-battery 60 /xfce4-power-manager/inactivity-sleep-mode-on-battery 1 /xfce4-power-manager/lid-action-on-battery 1 /xfce4-power-manager/logind-handle-lid-switch true /xfce4-power-manager/power-button-action 3 /xfce4-power-manager/show-tray-icon false /xfce4-power-manager/sleep-button-action 3 This used to work. so I could ssh in while it was in the dock but closed... Should not matter but it is a ThinkPad W530
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false fixes it. I would think change from a bug to a feature that shows something in the xfce4-power-manager to indicate that logind is handling the lid closure, and a check box to set logind-handle-lid-switch -s false
@Wayne Waker Thanks, your command saved my day!!! However, my initial problem was different : - Dual monitors setup - Lid closing was set to suspend - Computer *did* suspend if 2nd monitor *was not* plugged in - Computer *did not* suspend if 2nd monitor *was* plugged in (quickly went to black screen, then woke up) Your command: xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false solved the problem!!!!
We initially made this a hidden option because we felt distributors should set things up for their users in a sane way, because they also decide whether systemd is in use. For power users or admins the hidden option should be enough. We could maybe display an indicator for logind handling the lid, but this could also confuse "regular users" who have little or no idea what logind (or systemd) is.
First, Thank you Simon for helping make xfce what it is. Second, I think we really need that message about lid closure handled by system, for the regular user rather than not having it for the regular user. "regular users" should not be looking in the power manager lid control Unless something is already not working. If it isn't working for them, giving them a UI that looks like it should fix their problem, but doesn't will confuse and frustrate them far more than the confusion of "lid closure handled by systemd". And then they could search the internet for "lid closure handled by systemd" and find this page and others. Without the information that xfce power manager is Not handling the lid closure, even the power users (been on linux since '93 where I had to compile the kernel just to get my Yggdrasil CD to boot) like me are confused, and the regular user will be completely lost.
I have the same issue, here is an observation: - If "Laptop Lid/On battery" is set to "Suspend", xfce4-power-manager sets logind-handle-lid-switch = true and "Laptop Lid/Plugged in" has no effect (bug) - Similarly if "Laptop Lid/Plugged in" is set to "Suspend", xfce4-power-manager sets logind-handle-lid-switch = true and "Laptop Lid/On battery" has no effect (bug) - If both "Laptop Lid/On battery" and "Laptop Lid/Plugged in" are set to "Suspend", xfce4-power-manager sets logind-handle-lid-switch = true (no bug) - If both "Laptop Lid/On battery" and "Laptop Lid/Plugged in" are set to something other than "Suspend", xfce4-power-manager sets logind-handle-lid-switch = false (no bug) The fix would be to let xfce4-power-manager set logind-handle-lid-switch = false as soon as either "Laptop Lid/On battery" OR "Laptop Lid/Plugged in" is set to something other than the default "Suspend" (and there won't be a need for an additional UI indicator)
Created attachment 9356 Fix Laptop Lid settings when (lid_switch_on_ac != 1 || lid_switch_on_battery != 1) LOGIND_HANDLE_LID_SWITCH should be set to False if either lid_switch_on_ac != 1 or lid_switch_on_battery != 1 (where 1 is 'Suspend' and the default logind behavior) Fixes bugs #15300, #15151, #12756, #12088
Just in addition to the answers above, the setting didn't exist for me yet. I needed to create it. sudo xfconf-query -c xfce4-power-manager -n -t 'bool' -p /xfce4-power-manager/logind-handle-lid-switch -s false Then, it worked perfectly. Thanks very much for the answer folks.
I am encountering the same issue with xfce4-power-manager 1.6.1, manually setting 'logind-handle-lid-switch' doesn't work. When either 'ON battery' or "Plugged in" is set to 'suspend', the system suspends anyway. I personally think the fix posted by Remi above is correct. When either 'On battery' or 'Plugged in' is set to something other than 'suspend', it implies that the user wants xfce4-power-manager to take the place of logind to handle lid event, the 'logind-handle-lid-switch' should not be set to true. Could this fix be accepted by the developers?
Remi Salmon referenced this bugreport in commit f89197509bb46e01817e130df2263bea26d2cca9 Fix Laptop lid settings (Bug #15300) https://gitlab.xfce.org/xfce/xfce4-power-manager/commit/f89197509bb46e01817e130df2263bea26d2cca9
*** Bug 12088 has been marked as a duplicate of this bug. ***
@Remi: Thanks for the patch - pushed to Git master. Sorry for the late response/review, I don't have much time for the power manager these days...
*** Bug 15151 has been marked as a duplicate of this bug. ***
*** Bug 12756 has been marked as a duplicate of this bug. ***
*** Bug 12728 has been marked as a duplicate of this bug. ***
*** Bug 13328 has been marked as a duplicate of this bug. ***
*** Bug 16797 has been marked as a duplicate of this bug. ***