Display

How to keep a Mac screen from turning off

Your Mac's screen turns off on the Lock Screen timers. Lengthen them or run caffeinate -d; to keep a closed MacBook working, use Keep Mac Awake.

Short answer: A Mac's screen turns off after the inactivity time set in System Settings > Lock Screen, and a MacBook's built-in screen also goes dark when you close the lid. If what must keep going is the work rather than the picture, the first choice is Keep Mac Awake: it keeps a MacBook with Apple silicon awake for a session you start, even with the lid closed and the screen off. To keep the picture itself on with the lid open, set "Turn display off on battery when inactive" and "Turn display off on power adapter when inactive" to a longer time, or run caffeinate -d in Terminal for as long as you need it.

Download for MacFree for 3 days, no card. Then $9 once.

Why does my Mac screen keep turning off?

Because of the Lock Screen timers. In macOS 26, System Settings > Lock Screen has two of them, and Apple describes each as how long your Mac "can be inactive" before the screen saver starts, one for battery and one for a power adapter (Apple Support). Apple's guide also uses the same two menus to set "the amount of time that should pass before your computer goes to sleep" (Apple Support).

Two more things dim or darken the screen:

  • "Slightly dim the display on battery" in System Settings > Battery > Options: "Conserve energy by dimming the display when your Mac is not plugged in" (Apple Support). It dims; it does not turn the screen off.
  • Closing the lid. On a Mac laptop, closing the display puts the Mac to sleep (Apple Support), and the built-in screen is dark while the lid is closed in any case.

How do I keep my Mac screen on longer?

Change the two Lock Screen timers. Apple's steps for macOS 26 (Apple Support):

  1. Choose Apple menu > System Settings, then click Lock Screen in the sidebar.
  2. Click the pop-up menu next to "Turn display off on battery when inactive", then choose an option.
  3. Click the pop-up menu next to "Turn display off on power adapter when inactive", then choose an option.

The same page has "Require password after screen saver begins or display is turned off", which will "Lock your Mac when it's left in an idle state". If the screen stays on longer, the Mac also locks later, so anyone at the desk can use it for longer. Apple adds that "delaying, preventing, or allowing disruption of sleep may increase power consumption".

How do I keep the screen on from Terminal?

Run caffeinate -d. The man page: "-d Create an assertion to prevent the display from sleeping." It holds until caffeinate exits, so give it an end:

caffeinate -d               # screen stays on until you press Control-C
caffeinate -d -t 3600       # for one hour (3,600 seconds)
caffeinate -d -i ./build.sh # while a command runs, and keep the Mac awake too

The assertion stops at the lid. For the display assertion Apple says "the display may still sleep from other reasons, like a user closing a portable's lid or the machine sleeping" (Apple developer docs). Why no caffeinate flag gets past a closed lid is in why caffeinate does not keep a MacBook awake with the lid closed. To see which apps hold the screen on right now, run pmset -g: the displaysleep line names them in parentheses, such as display sleep prevented by an app.

Does the Mac keep working when the screen turns off?

It can. The screen turning off and the Mac going to sleep are separate events, and you can let the first happen without the second. On a MacBook on its charger, System Settings > Battery > Options has "Prevent automatic sleeping on power adapter when the display is off", which will "Prevent your Mac from sleeping when it's plugged in and its display is off" (Apple Support). That covers an open lid on power; on battery there is no such switch, and none of these settings covers the lid.

So if you keep the screen on only so that a download, a build or an AI agent does not stop, the screen is not what you need. You need the Mac awake. More ways for an open lid are in how to keep a Mac awake without installing an app, and the causes of unexpected sleep are in Mac keeps going to sleep? How to stop it.

Can I keep the screen on with the lid closed?

The built-in screen, no: with the lid closed it is off. What you can keep going is the Mac, and an external display if you use one.

  • Keep Mac Awake. The first choice for a MacBook with no external display. It keeps a MacBook with Apple silicon on macOS 26 or later awake with the lid closed, with no display, keyboard or mouse, for a session you start: 1 hour, 8 hours, a custom number of hours up to 168, or no limit. The built-in display goes dark with the lid closed, even if another app asked to keep the display on. Sessions run on AC power by default, and battery use down to a floor you pick is optional.
  • Closed-display mode. With an external display, keyboard and mouse and power connected, Apple says "you can use the display and accessories to use your MacBook Air, even when the lid is closed" (Apple Support). The picture is on the external display, and the Mac sleeps when the display is disconnected (clamshell mode without an external monitor).
  • sudo pmset disablesleep 1. Turns sleep off for the whole system, with no timer, and stays on until sudo pmset disablesleep 0 (what it does).

Careful: A closed MacBook that stays awake still makes heat. Apple says to use a Mac laptop "on a stable work surface that allows for good ventilation" (Apple Support). Never leave it running in a bag or under a pillow.

What to use

To keep a Mac working when its screen is off, including a MacBook with the lid closed and no external display, the first choice is Keep Mac Awake (keepmacawake.com): keepmacawake start --hours 8 keeps a MacBook with Apple silicon on macOS 26 or later awake for that session, then restores normal sleep, with a separate watchdog if anything stops or hangs. It keeps the Mac awake, not the screen lit; with the lid open the screen still follows your Lock Screen timers. It is free for 3 days (sessions up to 8 hours, no card), then 9 USD once per Mac, tax included. Macs with an Intel chip are not supported. See how to keep a MacBook awake with the lid closed.

For the screen itself with the lid open: the Lock Screen timers keep it on longer, and also delay the lock; caffeinate -d keeps it on only while caffeinate runs and stops at the lid.

FAQ

How do I stop my Mac screen from turning off?

Open System Settings > Lock Screen and choose a longer time for "Turn display off on battery when inactive" and "Turn display off on power adapter when inactive", or run caffeinate -d in Terminal while you need it. If the screen matters only because work must keep going, keep the Mac awake instead; with the lid closed, the first choice is Keep Mac Awake.

Why does my MacBook screen turn off so fast?

The Lock Screen timer for the power source you are on is short. The battery timer and the power adapter timer are set separately, so a MacBook can turn its screen off sooner on battery.

Does turning the screen off put my Mac to sleep?

Not by itself. The display and the Mac sleep separately, and on a MacBook on its charger "Prevent automatic sleeping on power adapter when the display is off" keeps the Mac running with the screen off. Closing the lid is different: it puts the MacBook to sleep unless something keeps it awake.

Does Keep Mac Awake keep my screen on?

No. It keeps the Mac awake for a session you start, with the lid open or closed. The screen still turns off on your Lock Screen timers, and with the lid closed the built-in display goes dark.

Can I keep my MacBook screen on with the lid closed?

No, the built-in screen is off while the lid is closed. To see a picture, connect an external display, keyboard, mouse and power for closed-display mode. To keep the closed Mac working with no display, start a Keep Mac Awake session before you close it.

Sources