[Bug 1157122] Re: PrepareFor{Sleep, Shutdown} (false) signals not emitted
Launchpad Bug Tracker
1157122 at bugs.launchpad.net
Tue Mar 26 12:01:19 UTC 2013
This bug was fixed in the package systemd - 198-0ubuntu9
---------------
systemd (198-0ubuntu9) raring; urgency=low
* debian/tests/control: Add libpam-systemd dependency for logind test, as
it checks for the mounted cgroup. Mounting that moved into libpam-systemd,
see 198-0ubuntu7.
* Drop usr/lib/systemd/ from systemd-services, this doesn't belong there and
is already installed into systemd.
* 0016-Add-poweroff-reboot-suspend-hibernate-fallback.patch: Send
PrepareFor{Sleep,Shutdown}() signals with "false" after the operation
finished. Thanks to Iain Lane for the initial patch! (LP: #1157122)
-- Martin Pitt <martin.pitt at ubuntu.com> Tue, 26 Mar 2013 11:08:39 +0100
** Changed in: systemd (Ubuntu)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1157122
Title:
PrepareFor{Sleep,Shutdown} (false) signals not emitted
Status in “systemd” package in Ubuntu:
Fix Released
Bug description:
Per
http://www.freedesktop.org/wiki/Software/systemd/inhibit
"PrepareForShutdown(false) may be subscribed to by applications which
want to be notified about system resume events. Note that this will
only be sent out for suspend/resume cycles done via logind, i.e.
generally only for high-level user-induced suspend cycles, and not
automatic, low-level kernel induced ones which might exist on certain
devices with more aggressive power management. "
(I think it means s/Shutdown/Sleep in the first sentence)
Our systemd has a patch 0016-Add-poweroff-reboot-suspend-hibernate-
fallback.patch which calls the executables from pm-utils in the case
that the systemd D-Bus API isn't available (which is the case for us).
Usually, logind calls shutdown/suspend/... methods via systemd jobs.
In our case, since we call these executables directly, the jobs aren't
used and so the standard systemd Job* signals aren't sent. It's these
signals that logind listens for to know when to emit the
PrepareFor{Sleep,Shutdown} (false) signals.
I attach a strawman patch (diff of a diff - look at it after applying)
which explicitly sends the signal and does some other needed cleanups
(see bus_message_filter for the call site for where the signal is
usually sent). Let me know what you think.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1157122/+subscriptions
More information about the foundations-bugs
mailing list