upower "Resuming" signal is not emitted or seen

Antoine Martin antoine at nagafix.co.uk
Sun Mar 16 22:03:40 PDT 2014


On 16/03/14 22:36, Antoine Martin wrote:
> On 16/03/14 22:30, Michael Biebl wrote:
>> 2014-03-16 15:54 GMT+01:00 Antoine Martin <antoine at nagafix.co.uk>:
>>> On 16/03/14 21:28, Michael Biebl wrote:
>>>
>>> Newer upower versions no longer emit that signal since this handled by
>>> systemd.
>>>
>>> OK, I hope there a new signal I can listen for?
>> http://www.freedesktop.org/wiki/Software/systemd/logind/
>>
(snip)
>>
>> Does that help?
> It does!
> I had seen that page like a dozen times, but somehow missed the
> "PrepareForSleep with argument False" everytime.
For reference, I am attaching a sample script which fires when the
system suspends or resumes.

Are there any reasons not to keep backwards compatibility here?
By that, I mean keeping both the old "upower Resuming" signal as well as
the new "login1 PrepareForSleep" interface.
For one, the old interface is much nicer, widely used, and uses more
sensible and meaningful names for signals.
But more importantly, I don't see why system power events would belong
in the "login manager" at all. A login manager may use power events, it
should not own them.
For instance, I could be running graphical applications on a systemd
enabled system without necessarily having a login manager installed or
running. And I would still expect to receive power event notification.

Thanks
Antoine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: watch_PrepareForSleep.py
Type: text/x-python
Size: 689 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/devkit-devel/attachments/20140317/d701ac59/attachment.py>


More information about the devkit-devel mailing list