MacBook automatically turns on after Shut Down if lid is kept open

What would be the right way to shut down the MacBook? Every time I shut it down by using the Shut Down menu, it shuts but if the lid is still open it restarts again within 10 seconds.

MacBook Air, macOS 15.6

Posted on Aug 16, 2025 10:41 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 17, 2025 4:22 AM

anjanm wrote:

What would be the right way to shut down the MacBook? Every time I shut it down by using the Shut Down menu, it shuts but if the lid is still open it restarts again within 10 seconds.

Follow the previous advice and close the lid


Prevent a Mac laptop from turning on when opening its lid or connecting to power


A Mac laptop with Apple silicon automatically turns on and starts up when you open its lid or connect it to power.


With macOS Sequoia 15 or later, you can change this behavior without affecting your ability to use your keyboard or trackpad to turn on your Mac.

  1. Make sure that your Mac laptop with Apple silicon is using macOS Sequoia or later.
  2. Open the Terminal app, which is in the Utilities folder of your Applications folder.
  3. Type one of these commands in Terminal, then press Return:
    • To prevent startup when opening the lid or connecting to power: sudo nvram BootPreference=%00
    • To prevent startup only when opening the lid: sudo nvram BootPreference=%01
    • To prevent startup only when connecting to power: sudo nvram BootPreference=%02
  1. Type your administrator password when prompted (Terminal doesn’t show the password as it's typed), then press Return.

To undo any of the previous commands and reenable automatic startup when opening the lid or connecting to power, enter  sudo nvram -d BootPreference in Terminal.

2 replies
Question marked as Top-ranking reply

Aug 17, 2025 4:22 AM in response to anjanm

anjanm wrote:

What would be the right way to shut down the MacBook? Every time I shut it down by using the Shut Down menu, it shuts but if the lid is still open it restarts again within 10 seconds.

Follow the previous advice and close the lid


Prevent a Mac laptop from turning on when opening its lid or connecting to power


A Mac laptop with Apple silicon automatically turns on and starts up when you open its lid or connect it to power.


With macOS Sequoia 15 or later, you can change this behavior without affecting your ability to use your keyboard or trackpad to turn on your Mac.

  1. Make sure that your Mac laptop with Apple silicon is using macOS Sequoia or later.
  2. Open the Terminal app, which is in the Utilities folder of your Applications folder.
  3. Type one of these commands in Terminal, then press Return:
    • To prevent startup when opening the lid or connecting to power: sudo nvram BootPreference=%00
    • To prevent startup only when opening the lid: sudo nvram BootPreference=%01
    • To prevent startup only when connecting to power: sudo nvram BootPreference=%02
  1. Type your administrator password when prompted (Terminal doesn’t show the password as it's typed), then press Return.

To undo any of the previous commands and reenable automatic startup when opening the lid or connecting to power, enter  sudo nvram -d BootPreference in Terminal.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

MacBook automatically turns on after Shut Down if lid is kept open

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.