Guides

Why is my MacBook battery draining overnight, while it sleeps?

Updated · 3 min read

A sleeping MacBook should lose only a few percent overnight. If yours loses ten or more, either it isn't really sleeping, or something keeps waking it up. macOS keeps a log of both, and you can read it.

The short answer: run pmset -g assertions to see what's stopping sleep right now, and pmset -g log to see every time it woke overnight. The rest of this guide shows how to read them.

1. Check what's keeping it awake right now

pmset -g assertions

Look at the Listed by owning process section. Each line is an app or process holding the Mac awake, with how long it's been holding on. Common ones:

Activity Monitor shows the same thing: open the Energy tab and look at the Preventing Sleep column.

2. See every time it woke up

macOS records each sleep and wake, with the battery level at the time. This shows the last 30 on battery:

pmset -g log | grep -E " (Sleep|Wake|DarkWake) " | grep "Using BATT" | tail -30

Each line ends with Charge:NN%. Read down the list and find where the percentage drops most: that's when the drain happened.

DarkWake means the Mac woke briefly with the screen off, to do something in the background. The reason is written after due to:

Dozens of short DarkWakes an hour, or one that lasts a long time, will drain the battery.

3. Change what wakes it

See your current settings with:

pmset -g custom

The ones that matter overnight are under Battery Power:

To turn Power Nap off on battery only (it stays on when plugged in):

sudo pmset -b powernap 0

Undo it with sudo pmset -b powernap 1. Change one setting at a time and check the next morning, so you know which one helped.

Also try:

The faster way

Steamie keeps track of this for you. Its Battery page shows what used the battery since you unplugged, and what happened overnight: how long the Mac really slept, what woke it, and what held it awake, with the app responsible named in plain words.

More guides