Apple’s Worldwide Developers Conference to kick off June 10 at 10 a.m. PDT with Keynote address

The Keynote will be available to stream on apple.com, the Apple Developer app, the Apple TV app, and the Apple YouTube channel. On-demand playback will be available after the conclusion of the stream.

How to disable boot on lid opening on my MacBook Pro?

THE SOLUTION OF USE TERMINAL AND THE COMMAND SUDO nvram AutoBoot=%00
 TO DISABLE WORKS ONE TIME ONLY. THE SECOND LID OPEN BOOTS AGAIN. IS THERE ANY WAY TO PERMANENTLY TURN THIS OFF? RUNING OS SONOMA 14.2.1 ON A M2 PRO MACBOOK.


[Re-Titled by Moderator]

Posted on Dec 27, 2023 5:52 PM

Reply
Question marked as Best reply

Posted on May 13, 2024 4:53 AM

Hi

It doesn't look good when some of the solutions have caused issues. I've sent a feedback to Apple, hopefully the more of us send a complaint the more likely they will to change it.


"If you need to stop this behavior--to clean the keyboard, for example--you can force a shutdown once.

Press and hold the left Control and Command buttons with the right Shift button for a total of 7 seconds. Without releasing them, press the Power button and hold them all together for an additional 7 seconds. Your Mac can only be powered on by using the Power button.

Unfortunately, there is no way to disable this permanently."

https://apple.stackexchange.com/questions/395453/how-to-prevent-macbook-pro-from-powering-up-by-pressing-any-key#:~:text=Your%20Mac%20can%20only%20be,way%20to%20disable%20this%20permanently.



20 replies
Question marked as Best reply

May 13, 2024 4:53 AM in response to DaveW75

Hi

It doesn't look good when some of the solutions have caused issues. I've sent a feedback to Apple, hopefully the more of us send a complaint the more likely they will to change it.


"If you need to stop this behavior--to clean the keyboard, for example--you can force a shutdown once.

Press and hold the left Control and Command buttons with the right Shift button for a total of 7 seconds. Without releasing them, press the Power button and hold them all together for an additional 7 seconds. Your Mac can only be powered on by using the Power button.

Unfortunately, there is no way to disable this permanently."

https://apple.stackexchange.com/questions/395453/how-to-prevent-macbook-pro-from-powering-up-by-pressing-any-key#:~:text=Your%20Mac%20can%20only%20be,way%20to%20disable%20this%20permanently.



Mar 13, 2024 6:27 PM in response to DaveW75

Can someone that has NOT previously run `sudo nvram AutoBoot=%00` tell us what the default value is?


Please run `nvram -p | grep "AutoBoot"` (NOT auto-boot) in Terminal to see the default value. If it doesn't show anything, then I'd like to know that as well. NOTE that this command will NOT make any changes -- it only shows information to the user.


This might also help future users that visit this post.


Thank you!

Mar 14, 2024 8:23 PM in response to jdstone1

There is no "AutoBoot". It was added by the command the OP used to try to set it. However, the OP did not realize the "AutoBoot" option is only for Intel Macs. You can delete that firmware variable using the following command:

sudo  nvram  -d  AutoBoot


Or you can just clear the NVRAM (it won't clear the computer name and possibly some other similar items)....this will work on an Apple Silicon M-series Mac as well as an Intel Mac and requires a reboot afterwards so the OS can use the updated settings:

sudo  nvram  -c


I've never tried it, but theoretically it should be possible to set the Apple Silicon M-series Macs' "auto-boot" variable to false by using, but I don't know if it will actually change the behavior since I have not seen any reference to disabling auto boot on an Apple Silicon M-series Mac:

sudo  nvram auto-boot=%00


May 9, 2024 7:23 AM in response to BenT

BenT wrote:

A bit late, but the auto-boot=false doesn't brick it, it can be fixed.

"nvram auto-boot=true"
Restart and fixed.

FYI, a better option would be to delete that variable name used such as:

nvram  -d  auto-boot


Leaving the variable in the NVRAM is not ideal. This delete option is actually better than my original suggestion of clearing all of the NVRAM, but I decided against it to keep things simpler for people not familiar with the command line since they may have also inadvertently used some other variable name or mis-spelled it (either when setting it or when trying to delete the variable).

Dec 28, 2023 5:57 PM in response to jaeh3ang

This is the output.


AutoBoot %00


boot-volume EF57347C-0000-AA11-AA11-00306543ECAC:5A1267A9-994E-DD4A-8AE6-34EEA92DBE3E:8C662D47-56F6-421F-9CD8-B143534EECFA


boot-note %00%00%00%00%00%00%00%c55%1b;%00%00%00%00%00%0b%ca%08%00%01%00%00


upgrade-boot-volume EF57347C-0000-AA11-AA11-00306543ECAC:5A1267A9-994E-DD4A-8AE6-34EEA92DBE3E:5F9234CF-C7F4-496F-B5F4-646CA2537157


fmm-computer-name David%e2%80%99s MacBook Pro (2)


auto-boot true


bootdelay 0

May 5, 2024 8:06 AM in response to jaeh3ang

Tried “sudo nvram auto-boot=false” with brand new MacBook Pro Sonoma 14.4.1. Computer refused to start after shut down and opening lid. Had to hold down power key and select hard drive to make it start up. Would not recommend using this command in terminal.

Is Apple trying to micromanage the behavior of the user? I would prefer to not have my computer start every time I open the lid. Apple needs to remove this behavior from their OS. Thinking about returning this laptop for a full refund…

May 7, 2024 8:50 AM in response to faheemkodi

faheemkodi wrote:

WARNING: Please don't `sudo nvram auto-boot=false`

I tried and it bricked my Macbook Air M1. Had to revive it using Configurator with another Macbook.

Good to know. Thanks for the update.


FYI, you may have been able to recover by booting into Recovery Mode and clearing the NVRAM by using the following command in the Terminal app located on the Utilities menu on the menu bar:

nvram  -c


This command to clear the NVRAM is safe as I have used it on Apple Silicon M-series Macs and can sometimes allow a M-series Mac to boot normally again. You may see it report an error being unable to delete the computer name (may be several related errors) which is normal & can be ignored. If the Mac boots normally again, then make sure to remember to update the default Startup Disk System Settings to point to the internal boot drive since the default startup disk was cleared when clearing the NVRAM.

May 13, 2024 9:39 PM in response to simontompkins

simontompkins wrote:

Hi
It doesn't look good when some of the solutions have caused issues.

Apple is not here on this forum. All suggestions come from other regular users such as yourself. It doesn't help that Apple does not always provide detailed documentation of their systems. On my M1 & M2 laptops, there is an NVRAM variable called "auto-boot" which is set to "true". I have no clue what this actually does or why it is there since I have not configured it. If something is configured as "true", it should also be configurable to "false", but it is Apple after all, so all bets are off these days.


The only "nvram" command I know that works and is safe for both Intel & Apple Silicon M-series Macs is the one to clear all of the NVRAM settings/variables which I listed (nvram -c) since I have used it on multiple M-series Macs to successfully fix issues (usually boot related issues). Any other "nvram" options to configure NVRAM variables/settings that are found online are only meant for Intel based Macs.


I've sent a feedback to Apple, hopefully the more of us send a complaint the more likely they will to change it.

We can only hope. I'm convinced no one approving these ridiculous configurations are actually using their own creations day to day.

May 28, 2024 9:44 AM in response to DreaM8118

There is no "AutoBoot" variable set by default unless you added it yourself.


I'm not sure why you got all that as output since you should have had nothing on the output since it should not be "Autoboot", but "AutoBoot" unless the wrong variable was used to configure. It appears you may have had a typo " -| " for the pipe which may explain seeing the complete output of the "nvram -p" command not being filtered.

from command output (last line):

nvram: Error getting variable - '|': (iokit/common) data was not found


Better to filter as:

grep  -i  'auto'


to get all possibilities including mistyped or incorrect variable names.


If you know the actual variable name, you don't even need to use "grep":

nvram  AutoBoot


will do the same thing, but you must type the variable name correctly with this option.


I have no idea what the "auto-boot" variable does or controls. It does appear on both Intel & M-series Macs.


How to disable boot on lid opening on my MacBook Pro?

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