DEV Community

Tuğberk Akbulut
Tuğberk Akbulut

Posted on

What macOS dark wakes are and how to check if they're draining your battery

If your MacBook loses noticeable battery overnight even though it's closed and supposedly asleep, there's a good chance the cause is something Apple calls a dark wake.

Normally when you close the lid, macOS puts the machine into full sleep CPU, display, most subsystems all powered down, drawing almost nothing. A dark wake is different: the machine briefly wakes itself up without turning the screen on or alerting you in any way, does some background work, and goes back to sleep. You never see it happen. It just shows up as battery loss you can't explain.

Why does this happen?

The main driver is a feature called Power Nap, available on modern MacBooks. While the lid is closed and the Mac is on certain power states, Power Nap periodically wakes the machine to:

  • check and sync Mail, iCloud, and Calendar
  • run Time Machine backups if one is due
  • perform FileVault encryption background checks
  • fetch software updates in the background

Each of these wake events is short, often just a couple of seconds, but they can happen very frequently. On a machine sitting idle for several days, that can mean well over a thousand dark wakes with barely a handful of actual user wake-ups (you opening the lid) in between. Individually tiny, cumulatively significant.

How to check this on your own Mac

You don't need any third-party tool to see the raw numbers, macOS tracks this itself. Open Terminal and run:

pmset -g stats
Enter fullscreen mode Exit fullscreen mode

This prints lifetime counts since your last boot, including something like:

Sleeps: 812
DarkWakes: 1342
UserWakes: 6
Enter fullscreen mode Exit fullscreen mode

If your DarkWakes count is dramatically higher than your UserWakes count, Power Nap-driven activity is very likely what's been draining your battery.

For a more detailed, timestamped breakdown of individual sleep/wake events (including the reason macOS logged for each one), you can run:

pmset -g log | grep -E "Sleep|Wake|DarkWake" | tail -50
Enter fullscreen mode Exit fullscreen mode

This shows the last 50 relevant log lines, so you can see the actual cadence, often every 10 to 15 minutes while idle.

What you can do about it

If this is costing you meaningful battery, you can turn Power Nap off:

sudo pmset -a powernap 0
Enter fullscreen mode Exit fullscreen mode

This disables it across all power sources. You'll lose the background mail/calendar sync and background Time Machine backups while the lid is closed, but for most people who plug in occasionally anyway, that trade-off is worth the battery life back.

Keeping an eye on it going forward

Checking this once with pmset -g stats tells you what happened historically, but it doesn't show you what's happening right now, and going back to the terminal every time you're suspicious gets old fast. That's actually the exact problem that pushed me to build napwatch, a small Rust-based terminal app that shows a live, color-coded feed of Sleep/DarkWake/Wake events as they happen, alongside real-time per-process power draw and one-key toggles for Power Nap and other power settings, all in one screen. If you turn Power Nap off inside napwatch, you can literally watch the DarkWake entries stop appearing in real time.

Napwatch

It's open source and installable via Homebrew:

brew install Tuguberk/napwatch/napwatch
Enter fullscreen mode Exit fullscreen mode

GitHub: https://github.com/Tuguberk/napwatch

Top comments (0)