Stop your Mac sleeping during a presentation
You're two slides from the point, talking, not touching the keyboard — and the screen dims, then the room watches your lock screen appear. During a talk or a screen share, minutes pass with no input, which is exactly what tells macOS to sleep the display. Before you present, run caffeinate -d and the screen stays lit until you stop it. No settings to hunt through, nothing to undo afterward.
Keep the display on for the whole talk
The flag that matters here is -d — it prevents the display from sleeping, which is the failure you actually see on the projector. Open Terminal before you start, run this, and leave the tab open in the background while you present.
# Keep the screen lit until you press Ctrl-C
caffeinate -d
That's it — no dimming, no lock screen, no matter how long you go between key presses. When you're done, click back into that Terminal tab and press Ctrl-C, or just close the tab. Your Mac immediately returns to its normal sleep schedule; nothing about your energy settings was permanently changed.
Set it and forget it: time it to the session
If you'd rather not remember to switch it off — you'll be packing up, shaking hands, answering questions — give it a timeout matched to your slot. It releases on its own when the timer runs out.
# Keep the display on for one hour (3600s), then release
caffeinate -d -t 3600
# A 25-minute lightning talk
caffeinate -d -t 1500
The number after -t is seconds: 1500 for 25 minutes, 3600 for an hour, 5400 for ninety. Pad it a little past your slot so an overrun or a long Q&A doesn't catch you out. Once the countdown ends the assertion drops silently and the Mac sleeps as usual.
Start it the moment you plug in the projector
Build it into your pre-talk routine so it's automatic:
- Connect the projector or start the screen share, and open Terminal (in Applications → Utilities, or via Spotlight).
- Type
caffeinate -d -t 3600and press Return. - Switch to Keynote, PowerPoint, or your browser and present — the terminal keeps running quietly in the background.
- When you finish, return to Terminal and press Ctrl-C if the timer hasn't already expired.
Two things worth knowing. First, there is no defaults key for this — caffeinate is the tool Apple gives you. The only System Settings route is the coarse "Turn display off when inactive" slider under Lock Screen, which you'd have to raise before every talk and lower again after. Second, if a colleague is presenting from your Mac remotely, the same -d assertion keeps their view alive too, since it's the physical display that stays awake.
Don't forget Do Not Disturb
Keeping the screen awake solves the dimming problem, but a Slack banner sliding across your slides is its own kind of interruption. Flip on a Focus before you start so nothing pops up mid-demo — turning on Do Not Disturb on Mac takes one click from Control Center and pairs naturally with keeping the display awake.
Before a big talk, you may not want to fiddle with commands. Mainspring's Keep Awake power-up holds the display on for a duration you pick and expires by itself afterward — part of 90+ hidden macOS settings it turns into labelled, reversible toggles.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once