Close MacBook Lid Without Sleep: Easy Step-by-Step Guide

close macbook lid without sleep – You can close your MacBook lid without sleep in two main ways: use clamshell mode with an external display and power, or use a keep-awake tool like the Terminal pmset command or the free Amphetamine app.

Both work on modern MacBook Air and MacBook Pro models, including Apple silicon Macs.

By default, every MacBook goes to sleep the moment you close the lid. That is good for battery life, but it can be annoying. Maybe you want to use a big monitor with the laptop tucked away on your desk. Maybe a large file is downloading, a video is rendering, or music is playing to your speakers. In all these cases, you want the screen closed but the Mac still working.

Close MacBook Lid Without Sleep: Easy Step-by-Step Guide

In this guide, you will learn five easy methods to close your MacBook lid without sleep. We explain each one in simple words, with clear steps, so you can pick the one that fits your needs. We also cover the risks of heat and battery wear, and what to do if your Mac still falls asleep.

Quick answer:

Your situationBest method
You use an external monitor, keyboard and mouseMethod 1: Clamshell mode
You want the Mac awake on charger with the screen offMethod 2: Battery settings
You need it awake with the lid closed, no monitorMethod 3: Terminal pmset command
You want an easy on/off buttonMethod 4: Amphetamine app
You need it awake only until one task endsMethod 5: caffeinate command

Why Does a MacBook Sleep When You Close the Lid?

A MacBook sleeps when you close the lid because Apple designed it to save battery and protect the hardware. There is a small magnet sensor near the hinge. When the lid shuts, the sensor tells macOS, and macOS puts the Mac to sleep within seconds.

Apple does this for three good reasons:

  • Battery life. A sleeping Mac uses very little power. You can close the lid at night and still have most of your battery in the morning.
  • Heat control. When the lid is closed, less air moves around the keyboard area. Sleep keeps the chip cool.
  • Safety in bags. Most people close the lid and put the laptop in a bag. If it stayed awake and busy in a tight bag, it could get very hot.

The normal keep-awake options in macOS, and most simple apps, only stop idle sleep. Idle sleep happens when you do not touch the Mac for a while. Lid-close sleep is different. It is a hardware signal, and it is much harder to block. That is why many people try a keep-awake app, close the lid, and find their Mac asleep anyway.

The good news is that Apple gives one official way around it (clamshell mode), and macOS has a hidden setting that power users can turn on. We cover both below.

Method 1: Use Clamshell Mode (Apple’s Official Way)

Clamshell mode, which Apple calls closed-display mode, is the safest and official way to close your MacBook lid without sleep. Your MacBook keeps running with the lid shut, and you use an external monitor instead of the built-in screen.

What you need

  • A power adapter. The MacBook must be plugged into power. This is the most important rule. Clamshell mode does not work on battery alone.
  • An external display. Any monitor or TV connected through USB-C, Thunderbolt, or HDMI.
  • An external keyboard and mouse or trackpad. These can be wired (USB) or wireless (Bluetooth).

Many USB-C monitors can also charge your MacBook through the same cable. If your monitor supports this, one cable can handle both display and power.

Steps to use clamshell mode

  1. Connect your MacBook to its power adapter and plug it into the wall.
  2. Connect your external monitor and turn it on.
  3. Connect your external keyboard and mouse. If they use Bluetooth, pair them first while the lid is open. You can do this in System Settings > Bluetooth.
  4. Make sure the Mac’s desktop appears on the external monitor.
  5. Now close the MacBook lid.
  6. The external screen may go black for a second or two. Then your desktop will return on the monitor only.

That’s it. Your Mac is now awake with the lid closed. You can work, game, edit videos, or run long tasks on the big screen.

If the Mac sleeps after you close the lid

If the Mac goes to sleep after closing the lid, press a key on the external keyboard or click the mouse. This wakes the Mac, and it should come back on the external screen. Also check that the power adapter is really charging. A loose cable is the most common reason clamshell mode fails.

If the external keyboard is not responding at all, the problem may be the keyboard itself or a setting.

Read more: MacBook Keyboard Not Working? Complete Fix Guide

Good for: home and office desk setups, gaming on a big monitor, and anyone who wants a clean desk.

Not good for: people who need the Mac awake with the lid closed and no monitor, like running a task inside a bag.

Method 2: Change Battery Settings to Stop Auto Sleep

macOS has a built-in setting that stops your Mac from sleeping on its own while it is plugged in and the display is off. This setting alone does not stop lid-close sleep on most MacBooks. But it is an important helper. It keeps the Mac awake when the screen turns off, and it makes clamshell mode more reliable.

Steps on macOS Ventura and later

  1. Click the Apple menu in the top-left corner.
  2. Open System Settings.
  3. Click Battery in the sidebar.
  4. Click the Options button near the bottom.
  5. Turn on Prevent automatic sleeping on power adapter when the display is off.
  6. Click Done.

On some Mac models and macOS versions, the menu names may look slightly different. If you cannot find it, type “sleep” in the search box at the top of System Settings.

Change the screen-off time

You can also choose how long the Mac waits before turning off the display:

  1. Open System Settings > Lock Screen.
  2. Find Turn display off on power adapter when inactive.
  3. Pick a longer time, or choose Never if you want the screen to stay on.

When this method helps

This setting is great when you want to keep your Mac open on the desk, let the screen go dark, and keep downloads or uploads running. It is also useful together with Method 1, because it helps the Mac stay awake when the external display goes to sleep.

If you need the Mac awake with the lid fully closed and no monitor, move on to Method 3 or Method 4.

Method 3: Use the Terminal pmset Command (No Monitor Needed)

The pmset disablesleep command is the strongest way to close your MacBook lid without sleep, even on battery and without an external monitor. It turns off system sleep completely until you turn it back on. Users report that it still works on Apple silicon Macs running recent macOS versions.

Use this method with care. While it is on, your Mac will never sleep, even in a bag. Always turn it off when you are done.

How to turn off sleep

  1. Open Terminal. Press Command + Space, type “Terminal”, and press Return.
  2. Type this command and press Return:
sudo pmset -a disablesleep 1
  1. Enter your Mac password and press Return. You will not see the password as you type. This is normal.
  2. Now you can close the lid. The Mac will stay awake.

How to check that it worked

Type this command and press Return:

pmset -g | grep SleepDisabled

If you see SleepDisabled 1, sleep is turned off.

How to turn sleep back on

When your task is finished, open Terminal again and type:

sudo pmset -a disablesleep 0

Enter your password. Your Mac will now sleep normally when you close the lid. Check again with the command above. It should show SleepDisabled 0.

Important safety tips for this method

  • Never put the Mac in a bag while sleep is disabled. It can get very hot.
  • Set a reminder on your phone to turn sleep back on.
  • Place the closed Mac on a hard, flat surface, not on a bed, sofa, or pillow.
  • Watch the battery. If you are not plugged in, the Mac will keep using power until the battery runs out.

Good for: overnight downloads, long builds, rendering, and AI or coding jobs that need hours to finish.

If you often run long builds or code jobs on your laptop, choosing a MacBook with enough memory and good cooling also matters a lot.

Read more: Best MacBook for Programming and Coding in 2026

Method 4: Use a Free App Like Amphetamine

If you do not want to type Terminal commands, a free keep-awake app is the easiest choice. Amphetamine is the most popular one. It is free on the Mac App Store and adds a small icon to your menu bar, so you can turn keep-awake mode on or off with one click.

Amphetamine can keep your Mac awake:

  • Forever, or for a set amount of time
  • Until a set time of day
  • While a file is downloading
  • While a certain app is running
  • While an external display, USB device, or Bluetooth device is connected

How to set up Amphetamine for a closed lid

  1. Open the App Store on your Mac and search for Amphetamine.
  2. Click Get, then Install. The app is free.
  3. Open Amphetamine. A small pill icon will appear in the menu bar at the top of the screen.
  4. Click the icon and open Settings (or Preferences).
  5. Find the session default options and make sure Allow system sleep when display is closed is turned off. This is the key setting for closed-lid mode.
  6. Click the menu bar icon and start a new session, for example Indefinitely or For 2 hours.
  7. Close your MacBook lid. The Mac should stay awake.

Extra step on Apple silicon Macs

On MacBooks with Apple chips (M1, M2, M3, M4 and newer), Apple changed how closed-display mode works. Recent versions of Amphetamine may ask you to install a small helper script, which the app now calls Power Protect. It also asks for your password or Touch ID when a closed-display session starts or ends.

The script is optional, but it is helpful. Without it, the closed-lid session can fail if you plug in or unplug the charger during the session. If you want a smooth experience, follow the app’s prompts and install the script.

Amphetamine also turns off the built-in screen when the lid is closed on Apple silicon Macs. This protects the display from damage.

Other apps you can try

  • KeepingYouAwake: A simple and free open-source app. It is great for keeping the Mac awake with the lid open, but it does not support closed-lid use.
  • Coca: A newer App Store app with a clean design, timers, and a closed-lid mode.

Good for: people who want a simple button, timers, and automatic rules without using Terminal.

Method 5: Use the caffeinate Command for One Task

caffeinate is a free tool built into every Mac. It keeps your Mac awake while a task runs, then lets it sleep again on its own. There is one honest limit you should know: caffeinate stops idle sleep, but on its own it cannot override lid-close sleep. Use it with the lid open, or together with clamshell mode (Method 1).

So why include it? Because many people who search “close MacBook lid without sleep” really just want a long task to finish. With caffeinate, you can leave the lid slightly open or use an external monitor, and the Mac will not doze off in the middle of the job.

Useful caffeinate commands

Open Terminal and type one of these:

Keep the Mac awake until you stop it:

caffeinate

Press Control + C to stop it.

Keep the Mac awake for a set time (example: 2 hours = 7200 seconds):

caffeinate -t 7200

Keep the Mac and the display awake:

caffeinate -d

Keep the system awake while plugged in:

caffeinate -s

Keep the Mac awake only while another command runs:

caffeinate -i your-command-here

For example, caffeinate -i zip -r backup.zip Documents keeps the Mac awake until the zip file is done, then lets it sleep normally.

Combine methods for the best result

For a long video export with the lid closed, you can use clamshell mode (Method 1) and run caffeinate -s in Terminal. The Mac stays awake on power, and sleep comes back automatically when you stop the command.

If you export big video projects often, your MacBook model makes a big difference to how long these jobs take and how hot the laptop gets.

Read more: Best MacBook for Video Editing and Content Creation in 2026

Is It Safe to Keep a MacBook Awake With the Lid Closed?

Yes, it is safe when you use clamshell mode the way Apple describes, and it is mostly safe with the other methods if you control heat and battery. Apple supports closed-display mode on all modern MacBooks, so normal desk use will not harm your laptop.

The risks come from heat, battery drain, and forgetting that the Mac is still awake. Here is what to watch:

1. Heat

With the lid closed, some heat stays trapped near the keyboard. MacBook Pro models have fans, but MacBook Air models are fanless, so they rely on the metal body to release heat.

  • Keep the Mac on a hard, flat surface like a desk or a stand.
  • Never leave it on a bed, blanket, sofa, or carpet.
  • Never put an awake Mac inside a bag or backpack.
  • A vertical laptop stand helps air move around the body.
  • If the Mac feels very hot to touch, open the lid or stop the task.

2. Battery drain

On battery, an awake Mac keeps using power even with the lid closed. Heavy tasks can drain the battery in a few hours. If the battery dies, unsaved work can be lost.

  • Plug in the charger for long tasks.
  • Use a timer in Amphetamine or caffeinate -t so the session ends on its own.
  • Save your work before you close the lid.

3. Battery health over time

Keeping a MacBook plugged in for long hours is fine. macOS has Optimized Battery Charging, which learns your routine and holds the battery at about 80 percent when it makes sense. This reduces wear. You can check it in System Settings > Battery.

4. Forgetting to turn sleep back on

This is the biggest danger with Method 3. If you leave disablesleep on and later put the Mac in your bag, it can overheat. Always run sudo pmset -a disablesleep 0 when your task is finished.

5. The built-in screen

In clamshell mode, macOS turns off the built-in screen and shows everything on the external monitor. Amphetamine also makes sure the built-in display sleeps when the lid is folded on Apple silicon Macs, to avoid screen burn-in. So the closed screen itself is not at risk during normal use.

MacBook Still Sleeps When the Lid Is Closed? 8 Fixes

If your MacBook still sleeps after you close the lid, the cause is usually a missing power connection, a missing external device, or a keep-awake tool that is not set up correctly. Work through these fixes from top to bottom.

  1. Check the charger. Clamshell mode only works on power. Look for the charging icon in the menu bar. Try a different outlet, cable, or adapter if it is not charging.
  2. Connect a keyboard and mouse. In clamshell mode, macOS expects an external keyboard and mouse or trackpad. Without them, the Mac may sleep.
  3. Wake the Mac from the external keyboard. After closing the lid, press any key or click the mouse. The Mac should wake up on the external screen.
  4. Reconnect the monitor. Unplug the display cable and plug it back in. If you use an adapter or dock, try connecting the monitor directly.
  5. Check the pmset setting. If you used Method 3, run pmset -g | grep SleepDisabled. If it shows 0, run the disablesleep 1 command again.
  6. Check Amphetamine settings. Make sure Allow system sleep when display is closed is turned off, and that a session is active. On Apple silicon Macs, install the closed-display script when the app asks.
  7. Update macOS. Go to System Settings > General > Software Update and install any updates. Updates often fix power and display bugs.
  8. Reset power settings. In Terminal, run sudo pmset -a restoredefaults to bring all power settings back to normal, then set them up again. You can also restart your Mac, which clears many small glitches.

If the Mac still will not stay awake after all these steps, contact Apple Support or visit an Apple Authorised Service Provider. There may be a problem with the lid sensor or the logic board.

Frequently Asked Questions

Can I close my MacBook lid without sleep and without a monitor?

Yes. Use the Terminal command sudo pmset -a disablesleep 1 or a keep-awake app like Amphetamine with closed-lid mode turned on. Remember to turn sleep back on when you are done.

Can I use clamshell mode on battery?

No. Apple’s closed-display mode needs the power adapter connected. On battery alone, the Mac will sleep when you close the lid.

Will music keep playing if I close the MacBook lid?

Not by default. The Mac sleeps and music stops. Use clamshell mode, the pmset command, or Amphetamine to keep audio playing to your speakers or headphones.

Will downloads continue when the MacBook lid is closed?

Normally, no. Most downloads pause when the Mac sleeps. Use one of the methods in this guide to keep the Mac awake until the download finishes.

Does keeping the lid closed damage the MacBook?

No, not when you follow good habits. Keep the Mac on a hard surface, avoid bags and soft fabric, and watch the temperature during heavy tasks.

How do I undo the pmset command?

Open Terminal and type sudo pmset -a disablesleep 0, then enter your password. Your Mac will sleep normally again.

Does KeepingYouAwake work with the lid closed?

No. KeepingYouAwake is great for keeping the Mac awake with the lid open, but its developer says it does not support closed-lid use. Use Amphetamine or Coca instead.

Do these methods work on Apple silicon MacBooks?

Yes. Clamshell mode works on all modern MacBooks. The pmset disablesleep command is reported to work on M-series Macs, and Amphetamine supports closed-display mode on Apple silicon with its optional helper script.

Does closing the lid with the Mac awake use more battery?

Yes. An awake Mac uses much more power than a sleeping one, even with the screen off. Plug in your charger for long tasks.

Final Words

The best way to close your MacBook lid without sleep depends on what you are doing. For a desk setup, use clamshell mode with a charger, monitor, keyboard, and mouse. It is safe, official, and simple. For tasks with no monitor, use the pmset disablesleep command or the free Amphetamine app, and always turn sleep back on when you finish.

Here is a simple way to remember it:

  • Working at a desk? Clamshell mode.
  • Screen off but lid open? Battery settings or caffeinate.
  • Lid closed, no monitor, long task? pmset or Amphetamine.

Whatever method you choose, keep your MacBook on a hard surface, never in a bag while it is awake, and keep an eye on heat and battery. With these small habits, you can enjoy a clean desk, a big screen, and long tasks that finish on time.

If you are thinking about a new MacBook that handles long tasks and external displays well, our buying guide can help you choose.

Read more: Best MacBook for Students and Professionals: Top Picks

Sources

Leave a Comment