Prevent Hard Disk Sleep on macOS (Mac mini / Always-On Systems)

Overview

On modern macOS versions (including macOS 26 and newer), the system may put storage into a low-power or idle state even when Energy Saver settings are configured to Never sleep.

This behavior can cause:
  • Background services to pause after long inactivity
  • API or gateway delays
  • Disk access lag after idle periods
  • Automation or server workloads becoming unresponsive
This article explains how to permanently disable computer and disk sleep on macOS using Apple-supported system commands.

Applicable Systems

  • macOS 13+ (Ventura, Sonoma, macOS 26+)
  • Mac mini used as servers
  • Always-on development machines
  • Automation or gateway hosts
  • CI/CD or background processing systems

Root Cause

The macOS graphical settings do not fully control power management anymore.
Apple introduced multiple internal power layers:
  • Energy Saver UI settings
  • pmset power profiles
  • standby power mode
  • autopoweroff policies
  • APFS storage idle management

Because of this, disks may still enter an idle state even when sleep is disabled in System Settings.

Solution (Recommended)

Use Apple’s systemsetup utility to disable sleep at the system level.

Step 1 — Open Terminal

Step 2 — Disable Computer Sleep

Run:

This prevents the entire system from entering sleep mode.

Step 3 — Disable Hard Disk Sleep

Run:

This prevents macOS from idling or powering down storage devices.

Step 4 — Disable Hidden Standby Modes (Recommended)

Run:

These settings prevent macOS from triggering long-idle power transitions.

Verification

Confirm settings were applied:

Expected output should include:

If both values are 0, sleep is fully disabled.

Persistence

These settings are:
✅ System-wide
✅ Persistent across reboots
✅ Applied before user login
✅ Official Apple configuration methods
No scripts or background services are required.

Expected Result

After applying the configuration:
  • The Mac will remain fully active
  • Storage will not enter idle sleep
  • Background services remain responsive
  • No disk wake delays occur after inactivity

Notes & Best Practices

  • Recommended for Mac minis used as servers or gateways.
  • Not recommended for battery-powered laptops.
  • Energy consumption will increase slightly since sleep is disabled.
  • Safe for SSDs and modern Apple hardware.

Troubleshooting

If sleep still occurs:
Re-run verification:
Ensure commands were executed with sudo.
Restart the Mac once after configuration.

Summary

Running the following commands once permanently prevents disk and system sleep:

This configuration is the recommended approach for always-on macOS systems.

 
 
 
 

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us