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

Guides

Prevent Automatic Sleeping on Power Adapter Not Working: Fixes

Mac still sleeps with the "Prevent automatic sleeping on power adapter" switch on? See why it fails and how to keep it awake with the screen off.

TroubleshootingUpdated 6 min read

On this page

You turned on Prevent automatic sleeping on power adapter when the display is off, the screen went dark, and the Mac went to sleep anyway. Downloads stalled, a build died, or a remote session dropped.

Why it happens

Most common first:

  1. You are on battery. The switch is labeled "on power adapter" and does nothing on battery.
  2. The setting is not dependable on every Mac. People on Apple's community forums report that it has always worked for them, while others say it stopped working on Apple silicon Macs. We can't tell you which is true for your model, so don't rely on it alone when the Mac must stay awake.
  3. You adjusted the wrong display timer. macOS keeps separate display-off timers for battery and power adapter.
  4. Something else sleeps the Mac. A closed lid, a manual Sleep, or a scheduled sleep ignores keep-awake settings.
  5. Idle sleep is not blocked at all. Nothing is holding a power assertion, so the Mac follows its normal idle rules.
CauseSymptomFix
On batterySleeps shortly after the screen dimsPlug in, or use caffeinate -i or Glowmoth
Switch unreliableSleeps on power with the switch onUse an explicit assertion (below)
Wrong display timerScreen turns off sooner or later than expectedCheck both timers
Lid closedSleeps when you close itSee closed-lid options
Manual Sleep or scheduleSleeps at a set time or on a clickCheck pmset -g sched

Fix 1: Check the switch and your power source

  1. Connect the power adapter and confirm the Mac is charging.
  2. Open System Settings and choose Battery.
  3. Click Options….
  4. Turn on Prevent automatic sleeping on power adapter when the display is off.
  5. Let the display go dark and see whether the Mac stays awake.

This path is for MacBooks. On a desktop Mac the wording and location can differ, so search System Settings for "sleeping".

Fix 2: Check both display timers

A display that turns off is normal and is not the same as the Mac sleeping. You want the display asleep while the system stays awake.

  1. Open System Settings and search for "Lock Screen".
  2. Find the two "turn display off" timers, one for battery and one for power adapter.
  3. Set the one that matches how the Mac is powered right now.

Fix 3: Rule out things that sleep the Mac regardless

  • Closing the lid. A MacBook sleeps when closed unless it has power and an external display. See clamshell mode on Mac.
  • Choosing Sleep manually. Apple menu ▸ Sleep and the power button always sleep it.
  • A schedule. A one-off or repeating pmset schedule can sleep the Mac at a set time.

To see what is holding the Mac awake right now, run this read-only command:

bash
pmset -g assertions

An entry such as PreventUserIdleSystemSleep means something is blocking idle system sleep. To check for scheduled sleep or wake events:

bash
pmset -g sched

Neither command changes anything.

Fix 4: Use caffeinate -i (works on battery too)

caffeinate is built into macOS. The -i flag blocks idle system sleep and leaves the display alone, so the screen still turns off on its own timer. It works on battery and on the power adapter.

bash
caffeinate -i

This holds until you press Control-C or close the Terminal window. For a set time (2 hours, in seconds):

bash
caffeinate -i -t 7200

To stay awake only while a command runs:

bash
caffeinate -i ./long-job.sh

If you want the display on too, use -d (prevent display sleep), for example caffeinate -di.

Undo: nothing is permanent. Press Control-C or close the window and normal sleep rules return.

Limits: it ends if you close that Terminal window or log out, and it does not stop sleep from a closed lid or a manual Sleep.

Fix 5: A Disable Screen Saver hot corner (limited)

Some people on forums suggest a hot corner set to Disable Screen Saver. To set one, open System Settings and search for "Hot Corners". It targets the screen saver, not system sleep, and only works while the pointer is parked in that corner. Treat it as a last resort.

Fix 6: Start a Glowmoth session with the display allowed to sleep

We make Glowmoth, a menu bar keep-awake app. A session with Keep the display on off does the same job as caffeinate -i: it blocks idle system sleep only, on battery or on the adapter.

  1. Right-click the moth icon in the menu bar.
  2. Click Keep Display On so its checkmark disappears.
  3. Under Keep This Mac Awake, choose a duration or Indefinitely.

To stop, right-click the icon and choose Stop. To change the default for future sessions, open Settings… (⌘,), go to Sessions, and turn off Keep the display on under Display.

To confirm it works, run pmset -g assertions and look for an entry named like "Glowmoth: Session for 1 hour". The panel header also reads "Awake".

With the command-line tool installed (Settings ▸ Advanced ▸ Command Line ▸ Install), you can do the same from Terminal:

bash
glowmoth on --no-display
glowmoth run --no-display -- make

on uses your default duration, which is Indefinitely until you change it. run holds the Mac awake while the command runs. If glowmoth isn't found, add ~/.local/bin to your shell's PATH.

Glowmoth can also hold the Mac awake while an app runs, a download finishes or a coding agent works, using Keep Awake While in the right-click menu. These automatic reasons keep only the system awake, never the display. See display, screen saver and screen lock.

If Glowmoth still lets the Mac sleep

SymptomCauseFix
"Your trial has ended"Trial over or no licenseEnter a MacSuite license
Icon has a slash, "Paused"Battery floor (default 20%) or heat limitPlug in, cool down, or Resume Anyway (30 min)
Rules, apps or agents ignoredPanel set to ManualSwitch to Automatic
Automatic reasons stoppedStop Everything suspends themStart a new session
Lid closed, Mac sleepsNormal sleep rules applySee the closed-lid docs
Apple menu ▸ SleepOnly idle sleep is blockedAvoid manual Sleep

Glowmoth is part of MacSuite, and each app runs free for 7 days on each Mac.

Which method to pick

MethodWorks on batteryDisplayLid closed
macOS switchNo, adapter onlyCan sleepSleeps
caffeinate -iYesCan sleepSleeps
caffeinate -dYesStays onSleeps
Glowmoth, Keep the display on offYesCan sleepSleeps, unless closed-lid mode is on

Pick caffeinate -i if you want a free built-in option and don't mind a Terminal window. Pick an app if you want timers, a menu bar toggle or automatic triggers. Amphetamine is a free Mac App Store option (as of November 2026) with its own triggers. Glowmoth adds a list of what else is holding your Mac awake; see what's keeping your Mac awake.

Checklist before you try again

  • The Mac is on the power adapter, or you are using caffeinate -i or a Glowmoth session.
  • The lid is open.
  • pmset -g assertions shows an assertion that blocks idle sleep.
  • pmset -g sched shows no sleep schedule.
  • You did not choose Sleep manually.

If nothing works

If the Mac sleeps while caffeinate -i is running, the lid is open and pmset -g assertions shows the assertion, the cause isn't a keep-awake setting. Contact Apple Support. For Glowmoth problems, use MacSuite support. Include your Mac model, macOS version, the time it slept, and the pmset -g assertions output taken while the problem happens.

text
My Mac sleeps while the display is off even though a keep-awake assertion is active.
Model: (your Mac model)
macOS: (your version)
Power: adapter / battery
Steps tried: Battery Options switch, caffeinate -i, checked both display timers.
Attached: output of pmset -g assertions and pmset -g sched taken during the problem.

Common questions

Does the switch work on battery?

No. It is labeled for the power adapter and applies only while plugged in. Use caffeinate -i or a keep-awake app on battery.

What is the difference between caffeinate -i and -d?

-i blocks idle system sleep and lets the display turn off. -d also keeps the display on.

Will it keep the Mac awake with the lid closed?

Not by itself. A closed lid sleeps a MacBook unless it has power and an external display. Glowmoth has a separate closed-lid mode for laptops.

For more, see how to stop your Mac from going to sleep, Mac keeps going to sleep, the caffeinate command and Mac sleep settings explained.

Every app.
One purchase.