Why is my MacBook battery draining overnight, while it sleeps?
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:
- caffeinate: a command-line tool that keeps the Mac awake on purpose. Build tools, download scripts and some AI coding tools start it while they work. If one is still running long after the work ended, that's your drain.
- sharingd "Handoff", AirPlay: sharing features, usually brief.
- An app's name: a video call, a download, or music playing. Some apps forget to let go when they're done.
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:
- rtc, Maintenance, SleepService: scheduled wakes for background work, like checking mail, Time Machine and iCloud sync. A few an hour is normal.
- wifibt: a Wi-Fi or Bluetooth event, often a Bluetooth device or a network that keeps reconnecting.
- USB-C_plug, AC: something was plugged in or unplugged.
- UserActivity: you, opening the lid or pressing a key.
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:
- powernap: lets the Mac wake to sync mail, iCloud and Time Machine while asleep. Turning it off on battery saves power but means things sync when you open the lid instead.
- tcpkeepalive: keeps a network connection alive while asleep. Find My uses it to locate a sleeping Mac, so leave it on unless you don't need that.
- womp: wake for network access. In System Settings › Battery › Options, set Wake for network access to Only on Power Adapter.
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:
- Unplug USB devices and disconnect Bluetooth accessories you don't use overnight.
- Quit apps you don't need before closing the lid. Anything still syncing, downloading or calling will keep working.
- Make sure the lid is fully closed, and the Mac isn't connected to an external display.
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.