Skip to content

About

A macOS menu bar widget that shows when your Mac is thermally throttling. Native Swift, no dependencies, no root.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Thermal Widget

A menu bar widget for macOS that shows when your Mac is thermally throttling. Native Swift, no dependencies, no root, ~430 lines.

Intel MacBook Pros throttle hard under sustained load, and macOS gives you no indication that it's happening — the machine just gets slow. This puts the answer in the menu bar.

What the icon means

The thermometer sits in the menu bar next to your other status items:

Icon Meaning
Thermometer, normal color Not throttling
Yellow Warming up — thermal pressure "fair" or CPU capped 85–99%
Orange + text Throttling — thermal pressure "serious" or CPU capped 60–84%
Red + text Heavy throttling — pressure "critical" or CPU capped below 60%

When the CPU is capped, the actual cap shows next to the icon (e.g. 78%). Click the icon for details: CPU speed limit, system thermal pressure, and CPU/GPU die temperatures read from the SMC.

Install

Requires the Xcode command line tools (xcode-select --install) and macOS 13+.

git clone https://github.com/voidharbor/thermal-widget.git
cd thermal-widget
./build.sh

build.sh compiles the app into ~/Applications/ThermalWidget.app, installs a LaunchAgent so it starts at login, and launches it. Start-at-login is togglable from the widget's own menu afterward.

Hardware support

Built and tested on a MacBook Pro 16" 2019 (MacBookPro16,1, i7-9750H) running macOS 26.4. Expect the following elsewhere:

  • CPU throttle % and thermal pressure come from pmset and ProcessInfo, which are available across macOS — these should work on any supported Mac.
  • Temperatures come from named SMC keys, and those names are machine specific. The widget tries a list and shows — for anything it can't read. The defaults are Intel/T2-era keys; Apple Silicon uses different ones and is untested. Run --probe (below) to see what your machine actually exposes.

Adding keys for another Mac is a one-line change to cpuTempKeys / gpuTempKeys in main.swift. PRs welcome.

Data sources

  • pmset -g therm → CPU_Speed_Limit (direct CPU throttle %, polled every 5 s)
  • ProcessInfo.thermalState → system thermal pressure (instant notifications)
  • AppleSMC via IOKit → temperature sensors (no root needed)

Verified working on MacBookPro16,1: TCMX (hottest CPU core), TC0F (CPU die), TGDD (AMD Radeon die), TG0P (GPU proximity) — all type sp78.

GPU caveat: macOS only exposes the CPU throttle number without root. GPU throttling is inferred from system thermal pressure (which is what macOS uses to slow the GPU) plus the GPU die temperature. For exact GPU frequency you'd need sudo powermetrics --samplers gpu_power.

Debug

~/Applications/ThermalWidget.app/Contents/MacOS/ThermalWidget --probe

prints every sensor reading it can get, plus the raw pmset values, and exits. This is the fastest way to find which SMC keys your machine supports.

Notes for anyone reading the SMC code

Two things cost real time to work out, and are commented in SMC.swift:

  • The AppleSMC KeyData struct must be exactly 80 bytes. Swift packs the embedded KeyInfo to 9 bytes unless you add three explicit trailing padding bytes, giving a 76-byte parent — every call then fails with kIOReturnBadArgument (0xe00002c2).
  • T2 Macs dropped the classic sensor keys (TC0D, TG0D) that older SMC readers assume. Enumerate what your machine has via the #KEY count plus kSMCGetKeyFromIndex (command 8) rather than guessing.

Uninstall

launchctl bootout "gui/$(id -u)/com.voidharbor.thermalwidget"
rm -f ~/Library/LaunchAgents/com.voidharbor.thermalwidget.plist
rm -rf ~/Applications/ThermalWidget.app

License

MIT — see LICENSE.

About

A macOS menu bar widget that shows when your Mac is thermally throttling. Native Swift, no dependencies, no root.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages