Skip to content

fix: pico4-power turns the fan off for a sleep and gives control back after the wake, as PICO OS does - #55

Merged
Xenolphthalein merged 2 commits into
mainfrom
fix/fan-sleep
Dec 3, 2026
Merged

Xenolphthalein merged 2 commits into
mainfrom
fix/fan-sleep

Conversation

@Xenolphthalein

Copy link
Copy Markdown
Contributor

For overpressure/phoenix#182

PICO OS's fan service sets 0 % when the headset sleeps and stops reading the zones; on the wake the MCU is woken and the table's duty sent at once. pico4-power now does the same through a systemd-sleep hook (/usr/lib/systemd/system-sleep/pico4-fan): pico4-fan sleep / pico4-fan wake signal the daemon and wait up to 2 s for its state file. A daemon that runs a minute after a sleep without a wake takes control back; a failing hook never stops the sleep.

Checked on the headset: a minute at 100 % (14,406 rpm), then a suspend with an RTC wake: 0 % acknowledged before the sleep, control back at the wake. Host tests for the daemon's sleep, the hook and the CLI.

… after the wake, as PICO OS does

systemd-sleep's hook tells pico4-fan before the sleep (duty 0, no sensor reads) and after the wake (the
table's duty at once, from the means as they were); a daemon that runs a minute after a sleep without a
wake takes control back.

For overpressure/phoenix#182
@Xenolphthalein
Xenolphthalein requested review from a team as code owners December 3, 2026 11:22
@Xenolphthalein
Xenolphthalein merged commit a7616b7 into main Dec 3, 2026
24 checks passed
@Xenolphthalein
Xenolphthalein deleted the fix/fan-sleep branch December 3, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant