关闭MacBook会使其进入睡眠状态。所有前台和后台应用程序和服务都将暂时暂停,直到您重新打开盖子。例如,如果您正在播放音乐,则关闭Mac会停止播放歌曲。在MacBook(MacBook)上下载文件或安装应用程序?当您合上盖子时,macOS 将暂停(或终止)活动。
在本指南中,我们将向您介绍两种在合上盖子时让Mac保持清醒的方法。(Mac)
您可能需要这样做有几个原因。假设(Say)您想在盖子关闭的情况下将 Mac 用作网络服务器(use your Mac as a network server)。或者,您可能正在咖啡店下载一些文件,但不想让您的MacBook在桌子上打开。
您可以开始下载,将Mac塞进包里,一边在后台继续下载一边享用咖啡。还有其他用例,但让我们跳到关闭盖子时防止Mac休眠的技术。(Mac)
本机方法(Native Method):将您的Mac连接到外部(External)显示器
macOS 是一个智能操作系统,具有明显而鲜为人知的功能。例如,操作系统会在检测到外接显示器或投影仪时让您的(detects an external monitor or projector)Mac保持正常运行。这称为封闭显示模式(Closed-Display Mode)或封闭翻盖模式(Close-Clamshell Mode)。
在此模式下,即使盖子合上,您的Mac也会保持开机状态。(Mac)您需要做的就是连接以下设备或外围设备并合上Mac的机盖:
- 外接显示器(显示器或投影仪)
- 外接键盘(有线或无线)
- 外接鼠标或触控板(有线或无线)
您很可能需要具有兼容端口的USB集线器才能完成此操作,尤其是在您的(USB)Mac端口有限的情况下。
还有一件事:(One more thing:)您需要将Mac插入电源才能使这种安排正常工作。因此,除了连接上述外围设备外,插入Mac的电源适配器,一切就绪。
当这些就位后,您可以在合上盖子的情况下通过外接显示器访问您的Mac。
请注意,某些 4K 和 5K 显示器可以在充当外部显示器时为您的Mac供电。(Mac)如果您有这种类型的显示器(查看说明手册或访问制造商的网站进行确认),则无需将Mac连接到交流电源适配器。
Apple 建议(Apple recommends)在断开外接显示器之前让您的Mac进入睡眠状态。(Mac)因此,打开Mac的盖子,单击菜单栏上的Apple标志,然后选择(Apple)睡眠(Sleep)。您也可以选择关闭(Shut Down)以完全关闭它;你的选择。只是(Just)不要在Mac处于关闭显示(Closed-Display)模式时拔掉外接显示器。
方法二:使用第三方应用
在合上盖子的情况下保持Mac开机的本机方法需要外接显示器、鼠标和键盘。但是,如果您没有这些外围设备怎么办?这就是安非他明(Amphetamine)等第三方应用程序的用武之地。
它是一个可靠的“保持唤醒”实用程序,具有多种功能,可帮助管理 Mac 的显示器。您可以使用安非他明(Amphetamine)来防止 Mac 在机盖打开(prevent your Mac from sleeping with the lid opened)或关闭的情况下进入睡眠状态。它完全免费,可在 macOS App Store中获得。
根据我们的经验,该应用程序是轻量级的(不使用过多的系统资源),没有应用内购买或广告,并且运行良好。打开App Store并搜索Amphetamine。如果您在Mac(Mac)上阅读本文,请访问App Store 上的安非他明详细信息页面。(the Amphetamine details page)
安装该应用程序并按照以下步骤了解如何使用它来防止您的Mac在合上盖子时进入睡眠状态。
1.从Launchpad或Applications文件夹启动Amphetamine 。您应该会在 Mac 的状态菜单((Status Menu—the) Mac 菜单栏的右侧)上看到一个药丸形图标。(pill-shaped icon)选择此图标可访问安非他明的菜单选项。
安非他命(Amphetamine)没有前置界面,所以菜单栏是您设置所有内容的地方。
2. 在 Amphetamine 菜单上,转到Quick Preferences并取消选中Allow system sleep when display is closed。
3.屏幕上会弹出一个显示安非他明封闭显示模式的特点和效果的窗口。(Closed-Display)通读以了解如何使用该应用程序。单击“(Click) 确定(OK)”继续。
4. 返回应用程序的菜单,然后选择关闭机盖的情况下保持Mac开机的时间。(Mac)
- 无限期:(Indefinitely:)将让您的Mac保持开启状态,直到您手动结束 Closed-Lid 会话。
- 分钟:(Minutes:)您可以选择一个预设时间段(介于 5 到 55 分钟之间),在该时间段内应用程序会阻止您的Mac进入睡眠状态。
- 时间:(Hours:) 安非他明(Amphetamine)带有预设时间:1-10 小时、12 小时或 24 小时。选择您喜欢的持续时间,您的Mac将在设定的时间范围结束时进入睡眠状态。
- Other Time/Until: 如果要设置首选持续时间(以分钟或小时为单位),请单击此选项。(Click)
- 应用程序运行时:(While App is Running:)允许您在特定应用程序在前台运行时保持Mac开启。当您单击此选项时,安非他明(Amphetamine)将显示所有应用程序。选择一个应用程序,然后单击选择(Select)按钮。在所选应用程序运行时,您的Mac将保持唤醒状态,即使您合上盖子也是如此。如果您希望Mac在合上盖子时播放歌曲,只需将Apple Music添加到此会话配置即可。
- 正在下载文件时:(While File is Downloading:)如果您的设备进入睡眠状态,macOS 会中断正在进行的下载。发生这种情况很烦人,尤其是如果您必须从头开始重新下载。您可以使用“正在下载文件(File)时”选项来防止这种情况发生;安非他明(Amphetamine)将让您的Mac保持打开状态,直到下载完成。
您无需连接电源即可使用苯丙胺。(Amphetamine)尽管在此模式下 Mac 的电池电量可能会更快耗尽,但您可以将应用程序配置为在电池电量降至特定百分比时结束会话。打开应用程序的菜单并选择Preferences。
在System Defaults选项卡中,选择显示为:End session if charge (%) is below的选项。之后(Afterward),使用滑块选择安非他明(Amphetamine)将结束封闭式显示(Closed-Display)会话的电池电量。
要停止 Closed-Display 会话,请打开 Mac 的盖子,选择菜单栏上的药丸形图标,然后选择End Current Session按钮。
要从菜单栏中删除安非他明(Amphetamine),请打开活动监视器(Activity Monitor)并强制退出应用程序(force quit the app)。
还有其他很棒的应用程序可以帮助防止您的Mac在合上盖子的情况下睡觉,但安非他明(Amphetamine)确实做得很好。此外,它还提供有趣的自动化和自定义选项。
需要注意的重要事项
关闭盖子时让您的Mac保持清醒也有一些缺点。(Mac)一方面,您的设备可能会异常发热。这通常发生在您运行太多应用程序或Mac长时间处于关闭显示模式时。(Closed-Display)为了缓解这种情况,请将封闭的Mac放在凉爽、通风良好的房间内。
合上盖子时将Mac置于垂直位置(使用垂直的笔记本电脑支架,如果有的话),这样设备的热量会更均匀地散发,尤其是底部外壳的热量。最后,当Mac(Mac)处于Closed-Display模式时,请避免将其长时间放在背包或其他封闭空间中。如果您有任何问题,请发表评论。
How to Keep Your Mac On Even With the Lid Closed
Closing your MacBook will put it to sleep. All fоreground and background apps and servicеs will be temporarily paused until yоu reopen the lid. If you’re playing music, for example, closing your Mac stops thе song. Downloading a file or installing an app on yоur MacΒook? macOS will рause (or terminate) the actіvitіes when yoυ close the lid.
In this guide, we’ll walk you through two methods to keep your Mac awake when the lid is shut.
There are several reasons why you may need to do this. Say you want to use your Mac as a network server with the lid closed. Or perhaps, you’re downloading some files at a coffee shop but don’t want to leave your MacBook opened on the table.
You can start the download, tuck the Mac in your bag, and enjoy your coffee while the download continues in the background. There are other use cases, but let’s jump to the techniques to prevent your Mac from sleeping when the lid is closed.
The Native Method: Connect Your Mac to an External Display
macOS is an intelligent operating system with obvious and little-known features. For example, the OS will keep your Mac up and running when it detects an external monitor or projector. This is called the Closed-Display Mode or Close-Clamshell Mode.
In this mode, your Mac will stay on, even when the lid is closed. All you need to do is connect the following devices or peripherals and shut your Mac’s lid:
- An external display (monitor or projector)
- An external keyboard (wired or wireless)
- An external mouse or trackpad (wired or wireless)
You most likely would need a USB hub with compatible ports to get this done, particularly if your Mac has limited ports.
One more thing: You need to plug your Mac into a power source for this arrangement to work. So, in addition to connecting the above-mentioned peripherals, plug in your Mac’s power adapter and you’re all set.
When these are in place, you can access your Mac on the external display with the lid closed.
Note that some 4K and 5K monitors can power your Mac while acting as an external display. If you have this type of monitor (check the instruction manual or visit the manufacturer’s website to confirm), you don’t need to connect your Mac to the AC power adapter.
Apple recommends putting your Mac to sleep before disconnecting the external display. So, open your Mac’s lid, click the Apple logo on the menu bar, and select Sleep. You could also select Shut Down to turn it off completely; your choice. Just don’t unplug the external display while your Mac is in Closed-Display mode.
Method 2: Use a Third-Party App
The native method of keeping your Mac turned on with the lid closed requires an external display, a mouse, and a keyboard. But what if you don’t have any of these peripherals? That’s where third-party applications like Amphetamine come in.
It’s a reliable “keep-awake” utility with several functionalities that help manage your Mac’s display. You can use Amphetamine to prevent your Mac from sleeping with the lid opened or closed. It is totally free and available in the macOS App Store.
From our experience, the app is lightweight (doesn’t use excessive system resources), has no in-app purchases or ads, and works perfectly. Open the App Store and search for Amphetamine. If you’re reading this article on a Mac, visit the Amphetamine details page on the App Store.
Install the app and follow the steps below to learn how to use it to prevent your Mac from sleeping when the lid is closed.
1. Launch Amphetamine from the Launchpad or Applications folder. You should see a pill-shaped icon on your Mac’s Status Menu—the right-side of your Mac’s menu bar. Select this icon to access Amphetamine’s menu options.
Amphetamine doesn’t have a front-facing interface, so the menu bar is where you set up everything.
2. On the Amphetamine menu, go to Quick Preferences and uncheck Allow system sleep when display is closed.
3. A window displaying the features and effects of Amphetamine’s Closed-Display mode will pop up on the screen. Read through to understand how to use the app. Click OK to proceed.
4. Return to the app’s menu and choose how long you want to keep your Mac turned on with the lid closed.
- Indefinitely: Will keep your Mac on until you manually end the Closed-Lid session.
- Minutes: You can choose a preset period (between 5 to 55 minutes) within which the app will prevent your Mac from sleeping.
- Hours: Amphetamine comes with preset hours: 1-10 hours, 12 hours, or 24 hours. Choose your preferred duration and your Mac will go to sleep when the set time frame ends.
- Other Time/Until: Click this option if you want to set your preferred duration (in minutes or hours).
- While App is Running: Allows you to keep your Mac turned on while a specific app is running in the foreground. When you click this option, Amphetamine will display all apps. Choose an app and click the Select button. Your Mac will stay awake while the selected app is running, even when you close the lid. If you want your Mac to play songs when you shut the lid, simply add Apple Music to this session configuration.
- While File is Downloading: macOS interrupts ongoing downloads if your device goes to sleep. It’s annoying when this happens, especially if you have to restart the download from scratch. You can use the “While File is Downloading” option to prevent this from happening; Amphetamine will keep your Mac on until the download is complete.
You can use Amphetamine without having to connect to a power source. Although your Mac’s battery might drain faster in this mode, you can configure the app to end a session when your battery drops to a certain percentage. Open the app’s menu and select Preferences.
In the System Defaults tab, select the option that reads: End session if charge (%) is below. Afterward, use the slider to select the battery level below which Amphetamine would end the Closed-Display session.
To stop a Closed-Display session, open your Mac’s lid, select the pill-shaped icon on the menu bar and select the End Current Session button.
To remove Amphetamine from the menu bar, open the Activity Monitor and force quit the app.
There are other great apps that can help prevent your Mac from sleeping with the lid closed, but Amphetamine does a really great job. Plus, it sports interesting automation and customization options.
Important Things to Note
Keeping your Mac awake when the lid is closed comes with some downsides, too. For one, your device may get abnormally hot. This mostly happens when you’re running too many apps or when your Mac is left in Closed-Display mode for too long. To mitigate this, keep the closed Mac in a cool, well-ventilated room.
Place the Mac in a vertical position when you shut the lid (use a vertical laptop stand, if you have one) so that heat dissipates from the device more evenly, particularly from the bottom case. Finally, avoid keeping your Mac in a backpack or other enclosed spaces for too long when it’s in Closed-Display mode. Drop a comment if you have any questions.