![Cover Image for How to Prevent Your MacBook from Turning On When You Open the Lid](https://res.cloudinary.com/dcj0jkqds/image/upload/v1738421464/posts_previews/fvrkurpoqpi520mjkabx.jpg)
How to Prevent Your MacBook from Turning On When You Open the Lid
Apple chose to impose a command in Terminal instead of incorporating a simple option in the settings.
In 2016, Apple introduced an automatic power-on feature in its new MacBook models, which was activated by opening the lid or connecting a USB-C charger with the lid open. While this feature is quite convenient for users who prefer to avoid the hassle of pressing the power button, it can also become a nuisance if you only want to open the computer to clean the screen or troubleshoot other issues. This can also be a problem for those building a custom laptop who do not wish for it to turn on automatically when power is connected.
The first MacBooks that featured this functionality had Intel processors, and it has persisted in each new model, even as Apple began using its own Apple Silicon processors from the M series. For models with Intel processors, there is a Terminal command that allows users to disable the automatic power-on when opening the lid, but this command ceased to function with the launch of the MacBook Air M1 in 2020. However, in January 2025, Apple introduced an official solution to disable the automatic power-on feature in M1 and later models.
To disable this automatic power-on function on an Apple Silicon MacBook, you will need to follow some steps in the macOS software using a Terminal command that Apple has validated. This command is compatible with all Apple Silicon models running macOS 15 Sequoia, and it has been tested successfully on macOS 14.7 Sonoma. The steps to follow are:
-
Log into your MacBook with an administrator account.
-
Open the Terminal application, found in the Applications > Utilities folder.
-
Copy and paste one of the following commands into Terminal, depending on your preferred option, and press Return:
- To disable automatic power-on when opening the lid or connecting the charger:
sudo nvram BootPreference=%00
- To disable automatic power-on ONLY when opening the lid:
sudo nvram BootPreference=%01
- To disable automatic power-on ONLY when connecting the charger:
sudo nvram BootPreference=%02
- To disable automatic power-on when opening the lid or connecting the charger:
-
You will be prompted for your administrator password, enter it and press Return.
-
You can now shut down the computer, close the lid, and test if the setting has worked.
To revert to the default settings, follow the previous steps but use the following command in Terminal: sudo nvram -d BootPreference
.
If you have a 2016 or later Intel-based MacBook and wish to disable the automatic power-on feature, follow these steps:
-
Log into your MacBook with an administrator account.
-
Open the Terminal application from Applications > Utilities.
-
Enter the following command in Terminal and press Return:
sudo nvram AutoBoot=%00
-
Then, enter your administrator password and press Return.
-
Shut down the computer, close the lid, and check if the functionality has been disabled.
To revert to the default setting, the command to use would be: sudo nvram AutoBoot=%03
.
With these steps, you can enjoy a MacBook without the unwanted automatic power-on feature.