Preventing Mac Sleep Mode When Lid Is Closed

don

If you want to prevent your MacBook from going to sleep when you close the lid, you have a few options. One way is to change your lock screen and battery settings to make your MacBook act like a desktop Mac when you close the lid. You can also install third-party apps like Amphetamine, Caffeinated, InsomniaX, or Sleep Control Centre to keep your MacBook awake with the lid closed. Another option is to use Terminal to stop your Mac from sleeping by entering a specific command. Additionally, if you have a newer MacBook, you can take advantage of the clamshell mode which automatically activates when you connect an external display, allowing you to close the lid without any software adjustments.

Characteristics Values
Operating System macOS Ventura, Sonoma, Monterey or older
Settings System Settings/Preferences > Battery/Energy Saver > 'Prevent your Mac from automatically sleeping when the display is off'
Third-party apps Amphetamine, Caffeinated, InsomniaX, Sleep Control Centre
Terminal command sudo pmset -a disablesleep 1

shunsleep

Using an external monitor

Step 1: Connect an External Keyboard and Mouse

Start by connecting an external keyboard and mouse to your MacBook. These can be wired or wireless. If you're using Bluetooth peripherals, ensure that Bluetooth is turned on and that they are paired with your Mac.

Step 2: Connect the External Monitor

Now, connect your external monitor to your MacBook using the appropriate adapters or ports. You may need to use a docking station or a USB-C/HDMI adapter, depending on the model of your MacBook and the type of external monitor you have.

Step 3: Close the Lid

Once your MacBook's desktop appears on the external display, you can close the lid of your MacBook. The external monitor may flash off briefly but should then display your desktop again. You may need to wake your Mac by pressing a key on the keyboard or moving the mouse.

Step 4: Power Adapter (Optional)

Note that some users have reported that their MacBook needs to be plugged into a power adapter for the screen to appear on the external monitor. However, this is not always the case, and some MacBooks may work without being plugged in.

Step 5: Adjust Settings

To ensure your MacBook doesn't sleep when the lid is closed, you'll need to adjust some settings. Go to "System Preferences" or "System Settings" and then click on "Battery" or "Power Adapter." Here, you'll want to change the settings to prevent your MacBook from sleeping when it's inactive or the display is off. You may also need to adjust the lock screen settings.

Step 6: Install Third-Party Apps (Optional)

If you want more control over your MacBook's sleep settings, you can install third-party apps like Amphetamine or Caffeinated. These apps can keep your MacBook awake by overriding the Energy Saver settings. For example, with Amphetamine, you can choose options like "Start new session While File is Downloading" or "While App is Running."

By following these steps, you should be able to use your MacBook with an external monitor and keep it from sleeping when the lid is closed. However, keep in mind that this setup may not work for all MacBook models or operating system versions, and you may need to try different methods or workarounds.

Apple Watch: Sleep App's Unwanted Guest

You may want to see also

shunsleep

Using a third-party app

If you're running macOS Ventura or Sonoma, you can use a third-party app to stop your Mac from sleeping when the lid is closed. Two such apps are Amphetamine and Caffeinated.

Amphetamine

Amphetamine is a free app available on the Mac App Store. It can keep your Mac awake through a simple on/off switch or automatically through easy-to-configure triggers. During a keep-awake session, you can choose to allow or prevent display sleep, screen saver activation, system sleep when the built-in display is closed, automated mouse cursor movement, and locking of the screen. You can also lock your Mac's screen after a period of inactivity, move the mouse cursor periodically, and keep your MacBook awake while its display/lid is closed.

Caffeinated

Caffeinated is available on the Mac App Store for 99p. This app overrides the Energy Saver settings to keep your Mac awake, preventing it from going to sleep.

Other Third-Party Apps

Other third-party apps that can help prevent your Mac from sleeping include Lungo, OneSwitch, and Endurance.

Sleep Training: Why I'm Not a Believer

You may want to see also

shunsleep

Changing lock screen and battery settings

To prevent your MacBook from sleeping when the lid is closed, you will need to change some lock screen and battery settings. Here is a step-by-step guide:

  • Open System Settings or System Preferences: Click on the Apple logo or Apple menu in the top left corner of your screen. Then, select "System Settings" or "System Preferences".
  • Go to Lock Screen Settings: In the sidebar, scroll down and click on "Lock Screen".
  • Set Display to Never Turn Off on Power Adapter: Next to "Turn display off on power adapter when inactive", select "Never" from the options.
  • Prevent Automatic Sleeping on Power Adapter: Click on "Battery" in the menu and then choose "Options". Turn on the toggle or slider next to "Prevent automatic sleeping on power adapter when the display is off".

By making these changes, you can keep your MacBook awake even when the lid is closed. However, please note that this will only work when your MacBook is plugged into a power source. If you want to prevent sleep mode when your MacBook is not plugged in, you will need to use a third-party app or the Terminal method, as described earlier.

shunsleep

Using Terminal

If you want to prevent your Mac from sleeping when the lid is closed, you can use the Terminal app. This method will only work as long as the Terminal window is open, so it is a temporary solution.

To do this, first, open the Terminal app by typing "Terminal" in the search bar in Launchpad. Then, enter the following command:

> caffeinate -d

If you want to keep your Mac awake for a certain amount of time, you can enter the following command instead:

> caffeinate -t X

Remember to replace X with the number of seconds you want your Mac to stay awake for.

Alternatively, if you want to schedule your Mac to sleep or wake up at a specific time, you can use the following commands:

> sudo pmset repeat sleep MTWRFSU HH:MM:SS

Remember to replace HH:MM:SS with the time you want your Mac to sleep or wake up. MTWRFSU stands for the days of the week, and you can exclude any that don't apply to your schedule.

To check your schedule, enter the following command:

> pmset -g sched

If you need to cancel the schedule, use this command:

> sudo pmset schedule cancelall

Please note that these Terminal commands are just one way to prevent your Mac from sleeping when the lid is closed. There are also other methods, such as using third-party apps or changing your Mac's settings, which may be more suitable for your needs.

shunsleep

Using an external keyboard and mouse

If you want to use an external keyboard and mouse with your Mac, you can do so by following these steps:

  • Connect your external keyboard and mouse: If you are using a wired keyboard and mouse, simply plug them into available USB ports on your Mac. If you are using Bluetooth devices, ensure that Bluetooth is turned on and then pair the devices with your Mac.
  • Check your connections: Once your external keyboard and mouse are connected, verify that they are working properly. Move the mouse and click the buttons to test its functionality. For the keyboard, try typing on it to ensure that all the keys are working as expected.
  • Adjust your settings (if needed): In most cases, your Mac should automatically detect and start using the external keyboard and mouse. However, if you notice any issues or unusual behaviour, you can adjust your settings. Go to "System Preferences" and then select the "Keyboard" or "Mouse" option (depending on what you need to configure). From there, you can customise the settings to your preference.
  • Using a different type of mouse: If you are using a trackpad or a mouse with a trackball, you may need to install additional software or drivers provided by the manufacturer. Follow the instructions provided with your device for specific details.
  • Using keyboard shortcuts: Keep in mind that you can use keyboard shortcuts to perform various tasks on your Mac. For example, you can use the "Cmd + C" and "Cmd + V" shortcuts to copy and paste content, respectively. Familiarise yourself with common keyboard shortcuts to improve your efficiency when using the external keyboard.

By following these steps, you should be able to successfully use an external keyboard and mouse with your Mac, allowing you to maintain productivity and convenience, especially if you are working with a closed laptop lid or an external display setup.

Frequently asked questions

You can change some lock screen and battery settings to make your MacBook act like a desktop Mac when you close the lid. Go to System Settings or System Preferences from the Apple menu in the upper left corner. Click Lock Screen, then select the menu next to "Turn display off on power adapter when inactive" and pick "Never". If you don't see that option, go to Battery > Power Adapter and select "Never".

Yes, you can install a third-party app like Amphetamine or Caffeinated.

Go to System Settings > Lock Screen and select the menu next to "Turn display off on battery when inactive", then change it to "Never".

Ensure the setting for turning off the display is active. Go to System Settings > Lock Screen and review those settings. Also, in the Battery menu, disable the "Prevent automatic sleeping" toggle and check the Bluetooth wake settings.

Go to System Settings > Battery > Options. Turn on "Prevent automatic sleeping on power adapter when the display is off". Also, go to System Settings > Lock Screen > "Turn display off on power adapter when inactive" and choose "Never".

Written by
Reviewed by
Share this post
Print
Did this article help you?

Leave a comment