---
title: "Startup Options on MacOS (Lid and Power Connections)"
slug: startup-options-on-macos-lid-and-power-connections
canonical_url: https://nerdymomocat.github.io/posts/startup-options-on-macos-lid-and-power-connections/
collection: Stream
published_at: 2025-01-31T00:00:00.000Z
updated_at: 2025-01-31T00:00:00.000Z
tags: 
  - "🌲 Evergreen"
  - Tips
  - MacOS
author: "Nerdy Momo Cat"
---

## Navigation Context

- Canonical URL: https://nerdymomocat.github.io/posts/startup-options-on-macos-lid-and-power-connections/
- You are here: Home > Posts > Stream > Startup Options on MacOS (Lid and Power Connections)

### Useful Next Links
- [Home](https://nerdymomocat.github.io/)
- [Bundles](https://nerdymomocat.github.io/collections/bundles/)
- [Logbook](https://nerdymomocat.github.io/collections/logbook/)
- [Notes](https://nerdymomocat.github.io/collections/notes/)
- [Stream](https://nerdymomocat.github.io/collections/stream/)

My partner always hated how opening the screen on the laptop used to lead to turning on the laptop. Of course he switched off from macOS but I would like to collect these tips and trips together at some place just to make sure that I have them at hand and don't go searching over the internet. And so this is written by MacRumors linked below and I'm copy pasting the relevant stuff here.

[

Apple Explains How to Keep Your Mac From Turning on When Opening Lid

Apple designed Macs with Apple silicon chips to automatically turn on and start up when the Mac’s lid is opened or when the Mac is connected to power, but there is a workaround in macOS Sequoia if you don’t like this behavior. In a new support document, Apple provided separate instructions on how to prevent an Apple silicon Mac from turning on when the lid is opened or when it’s connected to power. Both processes require the Terminal app. Apple’s instructions: 1.

![title](https://www.google.com/s2/favicons?domain=www.macrumors.com)

https://www.macrumors.com/2025/01/30/apple-keep-mac-turning-on-lid-open/

![title](https://images.macrumors.com/t/jl2ykyi7crfmSfeDu2xcktHpIdA=/2500x/article-new/2024/09/m3-macbook-pro-blue.jpeg)

](https://www.macrumors.com/2025/01/30/apple-keep-mac-turning-on-lid-open/)

Bookmark for [https://www.macrumors.com/2025/01/30/apple-keep-mac-turning-on-lid-open/](https://www.macrumors.com/2025/01/30/apple-keep-mac-turning-on-lid-open/)

```
#!/bin/bash

# This script modifies the Mac's startup behavior using the nvram command.
# Run this script in Terminal with the appropriate option.

echo "Choose an option to modify startup behavior:"
echo "1) Prevent startup when opening the lid or connecting to power"
echo "2) Prevent startup only when opening the lid"
echo "3) Prevent startup only when connecting to power"
echo "4) Undo changes (restore default behavior)"
read -p "Enter your choice (1-4): " choice

case $choice in
    1)
        sudo nvram BootPreference=%00
        echo "Startup is now prevented when opening the lid or connecting to power."
        ;;
    2)
        sudo nvram BootPreference=%01
        echo "Startup is now prevented only when opening the lid."
        ;;
    3)
        sudo nvram BootPreference=%02
        echo "Startup is now prevented only when connecting to power."
        ;;
    4)
        sudo nvram -d BootPreference
        echo "Startup behavior restored to default."
        ;;
    *)
        echo "Invalid choice. No changes made."
        ;;
esac

# The user will be prompted for their administrator password when running the script.
# Terminal does not display the password while typing.
```