English | 简体中文
CurveFan sits in your menu bar and gives you direct control over fan speed through the SMC on Apple Silicon Macs. A privileged LaunchDaemon handles all hardware writes; the UI process stays unprivileged. macOS automatic fan control is always restored when you quit or select System Auto.
Warning — CurveFan writes directly to SMC fan registers. Manual fan control carries thermal risk. Use with care.
| Layer | Technology |
|---|---|
| Language | Swift 6.4 (strict concurrency) |
| UI | SwiftUI + AppKit (NSStatusItem / NSPanel) |
| Charts | Swift Charts — RPM trend, fan curve preview |
| Hardware | IOKit AppleSMC — helper-side only |
| IPC | Unix socket · JSON · 4-byte length-prefixed framing |
| Build | Swift Package Manager |
| Tests | XCTest · no hardware required |
- Menu bar panel — live RPM gauge, CPU/GPU temperatures, fan range
- System Auto — one click restores macOS native fan control
- Fan curve presets — Quiet, Balanced, MaxCool with real-time SMC writes
- Manual RPM — fixed target with hardware bounds clamping
- Batch SMC reads — all temperature keys fetched in a single IPC round trip
- Wake-event recovery — re-applies manual settings after system sleep
- Apple Silicon M1–M5 — generation-aware SMC key database and unlock sequences
CurveFanCore (library) ← shared models, IPC types, SMC decoder, presets
├── CurveFan (SwiftUI) ← unprivileged UI process, talks over Unix socket
└── CurveFanHelper ← root LaunchDaemon, sole SMC / IOKit contact
The app never touches the SMC directly. Every hardware operation crosses a Unix socket as a length-prefixed JSON command. The helper validates all inputs (key format, fan index, RPM range) before writing.
- Apple Silicon Mac (M1 or later) with at least one controllable fan
- macOS 26.0 or newer
- Administrator access (for privileged helper installation on first launch)
Download the latest DMG from Releases.
- Open the DMG and drag CurveFan.app to your Applications folder.
- Double-click CurveFan.app.
- On first launch, CurveFan will ask to install its privileged helper — click Install Helper and enter your password.
- Done. The helper starts automatically at login from this point on.
If macOS says the app is damaged or can't be opened:
sudo xattr -cr /Applications/CurveFan.appgit clone git@github.com:BeastOrange/CurveFan.git && cd CurveFan
swift build # debug build, all targets
swift test # unit tests (no hardware required)
bash build_app.sh release # bundle .build/release/CurveFan.app
bash build_dmg.sh 1.0.0 # package CurveFan-1.0.0.dmg
sudo bash setup.sh # install directly without DMG
bash setup.sh --check # verify installation statusbash smoke_ipc_local.sh # full IPC round-trip with fake SMC, no hardware
bash smoke_hardware.sh # live SMC reads (helper must be running)sudo bash uninstall.sh # remove app, helper, daemon, user data
sudo bash uninstall.sh --keep-data # keep presets- Quitting CurveFan or selecting System Auto restores macOS fan control before exit.
- The helper also restores auto control on
SIGTERM/SIGINTas a second line of defense. - RPM values are clamped to the fan's hardware-reported range; out-of-range requests are rejected.
- Report security issues privately — see SECURITY.md.
MIT — see LICENSE.

