Summary: | Please hookup suspend/resume code of upower with systemd | ||
---|---|---|---|
Product: | upower | Reporter: | Lennart Poettering <lennart> |
Component: | general | Assignee: | Richard Hughes <richard> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | mclasen |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | prototype |
Description
Lennart Poettering
2012-06-21 09:09:22 UTC
*** Bug 50568 has been marked as a duplicate of this bug. *** The way the upower code is currently structured, this is unfortunately not entirely trivial. upowers Sleep method does not actually return until resume time - ie we are inside a method call when we have to wait for the 'Resuming' signal. And the backend abstraction in upower consists of commandline strings that the daemon frontend spawns, and the suspend/hibernate commands are assumed to not return until resume time. Created attachment 63961 [details] [review] prototype Here is a (largely untested) implementation. Note that the patch only listens for resume from systemd if it triggered the sleep itself. That should possibly be changed to keep the signal handler installed, always, so that emit Resuming even if the sleep has not been initiated by upower. That would allow consumers of Resuming like NM continue to just use the upower signal. (In reply to comment #2) > And the backend abstraction in upower consists of commandline strings that the > daemon frontend spawns Yes, non-ideal. I'll rework this when I have time to port it to gdbus. I've fixed up and tested your patch and pushed it master, many thanks. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.