You closed the lid at 23:45. It spent 40 minutes running
before you opened it again. macOS wrote down every one of those wakes —
the reason, the process, the battery level — and then buried it in
85,000 lines of pmset -g log
that nobody has ever read.
Free · MIT · No account, no network, and not one permission prompt.
Real output from the MacBook this was written on. Nothing here is mocked up.
Seven nights of an ordinary laptop, doing nothing unusual.
wakes across seven nights with the lid shut. Twenty to seventy every single night.
spent awake and running while it looked, to anyone in the room, switched off.
coreaudiod holding an assertion that stops the machine going to sleep.
The icon fills orange the moment something takes hold of sleep, and goes quiet when your Mac is free to rest. Click it for last night.
2 things are stopping it from sleeping.
Your Mac was shut for 8h 20m and woke 33 times, running for 40m of it.
macOS records
smc.sysState.Wake(0x70070000) wifibt wlan E_TKO_TCP_DATA ARPT/.
DarkWake says “Wi-Fi traffic — that's
Wake for network access”, and tells you where to turn it off.
runningboardd holds assertions on behalf of other apps and
buries their names in the reason string. Blaming the daemon helps nobody,
so DarkWake digs out the app.
Two shell commands that need no privileges: pmset -g log and
pmset -g assertions. No root, no Screen Recording, no
Accessibility. There is no network code in the program.
The data has been sitting on every Mac for a decade. Every article about
overnight battery drain ends the same way: “run pmset -g log | grep
and read it yourself.” Two things make that unreadable, and both are
just work nobody wanted to do.
Wake causes are strings like NUB.SPMI0.SW3,
AOP.TrustedOutboxNotEmpty, E_TKO_TCP_DATA. They come
from the power controller, not from anything meant for a person. Mapping them
to plain English is most of what this program is.
Each released assertion says how long it was held — but the hold often
began before the night you are looking at, and coreaudiod holds
one per audio context. Adding them up gives
“coreaudiod: 279 hours” inside an eight-hour
night. DarkWake clips every hold to the window and unions the overlaps, so a
night can never contain more than a night.
Swift and AppKit, no dependencies, no Xcode project. Builds in about four seconds.
| darkwake | Last night: what woke it, and what it cost. |
| darkwake --week | Every night macOS still remembers. |
| darkwake --now | What is holding your Mac awake this second. |
| darkwake --json | The whole analysis, machine readable. |
| darkwake --render p.png | Draw the panel offscreen, light and dark. |
| darkwake --stats | Parser sanity numbers, so you can check the work. |
Written down here rather than discovered by you later.