Preventing Sleep Mode: Keep Your Mac Awake With Lid Closed

how to close lid of mac without sleeping

If you want to close your MacBook's lid without it falling asleep, you have a few options. One way is to use a third-party app like Amphetamine or Caffeinated, which can keep your MacBook awake even when the lid is closed. Alternatively, you can change your system settings to prevent your MacBook from automatically sleeping when the display is off. Another option is to use a wired or wireless mouse, which can wake your computer when it's connected to an external display. Finally, if you're running macOS Ventura or later, you can use the Terminal to schedule your Mac to turn on or off at specific times.

Characteristics and Values

Characteristics Values
Preventing Mac from sleeping when the lid is closed Use an external display/keyboard/mouse and AC power
Use a third-party app such as Amphetamine or Caffeinated
Use a wireless or wired mouse
Use a Bluetooth remote or game controller
Use the Mac sleep scheduler
Use the Terminal command
Use the Console command 'Caffeinate'
Use the app 'Screen Curtain'
Use a dummy HDMI adapter to fake an external display

shunsleep

Use an external display, keyboard, mouse and AC power

If you want to use your MacBook with the lid closed, you can do so by plugging it into an external display, keyboard, and mouse, along with AC power. This setup is known as "clamshell mode." Here are the detailed steps to set up and use your MacBook in clamshell mode:

Step 1: Gather the Required Equipment

Firstly, ensure you have all the necessary components: an external display (monitor), a keyboard, a mouse, and the AC power adapter for your MacBook. The external display can be connected to your MacBook via an HDMI or other compatible port.

Step 2: Connect the External Display

Connect your MacBook to the external display using the appropriate cable. Depending on your MacBook model and external display, you may need an adapter, such as an HDMI adapter, to establish the connection. Once connected, you can adjust your display settings to extend or mirror your MacBook's screen onto the external display.

Step 3: Connect the External Keyboard and Mouse

Next, connect your external keyboard and mouse to your MacBook. You can use either wired or wireless options. For a wired connection, simply plug the devices into the available USB ports on your MacBook. For a wireless connection, pair your Bluetooth keyboard and mouse with your MacBook by going to Apple menu > System Preferences > Bluetooth and ensuring the devices are discoverable.

Step 4: Power Your MacBook

Finally, plug your MacBook into an AC power source using the power adapter. This step is crucial, as your MacBook is more likely to stay awake with the lid closed when it is plugged in and charging.

Step 5: Adjust MacBook Settings (Optional)

Depending on your preferences and MacBook model, you may want to adjust certain settings to optimise your clamshell mode setup:

  • Brightness: Before closing the lid, you can turn down the screen brightness to effectively turn off the display. Go to Apple menu > System Settings > Display and adjust the brightness slider.
  • Prevent Sleep: If you want to prevent your MacBook from automatically sleeping, you can adjust the power settings. Go to Apple menu > System Preferences > Battery (or Energy Saver) and select "Prevent your Mac from automatically sleeping when the display is off."
  • Wake for Network Access: If desired, you can set your MacBook to wake up when it has access to a network. Go to System Settings > Battery > Options and enable "Wake for network access."

With these steps, you can effectively use your MacBook with the lid closed by utilising an external display, keyboard, mouse, and AC power connection.

shunsleep

Download a third-party app like Amphetamine or Caffeinated

If you want to prevent your MacBook from going to sleep when you close the lid, you can download a third-party app like Amphetamine or Caffeinated.

Amphetamine

Amphetamine is a free and popular app designed to keep your Mac awake. It overrides the Energy Saver settings on your Mac, allowing you to keep your MacBook awake while its lid is closed. The app offers a simple on/off switch, as well as advanced features and customization options. For example, you can lock your Mac's screen after a period of inactivity, move the mouse cursor periodically, keep your drive awake, and more. Amphetamine also supports Retina displays and macOS dark mode.

To use Amphetamine, download the app from the Mac App Store. Once installed, you will find a pill-shaped icon in the menu bar at the top of your screen. Click on the icon, then click on "Quick Settings." In the Session Defaults section, deselect "Allow system sleep when display is closed."

Caffeinated

Caffeinated is another app available on the Mac App Store for $3.99/£3.99. Similar to Amphetamine, it overrides the Energy Saver settings to keep your Mac awake and prevent it from sleeping. With Caffeinated, you can specify the duration for which you want to keep your MacBook awake.

Other Options

In addition to Amphetamine and Caffeinated, there are a few other third-party apps that can help prevent your MacBook from sleeping when the lid is closed. These include NoSleep, Fermata, and Caffeine.

shunsleep

Change settings in System Preferences to prevent sleep mode

If you want to prevent your MacBook from going to sleep when you close the lid, you will need to connect it to an external display, keyboard, and mouse, as well as AC power. This setup is known as clamshell mode.

To change settings in System Preferences to prevent sleep mode, follow these steps:

  • Open System Preferences.
  • Go to Battery (or Energy Saver).
  • Select "Prevent your Mac from automatically sleeping when the display is off."
  • Click on Options.
  • Make sure "Wake for network access" is set to Always.
  • Go to System Settings > Lock Screen > Turn display off on power adapter when inactive, and choose Never.
  • If you are using macOS Ventura or later, you will need to use Terminal to schedule your Mac to turn on or off.
  • Open Terminal and enter one of the following pmset commands: pmset -g sched (to see the current schedule), sudo pmset repeat wake M 8:00:00 (to schedule your Mac to wake at 8:00 a.m. every Monday), or sudo pmset repeat cancel (to cancel the current schedule).
  • Press Return and authenticate with your admin password.

Please note that some sources suggest that even with these settings, your MacBook will still go to sleep when you close the lid unless it is connected to an external display.

shunsleep

Use a wireless or wired mouse to wake the computer

If you want to use your MacBook with the lid closed, there are a few things you can do to prevent it from going to sleep. One option is to use a wireless or wired mouse to wake the computer. Here are some detailed steps to help you achieve this:

Firstly, ensure that your MacBook is connected to an external display. This is important because the MacBook will only stay awake when the lid is closed if it is plugged into an external monitor or screen. So, connect your MacBook to a secondary display using an HDMI or other compatible cable.

Now, acquire a wireless or wired mouse that is compatible with your MacBook. A Bluetooth wireless mouse should work seamlessly with your MacBook. If you prefer a wired option, a standard USB mouse will also get the job done. Connect the mouse to your MacBook either wirelessly or via a USB port.

Next, you can test the setup by closing the lid of your MacBook. With the external display turned on, move or click the mouse to wake the computer. The MacBook should respond to the mouse input and activate the connected external display.

Additionally, you can also use a Bluetooth game controller or remote to wake the computer. However, some users have reported that Bluetooth connections may be interrupted when the MacBook lid is closed. Therefore, a wired mouse or a wireless mouse with a USB dongle may provide a more reliable connection.

By following these steps, you can effectively use a wireless or wired mouse to wake your MacBook from sleep without opening the lid, allowing you to control and interact with your MacBook even when the lid is closed.

shunsleep

Use Terminal commands to prevent sleep mode

You can use Terminal commands to prevent your Mac from automatically going into sleep mode. This is particularly useful if you want to keep your Mac awake for a certain amount of time.

To do this, first open Terminal. You can do this by typing "Terminal" in the search bar in Launchpad. Then, enter one of the following commands:

  • Caffeinate -d: This command will prevent your Mac from sleeping as long as the Terminal window is open.
  • Caffeinate -t X: This command will keep your Mac awake for a certain amount of time. Replace X with the number of seconds you want your Mac to stay awake for.
  • Sudo pmset sleep 0: This command will enable the "Prevent automatic sleeping when the display is off" setting.
  • Sudo pmset repeat sleep MTWRFSU 22:00:00: This command will make your Mac switch to sleep mode every day at 10 PM. You can customize this command by replacing "sleep" with "wake", "shutdown", or "wakeorpoweron" and adjusting the time and days accordingly. MTWRFSU stands for the days of the week, and you can exclude any if you want to.
  • Pmset noidle: This command will prevent your Mac from sleeping as long as pmset is running in a separate Terminal window.

It is important to note that while these commands can be useful, there are also third-party apps available, such as Amphetamine, Caffeinated, and Lungo, that can help you manage your Mac's sleep settings more easily. Additionally, you can use a wired or wireless mouse, a Bluetooth remote, or a game controller paired with your Mac to wake it from sleep without having to open the lid.

Frequently asked questions

You can prevent your Mac from automatically sleeping by going to System Preferences > Battery/Energy Saver > Options and selecting "Prevent your Mac from automatically sleeping when the display is off". Alternatively, you can use a third-party app such as Amphetamine or Caffeinated.

Yes, you can wake your MacBook from sleep by clicking or moving the mouse or tapping on the keyboard. You can also use a wireless or wired mouse or a Bluetooth remote or game controller.

Go to System Settings > Lock Screen and select "Never" next to "Turn display off on battery when inactive".

Written by
Reviewed by

Explore related products

Share this post
Print
Did this article help you?

Leave a comment