Setting MacBook Auto-Power

While it is fine most of the time for the MacBook to turn itself on when you open it, sometimes it is annoying when you do not want it to for some reason. E.g. like when you want to verify that it is actually powered off before you pack it away.

There are several options for how it reacts to various stimuli that will power it on. The command is “nvram” (which needs to be run as root; i.e. with sudo), with a BootPreference value.

For an M series MacBook, the options are:

  • %00 – Turn off auto-boot entirely. This makes it so that plugging in power or opening the lid will not turn it on.
  • %01 – Only auto-boot when plugged in to power, but not when opening the lid.
  • %02 – Only auto-boot when opening the lid, but not when plugging in to power.

Examples:

Disable auto-boot:

sudo nvram BootPreference=%00

Revert back to the default settings by removing the parameter:

sudo nvram -d BootPreference

Leave a Comment