MacBook - How to keep it on with lid closed, clamshell mode
I am testing the remote desktop to access MacBook and it is inconvenient that MacBook needs to stay with the lid open. Othewise, if the lid is closed, the laptop goes to sleep and makes it impossible to connect to it.
The solution is to have MacBook in a “clamshell mode” which is enabled when there is an external display, mouse and the keyboard to the laptop.
To emulate the display (which I don’t have), it is possible to use the “hdmi dummy plug” or “hdmi headless adapters” like this Fueran 4K HDR HDMI Dummy Plug:

The Fueran HDMI adapter works for me and in my tests it is enough to have it and the external keyboard and mouse are not necessary.
Settings that may also be needed to support the clamshell mode:
- System Settings -> Battery
- Click Options
- “Prevent automatic sleeping on power adapter when the display is off.” -> On
Maybe related:
- System Settings -> Lock Screen
- “Turn display off on power adapter when inactive” recommended to set to “Never”
- I have it 1 hour, seems to work, so maybe this is not needed.
Resources:
- Share your Mac resources when it’s in sleep
- Set sleep and wake settings for your Mac
- How to close MacBook and Use Monitor (Clamshell Mode)

