If you've ever opened your MacBook's lid just to clean the display and keyboard, only to have it spring to life unexpectedly, here's a simple solution. Apple silicon Macs automatically start up when you open the lid or connect them to power, but you can disable this behavior in macOS Sequoia or later.
While automatic startup is convenient in most situations, you might want to disable it. Doing so gives you better control over your Mac's power state, which is particularly useful when you're checking over the machine or cleaning it and and don't want it powering on automatically. To prevent the behavior, simply follow the steps below.
Note that the steps only work if your Mac laptop is powered by Apple silicon (M1 chip or later) and it's running macOS Sequoia or later. You'll also need your administrator password handy.
- Open the Terminal app (it's in the subfolder Applications/Utilities).
- At the prompt, type one of the following commands, then press Return:
- sudo nvram BootPreference=%00 – To prevent startup when opening the lid or connecting to power.
- sudo nvram BootPreference=%01 – To prevent startup only when opening the lid.
- sudo nvram BootPreference=%0 – To prevent startup only when connecting to power.
You'll then be asked to enter your administrator password (it won't be visible as you type). After that, press Return again, and you're done.
That's all there is to it. To restore the default behavior and re-enable automatic startup, enter sudo nvram -d BootPreference in Terminal.
Don't worry - this change won't affect your ability to turn on your Mac using the keyboard or trackpad. You'll still have full control over your Mac's power state, just without the automatic behavior.