Skip to content
86% off$349 $48.86code BF2026

Guides

MacBook Fan Running in Sleep or Battery Drain Overnight

A closed MacBook with a running fan or overnight drain: read the pmset log, set Wake for network access to Never, check Power Nap, backups and keep-awake tools.

TroubleshootingUpdated 7 min read

On this page

You closed the lid, and in the morning the battery is down 25% or the fan was audibly running in the bag. You looked at pmset -g log and found this:

text
Entering Sleep state due to 'Clamshell Sleep':TCPKeepAlive=active Using Batt (Charge:68%)

That line is not the problem. It says the Mac went to sleep cleanly at 68% on battery. The question is what happened after it.

Why it happens

Threads about this problem blame several causes, and no single cause explains every case. People on Apple's and Reddit's forums report these, roughly from most to least common:

  • Wake for network access lets the network wake a sleeping Mac. Apple's help page says other users may be waking your Mac remotely to use shared resources, and it recommends Never if you don't want that.
  • Power Nap lets a sleeping Mac check for mail, calendar and iCloud updates. Apple's battery settings reference describes it as checking for email, calendar and other iCloud updates while sleeping.
  • Backups and indexing. Hourly Time Machine backups and Spotlight indexing are common suspects. Apple notes that Spotlight indexing stops the Mac from sleeping and can take several hours.
  • Something holding the Mac awake before the lid closed: a download, a call, a keep-awake app, a connected USB or Thunderbolt device that misbehaves.
  • A warm laptop in a bag. A Mac that is awake, or doing a background wake, with no airflow gets warm and spins its fan. Heat is a symptom here, not a separate cause.

We can't tell you which applies to your Mac without the log. Start there.

Step 1: Read the power log

A sleeping Mac should be silent. If you hear a fan, the Mac either never slept or woke itself.

  1. Open Terminal.
  2. Run this. It only reads the log and changes nothing:
bash
pmset -g log | grep -E "Entering Sleep|Wake|Using" | tail -60
  1. Find the Entering Sleep state due to 'Clamshell Sleep' line from when you closed the lid. Note the charge in Using Batt (Charge:68%).
  2. Read every line after it, up to the time you opened the lid.
What you seeWhat it meansWhat to do
Entering Sleep state due to 'Clamshell Sleep'Lid closed, Mac sleptNothing, this is normal
Wake from Normal SleepFull wake with the display onCheck whether the lid or a key was touched
DarkWake from Normal SleepBackground wake, display offRead the reason after due to
No sleep line for hoursThe Mac never sleptGo to Step 4
One clean sleep, tiny charge changeThe Mac slept properlyThe drain was a different night or a different cause

The text after due to on a wake line is the clue to chase. To save the log for a support request:

bash
pmset -g log > ~/Desktop/pmset-log.txt

This writes a text file to your Desktop. Delete it to undo.

Step 2: Set Wake for network access to Never

Apple's own troubleshooting page for a Mac that wakes unexpectedly points here first. On a laptop:

  1. Open System Settings and click Battery in the sidebar (scroll if needed).
  2. Click Options.
  3. Next to Wake for network access, choose Never.

Apple's page for this is If your Mac sleeps or wakes unexpectedly. It also suggests turning off sharing services you don't use (General > Sharing).

To confirm the change took effect, run this read-only command:

bash
pmset -g | grep -E "powernap|womp"

powernap is Power Nap and womp is the setting behind Wake for network access. A value of 0 means off.

Step 3: Turn off Power Nap

If Enable Power Nap appears in Battery > Options, set it to Never. Then sleep the Mac for a night and read the log again.

The trade-off: Mail, calendar and iCloud data may sync when you open the lid instead of overnight. Apple's Battery settings reference lists each option in this pane.

Step 4: Check backups, schedules and indexing

A fixed pattern in the log, such as a DarkWake at the same minute every hour, points to a schedule or a recurring job.

  1. Run pmset -g sched in Terminal. It lists scheduled power events such as a wake, sleep or shutdown, and changes nothing.
  2. Open System Settings and search for Time Machine. Check whether automatic backups are on. For a test night, switch them off and back up by hand.
  3. Open Spotlight and look for an indexing message. Apple says indexing can take several hours and keeps the Mac awake.
  4. Unplug USB and Thunderbolt storage and devices. Apple says malfunctioning ones can keep a Mac from sleeping. Reconnect them one at a time.

A backup that starts as you close the lid can keep the Mac busy until it finishes.

Step 5: See what is holding the Mac awake

If the log shows no Entering Sleep line, or sleep took a long time, something held a sleep-blocking assertion. Check before you close the lid:

bash
pmset -g assertions

This lists which process blocks sleep and why. It changes nothing. A video call, a download, caffeinate or a keep-awake app all show up here.

Rule out your own keep-awake tools

If you use Glowmoth, three things can keep a closed MacBook awake:

  • Closed-lid mode (Settings > Safety > Stay awake with the lid closed). It is off by default, works only while Glowmoth is holding the Mac awake, and posts "Lid closed, staying awake" when the lid closes during a session. See closed-lid mode.
  • Automatic reasons, such as a rule, a watched app or folder, or a coding agent. Open the panel and check the Held By list. Stop Everything ends your session and pauses automatic reasons.
  • A forgotten session. The default duration is "Indefinitely", so a session started from a left-click, the hotkey or the panel switch runs until you stop it.

To check after the fact, open Settings > Activity. It charts time kept awake per day by reason. If it shows none for that night, Glowmoth wasn't holding the Mac awake. See Activity history. If you run other keep-awake apps, quit them while you test.

What Glowmoth can and can't do here

Glowmoth can't change what the Mac does once it is asleep, so it won't fix Power Nap, Wake for network access or Time Machine. It can help with one step: its panel has a Show More section with Also Keeping This Mac Awake. It reads the same data as pmset -g assertions while the panel is open and shows one row per app with a plain purpose ("backing up", "downloading", "caffeinate") and how long it has been holding.

Under the list it flags traps such as a scheduled sleep or shutdown, a repeating sleep schedule, an automatic log-out, and the lid line for laptops. The list is live, so it can't tell you what woke the Mac overnight. For a one-off check, pmset -g assertions is enough. Glowmoth is part of MacSuite and runs on macOS 14 or later. See See what's keeping your Mac awake.

Checklist before you try again

  • Wake for network access is set to Never.
  • Power Nap is off, if your Mac shows it.
  • pmset -g sched shows no unexpected events.
  • Time Machine isn't starting a backup as you close the lid.
  • pmset -g assertions is clear before you close the lid.
  • No keep-awake app, including Glowmoth, has a session running.
  • The Mac is not in a bag on its first night after changes, so you can feel whether it warms up.

If nothing works

If the Mac still drains after these changes, contact Apple Support. Apple also suggests updating macOS and starting in safe mode to rule out software that loads at startup. Include your Mac model, macOS version, the log lines from lid close to lid open, and the settings you changed.

text
My MacBook drains about 25% overnight with the lid closed on battery.
Model and macOS version: [add yours]
pmset -g log shows a clean "Clamshell Sleep" entry, then [paste the DarkWake lines and their "due to" reasons].
pmset -g assertions before closing the lid: [paste output]
Already tried: Wake for network access = Never, Power Nap off, Time Machine paused, no keep-awake apps running.

Common questions

Is "TCPKeepAlive=active" the cause of the drain?

No. It is a status flag recorded in the sleep line, not an error. Read the wake lines after it for the real clue.

Is a warm Mac in a bag always a problem?

Not by itself. A closed Mac that is truly asleep should stay cool and silent. If it is warm, the log will show whether it was awake or kept waking.

Should I turn Power Nap off for good?

Only if it costs you battery. The cost is that mail and iCloud data sync when you open the lid instead of overnight.

Can Glowmoth cause overnight drain?

Only while a session, rule or closed-lid mode holds the Mac awake. An idle Glowmoth doesn't block sleep, and the Activity tab shows whether it held the Mac that night.

Every app.
One purchase.