power: the sleep hooks are wanted by the sleep targets, not declared as services
The host reads a one-shot that is not running as having run, so a before-sleep or after-wake unit declared stopped failed on its first apply; drop-ins on the sleep targets pull them in instead.
This commit is contained in:
@@ -73,3 +73,10 @@ again. A machine that said `sleeping` is asleep, not out of touch.
|
||||
|
||||
The lesson from the day this module was written belongs to the dbus module: a full upgrade restarted
|
||||
the system bus live on a workstation, and logins hung until a reboot.
|
||||
|
||||
**Why the sleep hooks are wanted, not enabled.** The host reads a one-shot unit that is not running
|
||||
and has not failed as having run and worked, so a hook unit waiting for a sleep could never be
|
||||
declared stopped. The first version tried that and was refused on its first apply. The two sleep
|
||||
units are therefore not services the mesh manages. They have no install section, and the sleep
|
||||
targets want them through this module's drop-ins (`sleep.target.d`, and `suspend.target.d` with
|
||||
its three siblings) — the same way the laptop module asks for the NVIDIA driver's sleep actions.
|
||||
|
||||
Reference in New Issue
Block a user