Skip to content

Proposal: Keep fans when closed on AC power #11

Description

@nsd97

Proposal

Add a Settings toggle Keep Fans When Closed on Power (default off) so Performance Mode can keep driving fans in clamshell while awake on AC, without forcing the Mac to stay awake.

Today, lid close often posts NSWorkspace.willSleepNotification (sometimes after screensDidSleep). ChillMac currently always resets fans to auto on willSleep, which undoes “keep fans” preferences even when the user wants fans to stay under app control on power.

Behavior

Setting Power Lid close / display sleep / lock
Keep Fans When Closed on Power on AC Keep fans (do not reset on screen sleep, lock, or willSleep)
Keep Fans When Closed on Power on Battery Fall through to existing Keep Fans on Screen Sleep
Keep Fans on Screen Sleep on Any Keep (unchanged)
Both off Any Reset fans to auto (unchanged)

Non-goals

  • Does not call pmset / private clamshell SPI to prevent system sleep
  • Does not change battery behavior beyond existing Keep Fans on Screen Sleep
  • Apple menu Sleep with keep off still resets fans

Why

Clamshell on AC (external display / docked) is a common “leave it running hot work” setup. Forcing fans to auto on every willSleep fights Performance Mode for that case. Scoping the new toggle to AC keeps battery lid-close conservative.

Implementation sketch

  • Pure DisplaySleepFanPolicy (keepClosedOnPower && onAC → keep; else keepOnScreenSleep)
  • PowerSource.isOnAC via IOPS
  • Wire the same policy into screen sleep, screen lock, and willSleep (the last one is the lid-close footgun)
  • Settings row under Fan Control; export in diagnostics

Happy to send a focused PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions