system settings
git clone https://git.lucas.co/cce-system-interface.git
cce-power-apply-resume.service (1.3K)
1 [Unit]
2 Description=Re-apply the cce Power page's plan after waking
3 Documentation=file:/etc/cce/power.kdl
4 # The kernel's Mains change event is not a reliable record of a charger
5 # plugged or pulled while the machine slept. Some firmware sends none, and
6 # one that lands during the thaw merges into a cce-power-apply.service run
7 # that sleep froze, which then applies what it read before sleeping. That
8 # happened on 2026-10-02: the machine woke on AC in the battery mode, with
9 # animations off. Each sleep target is reached only once the machine is
10 # awake again, so ordering after them is "on resume".
11 #
12 # This runs the applier directly, not by starting cce-power-apply.service,
13 # because the start would merge into that same frozen run. Two runs at once
14 # are harmless: each reads the source again when it finishes.
15 #
16 # Wanted by the sleep targets, so unlike the udev-started unit this one does
17 # nothing until it is enabled. X-CceEnable tells `ccebuild install-system`
18 # to enable it (systemd ignores X- keys).
19 After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
20 ConditionPathExists=/etc/cce/power.kdl
21
22 [Service]
23 Type=oneshot
24 ExecStart=/usr/bin/cce-power-apply apply
25
26 [Install]
27 WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
28 X-CceEnable=yes