! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Suspends on lid close on AC power even if set to lock screen
Status:
RESOLVED: DUPLICATE
Product:
Xfce4-power-manager
Component:
General

Comments

Description Julian Gilbey 2016-08-11 16:01:25 CEST
Created attachment 6770 
Screenshot of settings window

Hi!

This bug has been reported against the Debian package of 1.4.4, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800890

I have just tried with 1.6.0, and have the same problem.

Attached is a screenshot of the XFCE4 Power Manager settings; when I shut the lid on AC power, the system suspends.

Best wishes!
Comment 1 lilgulps 2016-08-26 04:47:40 CEST
I can confirm I am also seeing this issue on the following version of the power manager:

xfce4-power-manager 1.4.4-2

Seems like even if both battery and AC power are set to turn off display the power manager suspends when the laptop lid is closed.

I believe the suspend is the default for systemd, it seems like the xfce-power-manager settings are being ignored.
Comment 2 b3nmore 2016-11-28 20:22:44 CET
This is most likely caused by the light-locker integration. More specifically by xfpm_update_logind_handle_lid_switch in xfpm-settings.c:

logind-handle-lid-switch = true when: lock_on_suspend == true and (lid_switch_on_ac == suspend or lid_switch_on_battery == suspend)

That means, that xfpm unconditionally removes the handle-lid-switch inhibitor. Instead xfpm should check the power mode (battery/AC) and only remove the inhibitor if it is actually configured to do so for the current power mode. Of course this check must be repeated on every change of the power mode.

Test case:
On eg. AC mode set the lid close action for battery mode to suspend and for AC mode to eg. lock screen.
systemd-inhibit --list shows that the handle-lid-switch inhibitor is removed.
Closing the lid in AC mode consequently lets logind handle the event, which defaults to suspend.
Comment 3 feynfor 2017-01-31 04:43:50 CET
Fedora 25 XFCE spin. Power manager version 1.6.0.
same problem here.
Comment 4 b3nmore 2018-04-23 11:36:04 CEST
This is a duplicate of bug 12088. As comment 2 and bug 12088, comment 0 respectively show, xfpm in the current design can not handle a setup were the lid close action is either to lock the screen or to suspend depending on the actual power state (although the ui suggests it).
Comment 5 Junaid Ahmed 2018-04-30 21:37:03 CEST
Confirmed on Xubuntu 18.04, it was also present on Xubuntu 17.10.
xfce4-power-manager 1.6.1
Comment 6 Simon Steinbeiss editbugs 2020-05-26 23:50:31 CEST

*** This bug has been marked as a duplicate of bug 15300 ***

Bug #12756

Reported by:
Julian Gilbey
Reported on: 2016-08-11
Last modified on: 2020-05-26

People

Assignee:
Ali Abdallah
CC List:
9 users

Version

Attachments

Screenshot of settings window (52.63 KB, image/png)
2016-08-11 16:01 CEST , Julian Gilbey
no flags

Additional information