Post

How to Stop Your MacBook from Turning On Automatically

Learn how to prevent your MacBook from turning on automatically when opening the lid or plugging it in.

How to Stop Your MacBook from Turning On Automatically

By default, MacBooks automatically power on when you open the lid or connect the charger. While this feature is convenient, some users prefer manual control. Thankfully, Apple now allows us to disable it using simple Terminal commands.

πŸ”§ Disable Auto Power-On When Opening the Lid

To stop your MacBook from turning on when you open the lid, enter the following command in Terminal:

1
sudo nvram BootPreference=%01

πŸ“Œ Explanation:

  • sudo – Runs the command with administrator privileges.
  • nvram – Stands for Non-Volatile Random-Access Memory, which stores system settings.
  • BootPreference=%01 – Sets the boot preference to not start when opening the lid.

πŸ”Œ Disable Auto Power-On When Plugging in the Charger

If you don’t want your MacBook to turn on when you connect it to power, use this command:

1
sudo nvram BootPreference=%02

πŸ“Œ Explanation:

  • BootPreference=%02 – Prevents the MacBook from automatically powering on when plugged in.

⌨️ Disable Auto Power-On When Pressing Keyboard Keys

To prevent your MacBook from turning on when you press any key on the keyboard, use this command:

1
sudo nvram AutoBoot=%00

πŸ“Œ Explanation:

  • AutoBoot=%00 – Disables the automatic power-on by keyboard feature. Your Mac will only turn on when you press the physical power button.
  • To restore the default keyboard behavior, run: sudo nvram AutoBoot=%03

πŸ›  Apply the Changes

After entering these commands, press Enter, and you’ll be asked for your administrator password. Type it in and press Enter again.

βœ… Done! Your MacBook will no longer turn on automatically based on the settings you’ve modified.

If you ever want to reset to default settings, run:

1
sudo nvram -d BootPreference

For keyboard settings, use:

1
sudo nvram AutoBoot=%03

🏁 Conclusion

By tweaking these settings, you gain more control over when your MacBook turns on. Whether you prefer to manually start your Mac or simply want to extend battery life, these tricks can be handy.

πŸš€ Let me know if you found this helpful! πŸš€

β˜• Support My Work

If you found this post helpful and want to support more content like this, you can buy me a coffee!

Your support helps me continue creating useful articles and tips for fellow developers. Thank you! πŸ™

This post is licensed under CC BY 4.0 by the author.