[systemd-bugs] [Bug 85169] New: Add Avoid field to handle sleep modi (hibernate, suspend, hybrid)
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Oct 18 02:07:44 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=85169
Bug ID: 85169
Summary: Add Avoid field to handle sleep modi (hibernate,
suspend, hybrid)
Product: systemd
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: high
Component: general
Assignee: systemd-bugs at lists.freedesktop.org
Reporter: ewl+freedesktop at lavar.de
QA Contact: systemd-bugs at lists.freedesktop.org
After managing to get my (Debian) system to properly go sleeping using systemd
without the pm framework, I ended with a quite ugly solution where I have a
service that depends on sleep and stops things at start time and (re-)start
them at stop time, so that devices and services that don't like sleep modes are
stopped before and restarted after.
If I didn't miss anything, there isn't such a feature yet, so I would suggest
to add something like a new "Avoid=" field, which would mean for systemd:
- stop the unit before the avoided unit is started
- note down the stopped unit and all stopped dependencies
- once the avoided unit has been stopped, restart all the avoiding units and
what depends on them that was stopped
In this way, a simple "Avoid=sleep.target" added to a service definition would
allow for such units sensible to sleep modes to be stopped and re-started
properly.
A "Avoid=shutdown.target" could similarly be used to have services not starting
automatically to survive a reboot/shutdown cycle if they've been started
manually before.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20141018/1b599ef0/attachment.html>
More information about the systemd-bugs
mailing list