PinSetDownload free

Use your MacBook with the lid closed on an external monitor

Quick answer

Connect the charger, the monitor and a keyboard or mouse first, wait for your desktop to show on the monitor, and only then close the lid.

Why it happens

A MacBook only stays awake with its lid shut when it has three things: power, a screen to draw on and a way for you to control it. If any one is missing, closing the lid sends it to sleep, just like when you pack it in a bag. This is called closed-display mode, and it needs no setting.

How to fix it

  1. Plug your MacBook into its charger and check it's charging. The battery icon in the menu bar shows a lightning bolt.

  2. Connect the monitor and give it a few seconds. Carry on once your desktop or wallpaper appears on the big screen.

  3. Connect a keyboard, mouse or trackpad. A USB one works straight away. A Bluetooth one needs to be paired and switched on first.

  4. Close the lid. The monitor may go dark for a second or two, then it comes back as your only screen with all your windows on it.

  5. To wake the Mac later, press a key or click the mouse. You don't need to open the lid.

Still not fixed?

  1. If the Mac sleeps the moment you close the lid, one of the three is missing. Most often the charger isn't really charging, so try another cable or wall socket.

  2. If it falls asleep after a while with the lid closed, open Battery, then Options…, and turn on Prevent automatic sleeping on power adapter when the display is off.

    Battery›Options…›Prevent automatic sleeping on power adapter when the display is off

  3. If the monitor stays black after you close the lid, open the lid, unplug the monitor cable, plug it back in and wait for the desktop before closing again. A hub or adapter can be the problem, so try the cable straight into the Mac.

  4. If the monitor works with the lid open but never with it closed, even with power and a keyboard connected, contact Apple Support or an Apple Authorised repair shop. The sensor that tells the Mac its lid is shut can be a hardware fault.

Terminal

Open Terminal (Applications › Utilities), paste this line and press Return.

sudo pmset -a disablesleep 1

To undo:

sudo pmset -a disablesleep 0

This one needs your Mac's admin password. Copy it and run it yourself in Terminal, and only if you're comfortable doing that.

Pro details

Stops the Mac sleeping when the lid is closed (needs sudo). Turn it back off to avoid heat and battery drain in a bag.

Questions people ask

Do I need an external keyboard for closed-lid mode?

Yes, or a mouse or trackpad. The Mac needs a way for you to control it, or it goes to sleep when you shut the lid.

Why does my MacBook sleep when I close the lid with a monitor connected?

It's usually missing power or an input device. Plug in the charger and a keyboard or mouse, wait for the desktop on the monitor, then close the lid.

How do I wake a MacBook with the lid closed?

Press a key on the external keyboard or click the mouse. The monitor wakes up without opening the lid.

Did this fix it?

Glad it worked.

Sorry it didn't. Tell us what happened and we'll fix this page.

Email hello@getpinset.com

Next time, just ask your Mac.

Press ⌃ ⌥ Space and type “use macbook closed with monitor”. PinSet shows you these steps. One of 2,400+ checked Mac fixes. Works offline.

7 fixes free · Works offline · macOS 26 and 27