Automatically turn off the external monitor when the MacBook is closed (Clamshell mode off, No clamshell mode)


 

MacBook sleeps when the lid is closed

The MacBook goes to sleep when the lid is closed.

When the MacBook sleeps, the light comes on as shown in the video below. looks like it's sleeping There have been times Unfortunately, this light disappeared from time to time as only the design became prettier. Below is a picture of my MacBook in 2008.

 

When the MacBook went to sleep, the connected external monitor was also turned off.

Windows laptops often went into hibernation mode by closing the lid and did not come back to life when reopened. That is why, Windows laptop users can still see the laptop lid open while moving in the office while using Windows 10. Even people who have just moved from Windows to Mac may open the lid of their MacBook and move.

 

 

Using an external monitor with the MacBook lid closed

These days, it seems to be becoming the norm to connect and use an external monitor to the MacBook. when working with a computer The bigger the monitor, the better the productivity.It seems reasonable to say that

Many people who use an external monitor connected use the MacBook as a desktop. In other words, close the MacBook, use an external monitor as the monitor, and use a separate keyboard and mouse.

(photo source)

 

So Apple Use an external monitor, keyboard and mouse with the MacBook lid closedallows you to

When you close the lid of the MacBook, the MacBook goes to sleep, but unlike before, the external monitor does not turn off. In this state, if you use an external mouse or keyboard, the MacBook will wake up with the lid closed.

When you close the lid of the MacBook, it goes into sleep mode, but if you use a mouse or keyboard, it stays still even when the lid is closed.

When it is turned on with the lid closed, it is called clamshell mode or clamshell mode.

 

As people's usage conditions change, so does the way machines operate.

 

 

Using a MacBook and an external monitor together

Usually, when using a dual monitor, you put it on the left and right, and when the external monitor becomes large enough, you do not need to use the MacBook at all. So, when I use my MacBook at the office, I just see it as a computer and close the lid of the MacBook before using it.

I use my MacBook by connecting it to an external monitor, but I also use a MacBook.

I started using the external monitor from 17 inches, but I use 24 inches without using a very large one. It's because they don't use video or music software, and they grow bigger than this, but they have to turn their heads a lot.

So I want the external monitor to turn off when I close the lid of the MacBook.

First use of MacBook in 2007As I connected to a 17-inch external monitor and used it, the monitor size and MacBook continued to change, but the use of the external monitor does not seem to have changed.

Below is a picture of the MacBook and 2007-inch monitor when I first used it in 17.

 

The picture below is this year's 2009 MacBook and a 24-inch monitor.

 

 

Putting the MacBook to sleep turns off the external monitor

If you press the apple button on the Mac and press the sleep menu, the MacBook goes to sleep and the external monitor turns off. Then close the MacBook lid.

 

It is recommended to close the lid as dust can get into the MacBook.

But this is inconvenient. You just close the lid and you have to do the rest. It's inconvenient like unlocking the lock and turning the handle when opening the front door. This is a Hankyu that I made a long time ago. interaction design patternI have to solve it with

 

 

 

 

When you close the lid of the MacBook, the external monitor also turns off.

Many people use the MacBook with the lid closed, but I have a problem using it as before.

When I close the lid of my MacBook at the office or at home, I want the MacBook to sleep and the external monitor to turn off.

But these days, as I said earlier, this is not the case. Even with the MacBook lid closed, the external monitor remains alive.

I searched and found it wasn't just me.

 

There is a way.

 

Disable Klemshell Mode in macOS 10.10 (Yosemite)

command below in terminalJust copy and paste it and hit enter.

sudo nvram boot-args=iog=0x0

 

If you want to use it as is, write below

sudo nvram boot-args

 

macOS 10.12 (Sierra) or later (works on Mojave and Big Sur)

Above Sierra, the above method does not work. It is said that the nvram command was blocked in the terminal for security reasons.

In my case it's Mojave, macOS 10.14. It's a security issue, so I went into recovery mode and tried it. When I put the command, I don't get an error, but there was no feedback that it went well, and even if I booted in normal mode, it was still alive on the external monitor even if I closed the lid.

There doesn't seem to be a perfect way. Instead, I found that someone had written the script.

https://github.com/pirj/noclamshell

It is said that the power management setting is adjusted with pmset while monitoring the sleep by closing the lid.

Anyway, I installed it! The external monitor does not turn off immediately, the mouse is visible, but after a while it turns off completely.

The installation method is as follows.

 

1.homebrew install

If you do not have homebrew installed, install home brew first. The installation method is simple. Copy and paste the following command in the terminal and hit enter. detailed way this pagerefer to

/ usr / bin / ruby ​​-e "$ (curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

 

2. noclamshell install

Copy and paste the following commands one by one into the terminal and press Enter.

brew install pirj/homebrew-noclamshell/noclamshell brew services start noclamshell

 

 

Now when I close the lid of the MacBook, the external monitor goes black, and after a while the external monitor turns off.

However, if you move the mouse, it will come back to life after a while. I waited more and the external monitor did not turn off.

Unfortunately, it is convenient to use it like this.

 

Disable Clemshell Mode on M1 Mac

Change to m1 macbook airThen I closed the lid of the MacBook, but the external monitor did not turn off. noclamshell did not work properly. There was also a question in the comments of this post. By the way, noclamshell github issuethere is a solution to I test it! However, the code modified by the developer must be uploaded to the issue only, and the code must be directly modified.

If you have already installed noclamshell, you can directly change the code as shown below.

  1. Go to /opt/homebrew/bin/ in Finder.
    In the Finder menu, click Go > Go to Folder, paste the path, and click the Go button to open the folder.
  2. Open the noclamshell file with a text editor.
  3. Change the original code to the following code.
#!/usr/bin/env bash LID_CLOSED=$(ioreg -r -k AppleClamshellState | grep AppleClamshellState | grep Yes) if [ "$LID_CLOSED" ]; then CLAMSHELL=$(pmset -g powerstate | grep DCPDPDeviceProxy | wc -l) if (( CLAMSHELL < 4 )); then pmset sleepnow fi EXTERNAL_DISPLAY_CONNECTED=$(pmset -g powerstate | grep AppleDisplay | grep USEABLE) if [ "$EXTERNAL_DISPLAY_CONNECTED" ]; then AWAKE=$(pmset -g powerstate | grep IODisplayWrangler | grep USEABLE) if [ "$AWAKE" ]; then pmset sleepnow fi fi fi

 

If you close the lid of the MacBook while an external monitor is connected, the external monitor turns off. Depending on the monitor, it may not work, but in my case, it worked for two monitors.

 

Added to the existing code is if [ “$LID_CLOSED” ]; then below

CLAMSHELL=$(pmset -g powerstate | grep DCPDPDeviceProxy | wc -l) if (( CLAMSHELL < 4 )); then pmset sleepnow fi

 

 

 

 

Using clemshell mode again

noclamshell To use the clemshell mode again after turning off the clemshell mode with , run it in the terminal as follows.

brew services stop noclamshell brew uninstall pirj/homebrew-noclamshell/noclamshell

 

 

concluding

Finally, when the MacBook is connected to an external monitor and not in use, the external monitor turns off and the MacBook sleeps when the lid of the MacBook is closed. It has been like this since 2007, when I first used a MacBook.

However, people closed the lid of the MacBook and used it only as an external monitor, using an application that did not sleep even when the lid of the MacBook was closed, and Apple changed it so that it does not sleep even when the lid is closed.

An app that prevents you from sleeping even when you close the lid of your MacBook is broken, and someone wrote a shell script to make you sleep like me. After searching the internet for several months, the only way to put my MacBook to sleep with an external monitor connected, including even a MacBook with an M1 chip, is the noclamshell introduced above. It's ironic.

 

 

 







Recommendations





1 If you like the article, please click the heart~ It will be a strength to bloggers (SNS/login/advertising is not related)



Articles you might like







Health to Calendar

Import your Apple health records into your calendar events and view your health records chronologically on your calendar












18 Comments

Add a Comment

Email addresses are not disclosed. Required items *is indicated by

























This posting is part of Coupang Partners' activities, and a certain amount of commission is provided accordingly.