ClickSystem SettingsorSystem Preferencesfrom the Apple menu in the upper left corner.

ClickLock Screen, then go for the menu next toTurn display off on power adapter when inactive.

ClickBatteryfrom the menu, then chooseOptions.

The Apple menu on a MacBook

Switch on the toggle next toPrevent automatic sleeping on power adapter when the display is off.

Plug your MacBook into power.

Connect your MacBook to an external monitor using an adapter if necessary.

Never chosen in the Lock Screen settings on a MacBook

you’ve got the option to now close your MacBook without the external display turning off.

Note that the display on the MacBook itself does turn off, just not the external monitor.

Why Does My MacBook Sleep When I terminate the Lid?

Power Adapter highlighted in MacBook battery settings.

Your MacBook sleeps when you kill the lid for several reasons, depending on whether it’s plugged in.

When running on battery power, it sleeps when you kill the lid to conserve battery power.

Apple makes that reasonably easy if you follow the instructions provided in the previous section.

The prevent automatic sleeping on power adapter option toggled on for a MacBook

Can You Keep a MacBook From Sleeping With the Lid Closed Without a Monitor?

FAQ

SelectSystem tweaks>Battery>Options.

Turn onPrevent automatic sleeping on power adapter when the display is off.

The prevent computer from sleeping checkbox highlighted in MacBook battery settings.

Ensure the setting for turning off the display is active.

Go toSystem configs>Lock Screenand review those configs.

Also, in theBatterymenu, chooseOptionsand disable thePrevent automatic sleepingtoggle.

Also, check Bluetooth wake tweaks:Bluetooth>Advanced> uncheckAllow Bluetooth devices to wake this computer.