From 2016 onwards, Apple started to introduce auto power-on feature for Macbook models where the device would automatically turn on when opening the lid or when plugging it into (USB-C) power when the lid was open. While convenient for some, it can also be experienced as annoying to others. For instance, if you want to clean your screen, it would be annoying to have it automatically turn on.
While it was already possible and documented for Intel-based Macbooks, Apple only recently published the correct commands to turn the feature of for M-series (Apple Silicon) Macbooks. Unfortunately, there is no UI setting anywhere to configure this, and the only way is through CLI by changing parameters in the NVRAM.
It looks dauntier than it really is, so don't worry, it's not that difficult. Note that you will need an account with admin privileges to be able to change this setting as it's a device-global setting. If you own the Macbook and/or you're the only user, you most likely are an admin already.
sudo nvram BootPreference=%00 | Disable autoboot entirely (open the lid or plug in a charger while the lid is open) |
sudo nvram BootPreference=%01 | Disable autoboot only when you open the lid |
sudo nvram BootPreference=%02 | Disable autoboot only when you plug in a charger |
The change will be effective immediately but to know whether it worked, you'll need to shut down the Macbook, close the lid and open it again, or unplug and plug in the charger again when the lid is open, depending on which setting you choose.
To revert the setting back to defaults:
For Intel-based Macbooks, the process is similar but with slightly different values in the command to enter:
The change will be effective immediately but to know whether it worked, you'll need to shut down the Macbook, close the lid and open it again, or unplug and plug in the charger again when the lid is open, depending on which setting you choose.
To revert the setting back to defaults: