Purpose

This guide covers methods to prevent Mac Studio from sleeping, including both permanent system settings and temporary command-line solutions for macOS Sequoia, Sonoma, Ventura, and earlier versions.

Key Findings

System Settings Method (Permanent)

For macOS Ventura and later (including Sonoma and Sequoia):

  1. Click Apple menu → System Settings
  2. Select Energy (or DisplaysAdvanced)
  3. Toggle on “Prevent automatic sleeping when the display is off”
  4. Additionally, go to Lock Screen → Set “Turn display off when inactive” to Never

For macOS Monterey and earlier:

  1. Open System PreferencesEnergy Saver
  2. Check “Prevent your Mac from automatically sleeping when the display is off”

Important Note: Preventing automatic sleeping when display is off won’t stop Mac from sleeping entirely. You must also adjust Lock Screen settings to fully prevent sleep mode.

caffeinate Command (Temporary)

The caffeinate command is a built-in macOS utility that temporarily prevents sleep without modifying system preferences. This is ideal for temporary use cases or on Macs you don’t own.

Basic Usage

Terminal window
caffeinate

Keeps Mac awake until you press Ctrl+C or close Terminal.

Common Options

FlagFunction
caffeinate -iPrevents idle sleeping
caffeinate -dPrevents display from sleeping
caffeinate -mKeeps disk awake at all times
caffeinate -sPrevents sleep only when plugged into power
caffeinate -t XPrevents sleep for X seconds

Examples

Terminal window
# Prevent display sleep for 3 hours (10,800 seconds)
caffeinate -dt 10800
# Prevent idle sleep indefinitely
caffeinate -i
# Prevent sleep only when on power adapter
caffeinate -s

Advantages of caffeinate

  • Temporary: Automatically stops when Terminal closes
  • No settings changes: Doesn’t require modifying System Settings
  • Flexible: Time-based or flag-based control
  • Safe for shared Macs: No need to remember to change settings back

Mac Studio Specific Notes

Mac Studio is designed to run 24/7 as a desktop workstation. Some users successfully keep their Mac Studio running continuously with proper settings configured. The M1/M2/M3 Mac Studio models all support the same sleep prevention methods.

Use Cases

  • Long-running tasks: Video rendering, compilation, downloads
  • Server/always-on usage: Running services or remote access
  • Presentations: Preventing sleep during demos
  • Temporary needs: Using caffeinate for one-time scenarios

Sources

  1. Set sleep and wake settings for your Mac - Apple Support
  2. How to stop Mac from sleeping: 7 methods - Setapp
  3. How to Stop Your Mac From Sleeping When the Display is Off - MacRumors
  4. How to stop your Mac sleeping using the ‘caffeinate’ command - Tom’s Guide
  5. Caffeinate Your Mac - The Apple Geek
  6. Change Energy settings on a Mac desktop computer - Apple Support