How to Prevent Apps from Sleep on Mac [Using Terminal]

How to Prevent Apps from Sleeping on Mac

How to Prevent Apps from Sleeping on Mac

In this guide, we will show you a nifty workaround using which you could prevent your apps from going to sleep on your Mac. As opposed to the Windows ecosystem, things work quite differently in the other side of the fence, especially when it comes to interacting with the app. In the former, when you hit the close icon, the app will do just that- close for good.

While it sounds quite obvious, but it isn’t if you turn your attention towards the Mac ecosystem. When you close an app on your Mac, then instead of being actually closed, it tends to get minimized in the background and some of its processes would still run in the background. Not only will it result in issues like additional battery drainage and overheating, but these apps will also end up consuming unnecessary system resources.

This hogging of crucial resources could have very well been prevented if Apple implemented the “correct” functionality of the close button, which is, again stating the obvious- to close the app, not just from the foreground but the background as well. But since that isn’t the case, users are having to deal with its consequences in a negative way.

How to Prevent Apps from Sleeping on Mac

While some might argue that it leads to faster opening of the app, but I haven’t noticed any seconds gained when we launch the app from scratch as opposed to the one from the dock. And if it really translates to the ease of usage of the app directly from the dock as opposed to the opening from the Launchpad or Finder, then you could simply pin it to the dock.

All in all, there’s no justification as to why the apps need to be running in the background even after we decided to close it. Perhaps the Cupertino giant could have taken a page out of Windows book, but since that isn’t the case, we have to take matters into our very own hands and get this job done. And in this guide, we will show you how to do just that. So without further ado, let’s get started.

How to Prevent the Apps from going to Sleep on Mac

In order to disable the App Sleep feature of the OS, you just need to execute a single line of command in the Terminal window. Here’s how:

  1. To begin with, head over to Launchpad and go to the Others folder.terminal launchpad
  2. Then open the Terminal from there and type in the below command:
    defaults write NSGlobalDomain NSAppSleepDisabled -bool YES
  3. Finally, restart your Mac for the changes to take place immediately.

That’s it. These were the steps to prevent your apps from going to sleep on your Mac. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest. Moreover, what are your views regarding the way macOS treats the closing of its app?

Is it not much of a concern for you as you could easily right-click on that minimized app in the Dock and ‘Close’ it or the unnecessary effort of closing the app when combined with the caveats of battery drain, overheating, and system resources consumption calls for the a much better and efficient way of apps management in the macOS? Do share your valuable opinions with us in the comments section below.

How to Undo the Changes

If for some reason you want to revert the changes and let the OS once again make the app sleep in the background instead of permanently closing it, then here’s what you need to do:

  1. To begin with, open Finder and select Applications from the left-hand side.
  2. Then go to the Utilities folder and you should find the Terminal app there.terminal finder
  3. So double-click to open the Terminal and then type in the below command:
    defaults write NSGlobalDomain NSAppSleepDisabled -bool NO
  4. Finally, restart your Mac for the changes to take place and get saved. That’s it.

Leave a Reply

Your email address will not be published. Required fields are marked *