How to turn off Clamshell mode on MacBooks?
I am using macOS Big Sur (Version 11.2.1) on my MacBook Pro 15" 2016 base model and I didn't find any setting to turn off Clamshell mode. Why would you want to do that? Well, I want my MacBook Pro to go to sleep whenever I close the lid, even when I am connected to external display and connected to power.
Although I found no setting to change the behavior of permanently turned on Clamshell mode in macOS, I found a service that does just that and it works perfectly as of now. The service is called "noclamshell" and can be downloaded and installed from GitHub using homebrew. To do that, you need to have homebrew installed on your mac and then run these commands in the terminal:
INSTALLATION
Downloads, installs, and starts noclamshell service.
brew install pirj/homebrew-noclamshell/noclamshell
brew services start noclamshell
UNINSTALLATION
Stops and uninstalls noclamshell service.
brew services stop noclamshell
brew uninstall pirj/homebrew-noclamshell/noclamshell
TROUBLESHOOTING (Problem that I had encountered and how to fix it)
If you get an error similar to this one when trying to install noclamshell from GitHub,
Error: Your CLT does not support macOS 11.0.
It is either outdated or was modified.
Please update your CLT or delete it if no updates are available.
Error: An exception occurred within a child process:
SystemExit: exit
you can try to fix it by running these commands in terminal.
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
It worked for me and only took a few minutes to download and install.
STARTING/STOPPING SERVICE NOCLAMSHELL
If you want to use Clamshell mode later on, it can still be done. You just need to stop service noclamshell.
This can be done by command:
brew services stop noclamshell
You start the service back up by command:
brew services start noclamshell
If you still need more information, you can visit these webpages:
https://github.com/pirj/noclamshell
https://apple.stackexchange.com/questions/401899/homebrew-your-clt-does-not-support-macos-11-0
Thanks to the developers of noclamshell service! It really is a great service.
MacBook