The MacBook series automatically goes to sleep when you close the screen, but you may not want to put it to sleep.
Here, I will explain in detail the two steps, one using the standard Mac functions and the other using the app, with illustrations.
Introducing “Clamshell Mode (Lid Close Mode)” for Mac
Notebook Macs have traditionally been called “Clamshell Mode (Lid Close Mode)”.
This is a way to use your Mac without going to sleep with the screen closed if the following conditions are met:
- Connect AC power supply
- Connect an external display
- Connect an external keyboard (USB or Bluetooth connection)
- Connect a trackpad or mouse (USB or Bluetooth connection)
In other words, if the above conditions are not met, it will go to sleep when the screen is closed.
Then, for example, if you want to download a file for a long time, encode a video, or use a Mac as a server without connecting an external display, you want to close the screen but put the power to sleep. There are times when there is no such thing.
Hereafter, I will show you how to do it.
① How to use the terminal command line
You can set it by executing the command line from “Terminal” which is a standard tool of Mac without installing some application.
①-1 Steps to disable / enable sleep when the screen is closed
▶ Start “Terminal” from the Finder folder “Applications” – “Utilities”.
▶ When “Terminal” starts, copy one of the following commands and paste it in the location of the command prompt.
Command to disable sleep
sudo pmset -a disablesleep 1
Command to enable sleep
sudo pmset -a disablesleep 0
In the following screens, it is the case of “Command to disable sleep” as a sample.
▶ To paste, select “Paste” from the right-click menu or select the keyboard shortcut command ⌘ + V.
▶ After pasting the command, press return on your keyboard to execute it.
▶ You’ll be prompted for a password, enter the password you used to install the app or log in to your Mac, then press return.
▶ After executing the command, check the following “①-2 Steps to check the current settings” to make sure that the settings are correct.
①-2 Steps to check the current settings
▶ Start “Terminal”, copy the following command, and paste it at the command prompt.
pmset -g
▶ After pasting the command, press return on your keyboard to execute it.
▶ Check the “SleepDisabled” line in the command execution result.
- If 1, sleep is disabled
- If 0, sleep is enabled
▶ After completing the settings, select “Terminal” – “Exit Terminal” from the “Terminal” menu bar to exit the terminal.
② How to use the app “Amphetamine”
It’s unlikely that you’ll find an app that doesn’t put you to sleep with the screen closed.
In the past, the app “Insomnia X” was a standard, but its update has stopped since 2016, and it is difficult to install or install it after macOS 10.12 Sierra.
At the moment in 2021, an app called “Amphetamine” has become a staple.
This app is free and distributed from Apple’s official Mac App Store, so it is highly reliable in terms of security.
It is compatible with macOS 10.11 El Capitan and later, and is also compatible with M1 Mac and macOS 11.0 Big Sur.
Also, since it is a very versatile app, if you haven’t used it yet, we recommend that you first read the article linked below to see how to use it roughly.
From now on, we will introduce the procedure to prevent sleep even if the screen is closed, assuming that “Amphetamine” is already installed.
▶ With Amphetamine running, click the icon on the menu bar to display the menu.
▶ When the menu is displayed, select “Preferences …”.
▶ When “Preferences” opens, click the tab “Session Defaults” at the top of the screen.
▶ After switching to “Session Deafaults”, uncheck “Closed-Display Mode: Allow system sleep when display is closed”.
▶ When “About Closed-Display Mode Sessions” is displayed as shown in the figure below, click the button “Get Amphetamine Enhancer” at the bottom of the screen.
You can use the wakeup function without installing this “Amphetamine Enhancer”, but install it safely as explained here.
▶ As shown in the figure, a web browser opens and the GitHub site opens.
Once open, click the “Right here” link below “Where Do I download Amphetamine Enhancer?” at the bottom of the screen.
Below is the screen near the bottom.
▶ When the application download screen is displayed, save (download) it in a suitable location.
▶ After downloading, open the file and drag and drop “Amphetamine Enhancer” into the folder “Applications” to install it.
▶ When you’re done dragging and dropping, double-click to launch it.
▶ There is a security check when you start it for the first time, so click the “Open” button when the screen shown in the figure opens.
▶ When the installation screen is displayed as shown, select “Closed-Display Mode Fail-Safe” from the list on the left and click the “Install” button.
▶ If “Install was successful” is displayed as shown in the figure, the installation is successful.
▶ To close “Amphetamine Enhancer”, select “Amphetamine Enhancer”-“Quit Amphetamine Enhancer” from the menu bar.
▶ Just in case, restart your Mac.
▶ After rebooting, uncheck “Closed-Display Mode: Allow system sleep when display is closed” from “Session Defaults” in Amphetamine’s “Preferences” again.
▶ When “About Clamshell Mode Session” is displayed as shown in the figure below, click the “Confirm” button at the bottom of the screen.
▶ When you return to the settings screen, make sure it is unchecked.
▶ In addition, click the “General” tab and check “Launch Amphetamine at login”.
Please note that if this is not checked, that is, if Amphetamine is not running, it will go to sleep when the screen is closed.
▶ After completing all the settings, click the red button at the top left of the screen to close the screen.
Conclusion
On this page, I’ve introduced two ways to keep your Mac from sleeping when you close it.
There is no particular superiority or inferiority, so I think that you should choose according to the circumstances and tastes of each individual.
Recommended for these people | |
① How to use the terminal command line |
|
② How to use the app “Amphetamine” |
|
If you close the screen and continue high-load processing for a long time, there is a high possibility that the built-in battery and logic board will deteriorate or malfunction, so be careful of heat dissipation by hitting it against metal.
In my personal experience, when I was developing with Xcode or Android Studio using clamshell mode (lid close mode) on a MacBook Pro 15 inch, the battery swelled due to heat.
Reference Information
コメント