If you’re upgrading from a pre-2016 MacBook to a 2016 model or later, you may find it strange that the MacBook automatically powers on when you open the lid. This also occurs if the computer is turned off and the charger is connected.
While this may be a feature loved by some, it’s not appreciated by everyone. I really don’t like the idea and had to disable this feature on my MacBook Pro 2017. I want to be able to plug in the charger without having to worry about the MacBook Pro automatically turning itself on. You might just want to open the lid to clean the MacBook and it’s already trying to boot up.
You can’t do this from the settings, it has to be done through the command line. To disable this feature, it’s only a single line of code in Terminal.
How to disable autoboot on lid open or adapter connection
1. Press Command (⌘) + Spacebar to launch Spotlight search. Type Terminal and launch when it appears.
2. Copy this code or type exactly as shown below:
sudo nvram AutoBoot=%00
3. Hit Enter and you will be required to enter your password:
4. Type your password, hit Enter again and you’re done.
This should stop your MacBook pro from automatically turning on when the lid is open or when the charger is connected. You now have to use the power button / Touch ID button to power on the computer when needed.
Re-enable boot on lid open
If you need to re-enable this feature, you still have to do it through Terminal. You only need to use a different code.
sudo nvram AutoBoot=%03
Hit Enter and it’s back to the default behavior.