Tired of your MacBook going to sleep when you close the lid—even when it’s connected to an external monitor or keyboard? If so, MacKeeper’s Safe Cleanup can help you manage your device's performance and system settings to prevent your Mac from sleeping when the lid is shut.
Yes, it’s generally safe to keep Mac on when the lid is closed, when it's shut correctly to avoid resource overconsumption or a depleted battery. Closing your Mac, with it still on, should not become a common occurrence, but when it’s necessary, here’s what we recommend to help keep your device stable:
Put your Mac on a stand to promote air circulation and reduce MacBook overheating.
Keep the charger plugged in to avoid draining your MacBook’s battery life.
Avoid closing the lid for an extended time or with apps running in the background.
You can disable Mac sleep when closing the lid, so long as you ensure your settings and hardware are properly configured beforehand. If you’re still unsure how to keep Mac from sleeping, our supporting blog has a full step-by-step breakdown to help you choose the right method most suited to your macOS version and setup.
A note from our experts:
One reason why people close the lid on their Mac is to keep processes running in the background when they aren't using the device. Whilst handy–so long as Mac doesn’t sleep–this can drain your battery if there are also too many processes running simultaneously. The solution? MacKeeper’s Safe Cleanup automatically removes unnecessary files to free up vital system resources and keep your Mac optimized to avoid overheating or performance drops when the lid is shut.
Allow the app to scan your device for Logs, Cache, Trash, and Languages.
Tick everything you want to remove, press Clean Junk Files, and Remove.
Step 1. In the MacKeeper app, go to Safe Cleanup and click on Start ScanStep2. Tick everything you don’t need, press Clean Junk Files and Remove to confirm
How to keep Mac on when lid is closed
If you’re trying to stop Mac from sleeping when the lid is closed, try adjusting macOS Energy Settings, Terminal Command, or third-party apps–other methods may require additional accessories.
We’ll now guide you through the best methods to disable Mac sleep when closing the lid:
Use Terminal commands.
Use Third-party apps.
Change Mac Settings.
A hint from us:
Not sure what the difference is between your Mac being in hibernate vs sleep mode? Yes, we know it can be confusing; that’s why we’ve attached this supporting blog article to help walk you through the differences as well as times when each mode can come in handy.
1. Use Terminal commands
Advanced MacBook users might wish to use Terminal Commands to temporarily disable Mac sleep when closing the lid. It’s a quick solution that requires third-party apps, but still allows you to have full control over your system.
Let us show you how to use a Terminal Command to keep Mac on when the lid is closed:
In Finder, go to Applications > Utilities.
Open Terminal.
Type in the following command: caffeinate -i and press Enter.
To stop the command, press Control + C in the Terminal window.
Step 1. Open TerminalStep 2. Type in the following command caffeinate -i and press Enter
Important:
You’ll need to keep Terminal open while the command is running, to ensure your Mac doesn’t sleep when shut. If you just want to know how to adjust sleep time on Mac, our supporting blog has all the steps for you to follow.
2. Use third-party apps
If you’d like an extra hand to stop your Mac from sleeping when the lid is closed, apps like Amphetamine can help. It’s available via the App Store, and uses a simple toggle that lets you decide if you would like to keep your MacBook awake with an on/off option. Third-party apps, like Amphetamine, are ideal if you want more control than macOS can offer.
Here’s how to find the Amphetamine app:
Go to your App Store.
Search Amphetamine and press Download.
A third-party app, like Amphetamine, allows you to toggle on/off Mac’s sleeping mode when the lid has been shut
3. Change Mac settings
To keep your Mac awake, you can also adjust your MacBook’s built-in settings. While the OS lets you control the sleep function through Energy Saver or Battery preferences, there are some limitations depending on your operating System version.
For macOS Ventura and later:
Here’s how to change sleep settings on Ventura or newer models:
Open System Settings.
Select Lock Screen from the sidebar.
Find Turn display off on the power adapter when inactive and change to Never.
In System Settings, select Lock Screen and change Turn display off on power adapter when inactive to Never
For macOS Catalina, Big Sur, or Monterey:
For devices with an older macOS, you’ll need to follow these steps:
Open System Preferences.
Click Energy Saver.
Select the Power Adapter tab.
Drag the Turn display off after slider to Never.
In System Preferences, click on Energy Saver > Power Adapter and drag Turn display off after to the right where it says Never
Keeping your Mac awake even when it’s shut
Preventing your Mac from sleeping when the lid is closed is possible so long as you correctly adjust your Settings. Alternatively, you can use Terminal commands or third-party apps, but just remember that there are some macOS limitations with older models.
Remember to use MacKeeper’s Safe Cleanup to keep your system optimized. It’ll help remove clutter, free up resources, and improve your Mac’s reliability. Try it out today..
We respect your privacy and
use cookies
for the best site experience.
Privacy Preferences Center
We use cookies along with other tools to give you the best possible experience while using the
MacKeeper website. Cookies are small text files that help the website load faster. The cookies we
use don’t contain any type of personal data meaning they never store information such as your
location, email address, or IP address.
Help us improve how you interact with our website by accepting the use of cookies. You can change
your privacy settings whenever you like.
Manage consent
All cookies
These cookies are strictly necessary for enabling basic website functionality (including page
navigation, form submission, language detection, post commenting), downloading and purchasing
software. The website might malfunction without these cookies.