[systemd-devel] logind's .PowerOff and .Reboot methods doesn't seem to respect inhibitors
Troels Mæhl Folke
t.r.o.e.l.s.m.f at gmail.com
Wed Dec 9 12:20:12 PST 2015
Hello,
I've had problems getting systemd-logind to respect shutdown inhibitors when
I ask it over DBus to power off or reboot.
Here is what I've tried:
In one gnome-terminal as non-root, I type:
systemd-inhibit --what=shutdown --mode=block --who=unison unison-gtk2
...to set up the inhibitor.
Then next, in another gnome-terminal - also as non-root - I type:
busctl call org.freedesktop.login1 /org/freedesktop/login1 \
org.freedesktop.login1.Manager PowerOff b true
...to start the shutdown process. This succeeds without any
polkit-interaction and the shutdown process is started,
even though I haven't closed unison-gtk2. It also succeeds with false
as the parameter.
On the other hand, if I run 'systemctl poweroff' as non-root, the
inhibitor is respected.
I'm running systemd 228 on Arch Linux x86_64.
Best Regards,
Troels
More information about the systemd-devel
mailing list