Close the MacBook lid without putting it to sleep
When you connect an external monitor to your MacBook, you can close the lid and keep working on the larger screen. Your MacBook will stay awake and continue running — it will not go to sleep just because the lid is shut. This works on any MacBook model made in the last decade, as long as you have a keyboard and mouse or trackpad connected to use while the lid is closed.
The key is that macOS requires an external input device. If you close the lid with nothing but the monitor plugged in, your MacBook will sleep after a few minutes. You need a USB keyboard, wireless keyboard, external mouse, or trackpad connected before you close the lid. Once any of these is connected, you can shut the MacBook and the system will stay awake.
If you are using a keyboard and trackpad that came with your MacBook, you will need to add an external one — the built-in trackpad does not count as an external input device for this purpose.
Key Takeaways
- Your MacBook will stay awake when the lid is closed only if an external keyboard, mouse, or trackpad is connected.
- The built-in MacBook keyboard and trackpad do not count — you must add a separate external input device.
- You can adjust how long the monitor stays on before dimming in System Settings under Energy Saver or Battery.
- If your MacBook goes to sleep with the lid closed, check that your external keyboard or mouse is actually connected and powered on.
Set up your keyboard and mouse before closing the lid
Connect your external keyboard and mouse or trackpad to your MacBook before you close the lid. If you are using a wired keyboard and mouse, plug them into the USB ports or USB-C ports on your MacBook. If you are using wireless devices, turn them on and pair them with your MacBook through Bluetooth.
To pair a Bluetooth device, go to System Settings, click Bluetooth, and make sure Bluetooth is turned on. Put your wireless keyboard or mouse into pairing mode — usually by holding a button on the back or bottom for a few seconds — and it will appear in the Bluetooth list. Click it to connect. Once it shows as Connected, you can close the lid safely.
Test that both devices work before you close the lid. Press a key on the keyboard and move the mouse or trackpad to make sure they respond. If either one does not work, your MacBook may sleep when you close the lid.
Adjust monitor and sleep settings in System Settings
Your MacBook can stay awake with the lid closed, but the external monitor itself may turn off after a period of inactivity. You can change this in System Settings. Open System Settings, then go to Energy Saver (on Intel Macs) or Battery (on Apple Silicon Macs like the M1 or M2).
Look for the setting that says "Turn display off after" or "Display sleep." You can set this to 10 minutes, 30 minutes, 1 hour, or Never. If you choose Never, your monitor will stay on indefinitely until you manually turn it off or put your MacBook to sleep. If you want the monitor to turn off to save power, set it to a time that works for you — many people choose 30 minutes or 1 hour.
You can also set a separate timer for when your MacBook itself goes to sleep. Look for "Put hard disks to sleep when possible" or "Computer sleep" and set that to a longer time than your display sleep, so the monitor turns off first.
Troubleshoot if your MacBook goes to sleep anyway
If your MacBook is still going to sleep when you close the lid, the most common reason is that your external keyboard or mouse is not actually connected. Check that your wireless keyboard or mouse is turned on and showing as Connected in System Settings under Bluetooth. If it is a wired device, unplug it and plug it back in to make sure the connection is solid.
Another reason could be that your MacBook is set to sleep on a very short timer. Go back to Energy Saver or Battery in System Settings and check the "Computer sleep" setting. If it is set to 1 minute or 5 minutes, your MacBook will sleep even with an external device connected. Change it to 30 minutes or longer.
If you have a very old MacBook or an older version of macOS, you may need to use a third-party app like Amphetamine or Caffeinate to keep your MacBook awake. These apps prevent sleep mode even when the lid is closed, but they use more battery power.
Position your monitor and cable for a closed-lid setup
When you close the MacBook lid, you will need to position your monitor so you can see it clearly. Most people place the external monitor on a stand or arm at eye level, roughly where the MacBook screen would be if it were open. This keeps your neck in a neutral position and reduces strain.
Make sure your monitor cable, power cable, and keyboard and mouse cables or wireless receivers are all within reach and not pinched by the closed MacBook lid. If you are using a USB-C monitor that also charges your MacBook, run the cable to the side of the MacBook so it does not get bent when the lid closes.
Leave a small gap between the closed MacBook and the monitor so air can flow and heat can escape. Your MacBook generates heat when it is running, and blocking the vents can cause it to overheat or throttle performance.
Know when to use clamshell mode versus keeping the lid open
Closing the MacBook lid and using only the external monitor — called clamshell mode — is useful when you want a clean desk with one screen, or when you are using your MacBook as a desktop replacement. It saves space and looks neater than having both the MacBook screen and an external monitor open at the same time.
However, clamshell mode does use more power than keeping the lid open, because your MacBook cannot use its built-in screen to display anything, so the external monitor has to do all the work. If you are on battery power, you may want to keep the lid open instead, or plug your MacBook into power before you close it.
If you are using your MacBook for video calls, keep the lid open so the built-in camera and microphone work. When the lid is closed, the camera and microphone are blocked, and you will have to use an external webcam and microphone instead.
Frequently Asked Questions
Will my MacBook overheat if I close the lid while it is running?
No, as long as you leave a small gap for air to flow around the closed lid. Your MacBook is designed to run with the lid closed — that is what clamshell mode is for. Make sure the vents on the sides and back of your MacBook are not blocked, and do not place it directly against a wall or inside an enclosed space.
Can I use my MacBook keyboard and trackpad while the lid is closed?
No. Your MacBook keyboard and trackpad stop working when the lid is closed, so you must use an external keyboard and mouse or trackpad. This is why an external input device is required to keep your MacBook awake in clamshell mode.
What if I want to use my MacBook screen and an external monitor at the same time?
You can keep the lid open and use both screens together. This is called extended display mode, and it gives you more screen space to work with. Your MacBook will not go to sleep as long as the lid is open, even without an external keyboard or mouse connected.
Does closing the MacBook lid save battery power?
No, closing the lid does not save battery power — your MacBook uses the same amount of power whether the lid is open or closed. If you want to save battery, plug your MacBook into power before you close the lid, or use the Energy Saver settings to turn off the monitor after a period of inactivity.
Can I close the MacBook lid if I am using a USB-C monitor?
Yes. USB-C monitors work the same way as other external monitors. Make sure your external keyboard or mouse is connected, and your MacBook will stay awake when you close the lid. If the USB-C monitor also charges your MacBook, run the cable to the side so it does not get pinched.