macOS utilizes an aggressive power-saving feature known as “App Nap.” If an application is open but entirely hidden behind other windows (and is not actively playing audio or downloading a file), the operating system will essentially freeze the application, starving it of CPU resources to save battery life.
While great for battery longevity on MacBooks, App Nap can cause severe problems for professional workflows. If you are rendering a video, compiling a massive codebase, or running a complex script in a terminal window, hiding that window behind your web browser can cause the background process to stall or fail completely. For desktop Macs (like the Mac Studio or Mac mini) that are always plugged into a wall, this power-saving feature is entirely unnecessary. You can disable App Nap globally.
How to Turn Off App Nap on macOS
You must use the Terminal to write a hidden system default command that disables the feature globally.
- Click the Launchpad icon in your dock, search for Terminal, and open the application.
- In the Terminal window, carefully copy and paste the following command exactly as written:
defaults write NSGlobalDomain NSAppSleepDisabled -bool YES - Press Enter to execute the command. (The terminal will not display a success message; it will simply drop you to a new line).
- For the changes to take full effect across all applications, you must restart your Mac.
Your Mac will no longer pause or throttle applications that are hidden in the background. Background rendering tasks, heavy downloads, and complex scripts will now execute at maximum speed, regardless of whether the window is visible on your screen.