Public bug reported:

Xfce power-manager allows to configure individual actions for the lid
close event for battery and AC mode. However, if one is set to suspend
the system suspends always despite it might be configured otherwise for
the current state.

I believe this happens because 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.

I get this on all up-to-date xubuntu 16.04 installations.

** Affects: xfce4-power-manager (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1623385

Title:
  Suspend on lid close can not be configured individually for battery/AC

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1623385/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to