Due to heating issues, I would like to use macbook in clamshell mode with lid open, but all the commands mentioned on the web are for older versions of OS X
You can fool the Mac into thinking that the lid is closed by placing a very weak magnet on the sensor that is normally triggered when you close the lid.
The exact position of that sensor varies, but it should be somewhere at the very edge of the laptop, just behind the trackpad.
Of course you must be extremely careful bringing magnets near computers, but if you use one that is weak enough and small enough, you should be able to reproduce the effect of the magnet that is in the display portion of your laptop.
I've just set up open clamshell mode on my MacBook Pro 16" on Catalina and the same technique should work on Mojave. Open clamshell is much cooler. At idle fans now spin at 1900rpm with two external monitors. In closed-lid clamshell fans spin 2800rpm with the same set up. That's at idle. At load they spin off the charts in closed-clamshell and very slow to decrease speed. In open-clamshell the fan peaks are much lower and high rpm rotation stops much more quickly.
To set up closed lid clamshell, it's necessary to change an nvram boot argument. Here's the command:
To set an nvram boot argument, SIP must be disabled. If you haven't disabled SIP before1, here's now.
You can check SIP status in terminal with this command:
csrutil status. If you do have SIP enabled (and most do), the way to disable it is to boot into recovery mode which is done by restarting your MacBook while pressing ⌘R. While in Recovery Mode, you should open terminal and run
Once you have disabled SIP:
- reboot your MacBook
- open terminal
- reboot again with your MacBook lid closed in regular clambook mode and your external monitors plugged in.
You should now be able to open your MacBook without the internal screen lighting up.
If you are a normal user and/or cautious about security, you may want to turn SIP back on. This means booting again in Recovery Mode and this time running
csrutil enable in terminal before rebooting. Again you can check SIP status after rebooting in terminal with
- Personally I like my Macs to run how I want them to run and usually keep SIP off to avoid going through the headache of turning SIP on and off any time I want to customise one of my Macs: SIP didn't exist at all until 10.11 El Capitan and most users were able to manage their Macs securely: what I care about is my personal data and SIP does not protect personal data only the OS. SIP does more to prevent a computer owner from customising his Mac than a competent hacker from breaking into a Mac. One could persuasively argue SIP keeps the NSA/CIA backdoors firmly in place, safely out of reach of third-party programs like Little Snitch and savvy end users.