lidkeep
← Lidkeep guides

Core guide

How to Prevent Mac from Sleeping When Lid Closed (2026 Guide)

A closed MacBook normally sleeps to save power. The reliable, supported path is clamshell mode with power, an external display, and external input devices. If your MacBook is not sleeping when the lid is closed and you actually want it to sleep, this guide covers both directions. Some users search for “MacBook close lid no sleep”—here's how to achieve exactly that. For a one-off task, there are also settings and command-line tools worth understanding—along with clear limits.

Updated · 8 min read

START HERE

Quick Answer

For a desk setup, connect your MacBook to power, an external monitor, plus an external keyboard and mouse or trackpad; then close the lid and wake it from the external input. That is Apple's normal clamshell workflow. If you only need to stop display sleep while the lid stays open, adjust Lock Screen settings or run caffeinate in Terminal. Keeping a physically closed Mac awake without that setup generally depends on third-party software and deserves extra heat and battery caution.

METHOD 01

Method 1: System Settings → Lock Screen → Turn display off

On macOS Ventura and later, open System Settings, then Lock Screen. The “Turn display off on power adapter when inactive” and battery equivalent control how long an open Mac waits before its display sleeps. They are useful for a presentation, a long read, or an open-lid download.

This is not a closed-lid override. A lid-close event is handled separately by macOS, so changing Lock Screen timing will not turn an unsupported closed-lid setup into clamshell mode.

  1. Open System Settings → Lock Screen.
  2. Choose a longer timeout for the power-adapter setting; use a shorter battery timeout to protect charge.
  3. Look for the words “Turn display off” and “when inactive”—Apple may move surrounding labels between macOS releases.
  4. Leave the lid open while using this method.

METHOD 02

Method 2: Terminal caffeinate command

The built-in caffeinate command temporarily asks macOS to avoid selected idle-sleep behavior while the command runs. It is transparent and reversible: quit it with Control-C or close the Terminal process. It is best for an attended, time-bounded task with the lid open.

Use a duration so you do not accidentally leave the Mac awake overnight. The command below keeps the system awake for one hour (3,600 seconds).

  1. Open Terminal from Applications → Utilities, or search for it with Spotlight.
  2. Run: caffeinate -d -i -t 3600
  3. Keep the Terminal window open while the task runs.
  4. Stop earlier with Control-C, then confirm the Mac returns to normal sleep behavior.

METHOD 03

Method 3: Third-party apps such as Amphetamine and LidRun

Apps in this category can expose triggers and lid-close behaviors that macOS does not present in System Settings. They can be useful for people who understand the trade-off, but Lidkeep has not independently tested or endorsed Amphetamine, LidRun, or any other app in this guide.

Before granting an app permissions, read its current privacy policy, review what it asks to control, and test on a short, attended session. An app that defeats sleep can increase heat, drain the battery, and make a Mac stay active when you expected it to sleep.

  1. Install only from the developer's official distribution channel or the Mac App Store.
  2. Read current documentation and permission prompts before enabling automation.
  3. Test with a timer, an external display if applicable, and clear airflow.
  4. Disable the trigger after the task and verify ordinary lid-close sleep still works.

METHOD 04

Method 4: Use an external monitor (supported clamshell mode)

If your goal is a closed laptop at a desk, use the supported route instead of trying to defeat sleep. Connect power, an external monitor, and external keyboard plus mouse or trackpad. Once the external display is active, close the lid and wake the Mac from the external input device.

This setup gives you one desktop display while keeping the notebook out of the way. Connection details, display input checks, and wake troubleshooting are covered in the dedicated monitor guide.

For a full walkthrough of setting this up, see our Mac clamshell mode guide.

  1. Connect the power adapter directly to the MacBook.
  2. Connect the monitor and select its correct input.
  3. Connect or pair an external keyboard and pointing device.
  4. Close the lid, then press a key or click the mouse to wake the external screen.

METHOD 05

Method 5: On-battery power tips

A closed, awake Mac running on battery is a compromise, not a default. Screen-off work, syncing, or downloads can consume charge quickly, and a warm environment makes the situation worse. If a task can wait, let the Mac sleep or connect power instead.

If you must test a battery workflow, make it brief, keep the computer on a hard surface, and watch the battery percentage and temperature. Do not leave it unattended or packed away.

  1. Start with enough battery for more than the task itself.
  2. Use a timer and check progress after a few minutes.
  3. Stop if the Mac becomes noticeably hot or the battery drops faster than expected.
  4. Return to normal sleep settings when the task finishes.

METHOD 06

Method 6: Apple silicon vs. Intel differences

The clamshell requirements are fundamentally the same on Apple silicon and Intel Mac notebooks: a suitable external display, power, and external input devices. Where experiences differ is usually hardware—dock firmware, cable bandwidth, monitor wake behavior, or macOS version—not a different lid-close rule.

When diagnosing a problem, identify your Mac in Apple menu → About This Mac, then test a direct monitor cable before adding a dock or hub. Restarting the display chain one component at a time reveals more than changing several settings at once.

  1. Note your Mac model, macOS version, monitor model, and connection type.
  2. Try a direct cable connection if a dock fails to wake the screen.
  3. Check the monitor input and power before changing Mac sleep settings.
  4. Update macOS and vendor firmware only after backing up important work.

AT A GLANCE

Which method is best for your situation?

MethodBest forClosed lid?Main trade-off
Lock Screen timingKeeping an open Mac availableNoDoes not override lid-close sleep
Terminal caffeinateShort, attended open-lid tasksNot a reliable closed-lid solutionMust be stopped or time-limited
Third-party appAdvanced, carefully tested workflowsMay be possiblePermissions, heat, and battery risk
External-display clamshellA permanent desk setupYesRequires power, monitor, and external input
Battery workflowBrief monitored exceptionsVariesFast drain and heat risk

FAQ

prevent mac from sleeping when lid closed: FAQ

Why is my MacBook not sleeping when the lid is closed?+

With power, an external display, and external input devices attached, it may be intentionally operating in clamshell mode. Otherwise, disconnect accessories and review any sleep-prevention app or Terminal process you started.

What is the safest way to keep a closed MacBook running?+

Use the supported external-display clamshell setup at a ventilated desk. Avoid unverified closed-lid workarounds for long, unattended, or battery-only sessions.

Does caffeinate keep a closed MacBook awake?+

caffeinate manages selected idle-sleep behavior while it runs, but it is not a universal guarantee for a physical lid-close event. Treat it as a temporary, attended open-lid tool unless you have tested your exact setup.