Skip to content

In sleep the fan keeps the speed it had #182

Backlog

Description

@Xenolphthalein

As an owner, I want the fan to slow down while the headset sleeps, so that a headset I put to sleep after a hard game
doesn't stay loud.

Now: pico4-fan stops with the rest of the system when the headset sleeps (s2idle), and the MCU keeps the last
speed it was given: after a game the fan runs at full speed through the whole sleep (reported by a user). Nothing in
pico4-power acts on sleep. What PICO OS does with the fan in sleep is not known yet.

Acceptance criteria

  • What PICO OS does with the fan when it sleeps and wakes is known (its fan service and the MCU's commands).
  • The fan does the same here: set before the sleep, and its control back right after the wake.
  • A hot headset that goes to sleep does not overheat (the MCU's or the kernel's own protection stays).
  • Host tests for the sleep hook; on the headset: a sleep after a minute at full speed.

Activity

  1. added
    power
    on Dec 3, 2026
  2. Xenolphthalein commented on Dec 3, 2026

    @Xenolphthalein
    ContributorAuthor

    Landed in overpressure/packages#55 (pico4-power 2026.12.3), on packages' main; it reaches the headset with the next packages release and its pin here.

    What PICO OS does. pxrfanservice sends nothing when the screen goes off. When the VR mode stops (15 to 120 s later) it sets 0 % (A0 0E 00 00 00 AE) within about a second and stops reading the zones; when it starts again, gd32ipdservice wakes the MCU (A0 05 00 3F 00 9A) and the fan loop sends the table's duty at once, from the means as they were.

    Here. A systemd-sleep hook (/usr/lib/systemd/system-sleep/pico4-fan) runs pico4-fan sleep before the sleep and pico4-fan wake after it; the daemon sets 0 %, reads neither zones nor RPM while asleep, and sends the table's duty at once after the wake (the MCU woken first if it answers F1). A daemon that runs a minute after a sleep without a wake takes control back; the hook never stops a sleep. The kernel's throttling and trips are unchanged.

    Checked on the headset: a minute at 100 % (14,406 rpm), then systemctl suspend with an RTC wake: 0 % acknowledged 40 ms before the suspend started, the fan stopped through the sleep (0 rpm read right after the wake), control back at the wake (100 % within 0.2 s). Host tests cover the sleep, the wake, a failed send, the one-minute guard, the dry run, the hook and its CLI.

    Criteria: all four met; open is only the pin of a packages release.

  3. Xenolphthalein commented on Dec 3, 2026

    @Xenolphthalein
    ContributorAuthor

    Pinned on phoenix's main: overpressure/packages 2026.12.3 (#188, 7315231), with the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    power

    Type

    Fields

    Stage

    Awaiting release

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions