How to Stop Mac From Sleeping: 2026 Guide

How to Stop Mac From Sleeping: 2026 Guide

How to Stop Mac From Sleeping: 2026 Guide

How to Stop Mac From Sleeping: 2026 Guide

A Mac that nods off at the wrong moment can wreck a workflow. A download stalls at 90 percent, a long render freezes, or a video call drops because the machine decided it was idle. Apple builds power management to be aggressive by default, especially on laptops running on battery, because saving energy is usually the right call. But sometimes you need the machine awake, and macOS gives you more ways to make that happen than most people realize.

The good news is that you do not need to install anything to fix this. There are built-in settings, a command-line tool Apple has shipped for years, and a handful of well-made menu-bar apps. This guide walks through each option, explains when to use it, and points out the mistakes that trip people up.

Why Your Mac Keeps Going to Sleep

macOS separates two different kinds of sleep, and confusing them is the single most common reason people think a setting “does not work.”

Display sleep turns off the screen after a set number of idle minutes. System sleep puts the whole computer into a low-power state. They are controlled by different sliders, and changing one does nothing to the other. If your screen goes dark but a download keeps running, only the display slept. If the download stops, the system slept.

On top of that, laptops behave differently depending on power source. Plugged in, a MacBook is far more willing to stay awake. On battery, it clamps down harder. Apple silicon models also manage power differently from older Intel machines, so a setting that exists on one Mac may be missing or grayed out on another.

The Built-In Fix: Energy Saver and Battery Settings

The Built-In Fix: Energy Saver and Battery Settings

The simplest method is the one Apple puts right in System Settings. The exact path depends on your macOS version.

On macOS Ventura (released October 2022) and later, open System Settings and look in two places. Under Lock Screen, you will find controls for when the display turns off. Under Battery (on a laptop) or Energy Saver (on a desktop), you will find the computer sleep slider. On macOS Monterey and earlier, everything lives in System Preferences > Energy Saver.

The key setting to hunt for is a checkbox labeled something like “Prevent automatic sleeping when the display is off.” When it is available, checking it keeps the system awake even after the screen goes dark, which is exactly what you want for background downloads or long exports. Apple documents the full set of options in its guide to changing Energy Saver settings, though availability varies by model and macOS version.

A practical tip: set the display to sleep after a short interval (say, five minutes) but prevent system sleep. You save real power on the screen while the machine keeps working. Many people set both sliders to “Never” and then wonder why their MacBook battery drains overnight. That is the mistake to avoid.

When the Option Is Missing

On some Macs, particularly Apple silicon laptops on battery power, the “prevent automatic sleeping” checkbox simply is not there. This is not a bug. Apple assumes that on battery, you want maximum efficiency. Plug the machine into power and reopen the pane; the option often appears. If it still does not, move on to the command-line methods below.

Using the caffeinate Command

Apple ships a small command-line tool called caffeinate, and it is the most precise way to keep a Mac awake. It comes with macOS, so there is nothing to install. Open Terminal and type `man caffeinate` to read the full documentation.

The flags map to different kinds of sleep:

Flag What it prevents
`-d` Display sleep
`-i` System idle sleep
`-s` System sleep (mainly effective on AC power)
`-t` Sets a time limit in seconds
`-u` Declares user activity

A typical command looks like `caffeinate -i -t 3600`, which keeps the system from idling to sleep for one hour and then quits on its own. That time limit is the feature most people miss. Running `caffeinate` with no flags keeps the Mac awake until you close the Terminal window or press Control-C, which is easy to forget. Always add `-t` unless you genuinely want an indefinite session. (How to Stop Snoring at Night Home Remedies: 8 Easy Fixes)

One caveat worth knowing: on battery power, some caffeinate flags are overridden by macOS to protect battery life. If `caffeinate -s` seems to do nothing on a laptop running on battery, plug in and try again. This behavior is documented in the man page but is inconsistently described in blog posts, so trust the terminal over the tutorial.

The pmset Route for Permanent Changes

If you want a setting that survives reboots without any app running, pmset is the tool. It manages power settings at the system level. Run `pmset -g` first to see every current value, then adjust only what you need.

The common commands are `sudo pmset -a sleep 0` to disable system sleep entirely and `sudo pmset -a displaysleep 0` to keep the screen on. The `-a` flag applies the change to all power sources; use `-b` for battery and `-c` for charger only. Combining `-c` with a sleep value of 0 is a smart compromise: the Mac stays awake when plugged in but still sleeps normally on battery. (Sleep mode)

Be careful here. Setting `sleep 0` permanently on a laptop means the machine never sleeps, even in a bag, which can cause heat and battery drain. If you go this route, note the original values from `pmset -g` so you can restore them later. You can also reset to defaults with `sudo pmset restoredefaults`.

Menu-Bar Apps That Make It One Click

For people who do not want to touch Terminal, third-party apps do the job well. Amphetamine is free on the Mac App Store and lets you toggle sleep prevention from the menu bar, set triggers, and keep the Mac awake only while a specific app is running. KeepingYouAwake is a lightweight open-source alternative with a similar feature set. (Undo shortcut key for windows and mac) (Control when your Mac goes to sleep)

These apps are genuinely useful, but they have one downside: it is easy to leave them running and forget. If your Mac feels warm and the battery is draining fast days later, check the menu bar first. A good habit is to use the app’s session timer rather than toggling it on indefinitely.

If you are already comfortable poking around macOS system tools, the same mindset helps with other maintenance tasks. Knowing how to check for malware on a Mac, for example, relies on the same mix of built-in utilities and careful settings review.

Keeping a MacBook Awake With the Lid Closed

Closing the lid normally puts a MacBook to sleep. There is an exception called clamshell mode: with the Mac connected to power and an external display, keyboard, and mouse, closing the lid keeps it running. Apple designed this for desktop-style use.

Getting clamshell mode to work reliably requires the right combination of hardware. If it does not engage, check that the power adapter is connected, the external display is detected, and a Bluetooth or USB input device is paired. Some users also find that a third-party app or a `caffeinate` session helps bridge the gap, though results vary by model.

One warning: never put a running MacBook into a bag with the lid closed and sleep disabled. Heat has nowhere to go. If you need the machine awake while traveling, keep it on a hard surface with ventilation.

Common Mistakes and What Actually Works

After working through all the options, a few patterns stand out.

Mistake one: disabling only display sleep. The screen stays bright, the machine still sleeps, and the battery dies faster for nothing. Fix the system sleep setting instead.

Mistake two: leaving caffeinate running forever. A forgotten Terminal window keeps the Mac awake for days. Use `-t` every time.

Mistake three: assuming settings are universal. Menu paths changed between Monterey and Ventura, and laptop options differ from desktop options. If a guide does not match your screen, check your macOS version first.

Mistake four: ignoring power source. Almost every sleep problem on a laptop disappears when you plug in. Test on AC power before assuming something is broken.

What actually works, in practice, is a layered approach. Use the System Settings checkbox for everyday needs. Reach for `caffeinate -i -t` when you need a timed session for a download or render. Use `pmset` only when you want a permanent, reboot-proof change. And keep a menu-bar app around for quick toggles during presentations or long calls.

The same principle applies to other everyday Mac tasks: the built-in tools usually win, and knowing the shortcuts makes everything faster. That is true whether you are learning the undo shortcut key for Windows and Mac or picking the best code editor for Mac.

A Quick Comparison of Methods

Method Best for Persists after restart? Skill level
System Settings checkbox Everyday use, desktops Yes Beginner
caffeinate Timed sessions, scripts No Intermediate
pmset Permanent system-wide rules Yes Advanced
Menu-bar apps Quick toggles, meetings Depends on app Beginner

For most people, the System Settings route plus a menu-bar app covers 95 percent of situations. The command-line tools are there when you need precision.

Conclusion

Stopping a Mac from sleeping is less about one magic setting and more about understanding that macOS treats display sleep and system sleep as separate decisions. Once that clicks, the rest is straightforward: use the Energy Saver or Battery pane for permanent changes, `caffeinate` with a time limit for temporary ones, and `pmset` when you want a rule that survives reboots. Plug in your laptop before troubleshooting, and always note what you changed so you can undo it.

The goal is not to keep your Mac awake forever. It is to keep it awake exactly when you need it, and let it rest the rest of the time. Get that balance right and you will stop losing downloads, renders, and calls to an idle screen.

Frequently Asked Questions

Why does my Mac sleep even though I set it to never sleep?

The most likely cause is that you changed the display sleep setting but not the system sleep setting, or that the Mac is on battery power where macOS overrides some preferences. Check both sliders in System Settings, then plug in and test again. On some models, the “prevent automatic sleeping” option only appears when connected to power.

Does caffeinate work on Apple silicon Macs?

Yes. caffeinate ships with macOS and runs on both Apple silicon and Intel machines. Some flags, particularly `-s`, behave differently on battery versus AC power, so if a command seems ineffective, connect the charger and retry. The `man caffeinate` page in Terminal is the authoritative reference for your specific macOS version.

Can I keep my MacBook awake with the lid closed?

Yes, using clamshell mode. Connect the Mac to power, attach an external display, and pair a keyboard and mouse. Closing the lid then keeps the machine running. Never do this inside a bag, because trapped heat can damage the hardware.

Is it bad to keep a Mac awake all the time?

It is not dangerous, but it is not ideal either. A Mac that never sleeps runs warmer, drains battery faster, and may shorten component life over years of use. Use timed sessions where possible and let the machine sleep overnight.

What is the difference between display sleep and system sleep?

Display sleep turns off only the screen, saving the most power with the least disruption. System sleep suspends the entire computer, pausing downloads and background tasks. They have separate settings, which is why changing one often appears to do nothing.

Do I need a third-party app to stop my Mac from sleeping?

No. The built-in System Settings, caffeinate, and pmset cover every scenario. Apps like Amphetamine and KeepingYouAwake simply add a convenient menu-bar toggle and timers. They are nice to have, not necessary.

on this page