Package: xfce4-power-manager
Version: 1.2.0-2
Severity: normal
Tags: patch
User: pkg-systemd-maintainers@lists.alioth.debian.org
Usertags: systemd-logind
Hi,
when systemd-logind is active it will by default react to power events
and execute the actions configured in /etc/systemd/logind.conf.
A desktop environment usually wants to handle such events on their own.
E.g. they want to lock the screen on suspend or hibernate or show a
confirmation dialog before shutdown when the power button is pressed.
For that, the desktop environments are supposed to grab an inhibitor
lock [1] for the events it wants to handle.
There is a command line tool systemd-inhibit [2] which you can use to
inspect currently active locks and it can also be used to grab a lock.
As a desktop environment, you can either stick a call like
"systemd-inhibit --what=handle-lid-switch:handle-power-key:handle-suspend-key:handle-hibernate-key"
in your session start script or you let your desktop session component
responsible for power management grab that lock. This is e.g. how it's
done in GNOME, where gnome-settings-daemon is grabbing the lock and in
KDE, where PowerDevil, does the same.
There exist patches for xfce4-power-manager to use the logind inhibit
API and also use the suspend/shutdown/shutdown/reboot D-Bus API provided
by logind. Please not, that a working suspend/shutdown/shutdown/reboot
requires functionality from systemd, as logind will forward those
request to the running systemd process.
The patches are available at [3], specifically
a/ xfce4-power-manager-systemd-inhibit.patch
b/ xfce4-power-manager-systemd-shutdown-reboot-support.patch
c/ xfce4-power-manager-systemd-suspend-hibernate-suport.patch
You can choose to only apply a/ and continue to use upower, even when
systemd is active. But as you are already aware, the suspend/hibernate
functionality is going to be removed from upower 1.0, so it makes sense
to include b/ and c/ as well.
If you have further questions, please ask.
Michael
[1] http://www.freedesktop.org/wiki/Software/systemd/inhibit/
[2] http://www.freedesktop.org/software/systemd/man/systemd-inhibit.html
[2] https://build.opensuse.org/package/show/X11:xfce/xfce4-power-manager