When I try to download large apps from the App Store whether on battery or AC power the displays turns off after time set and downloading also stops.

The Energy Saver preferences are set to defaults.

What should I do to continue download even when display is off?

I am using OS X 10.9.4

12 Answers 12


If you don't want to install any software or change settings, you can use the Terminal utility caffeinate. Open Terminal (located in /Applications/Utilities/), type in caffeinate, and press return ↩︎.

If you want to set a timeout so it will go to sleep after some amount of time, use this:

caffeinate -t 3600

That will make it stay awake for an hour. (3600 is the number of seconds you want it to stay awake.)

To stop or cancel the caffeinate command, press ^ ControlC.

  • 2
    Best answer so far, so handy for terminal lovers! Gonna try it now. Dec 23, 2016 at 8:53
  • 5
    You could also caffeinate program [arguments] to make Mac awake as long as the program is running, which is handy for testing scripts over night: caffeinate python script.py. Love it!
    – taper
    Dec 29, 2017 at 16:09
  • 1
    It needs to have the -s flag to prevent downloads from stoping.
    – JBis
    Jun 25, 2018 at 1:44
  • It kind of amazes me that a company that prides itself for making products that "Just works(tm)" requires us to resort to something like this.
    – Jack Leow
    Sep 24, 2021 at 20:22

You could set hot corners. Push the cursor to that corner & it won't nod off.

That would save you having to change the regular policy, for the times you do want it to sleep after being idle.

enter image description here

  • 1
    This would either disable the screensaver or put the display to sleep, it's not going to prevent the laptop from going to sleep right?
    – Prabhu
    May 13, 2016 at 4:01
  • I haven't actually used it in years - my last 2 machines have never slept, in 8 years - but it used to be that if the screen didn't sleep, neither did the computer. Easy enough to test...
    – Tetsujin
    May 13, 2016 at 19:17
  • The panels have changed and this is no longer accurate. Use "Energy saver" panel.
    – BondedDust
    Feb 21, 2018 at 19:12
  • @BondedDust - you could either fully edit the new info into this answer, subject to approval, or add a new answer. I'm still on El Cap, where it's still true.
    – Tetsujin
    Feb 21, 2018 at 19:27
  • Color me puzzled. I'm on El Cap too, but I don't get that graphic.
    – BondedDust
    Feb 21, 2018 at 19:29

you can use caffeinate -w <the Process ID of the download> for this.

  • caffeinate command makes your computer unable to fall asleep (although your display may),

  • the -w option makes it wait for a process to finish and before then your computer cannot fall sleep, which is exactly what you wanted to do.

to do so you can first find the Process ID(PID) for your download with Activity Monitor, then open up Terminal(bash) and type in for example caffeinate -w 4708, replace the number with the PID you found.

  • be careful with a low PID number as it may be a system process, in which case your computer may run on until the battery dies.

  • also if you plan on using this command often on certain processes, you may want to use caffeinate -w $(pidof <name of process>) instead, this will find the ID of the process you name each time (as PID is assigned by the system and will change each time you run it)

the advantage this has over

  • changing system preferences: it doesn't require you to change the preference back once you're finished

  • caffeinate -t <number of seconds>: your download may not finish in a certain amount of time, in that case the goal is not achieved; or it may finish really quickly, in that case you would be wasting energy.


You could try Caffeine from the Mac App Store:

Caffeine is a tiny program that puts an icon in the right side of your menu bar. Click it to prevent your Mac from automatically going to sleep, dimming the screen or starting screen savers. Click it again to go back. Right-click (or -click) the icon to show the menu.


In you Energy Saver options, just change "Computer sleep" option. For exemple you could put "Computer sleep" option to "Never" While on Power Adapter.

Default option put your Mac to sleep after 15 minutes while on Power Adapter.

  • I did this, it worked great.
    – Flare Cat
    Jan 10, 2016 at 18:12

I suggest Amphetamine, downloadable from the app store or here. Using the app, you can set up custom periods for your computer to sleep.

  1. Check Prevent computer from sleeping when the display is off in the Energy Saver setting under System Preferences.
  2. Leave it or press shift+control+Power to turn off the Display.

As I don't want to install any software nor want to use the Terminal for such a trivial task (nor have found any setting allowing me to never have my Mac sleeping), I use this:


Apparently, opening a Youtube video and keeping the focus on its tab prevents Chrome from sleeping (as you fake watching a video) until the video ends.

You can then put the brightness to 0 and leave the computer without anxiety: the download will still be ongoing.

  • would this work for any kind of video player, even offline ? Also, youtube these days prompts for "Still watching" prompt, so it could go to sleep.
    – anki
    Nov 24, 2019 at 23:55
  • I tried on the free version of Elmedia Video Player, and it works. I didn't try on Quicktime Player, and for now, I did not have the "Still watching" prompt.
    – Gregordy
    Nov 25, 2019 at 2:01
  • 1
    Oh that happens when YouTube is long away from focus, say different space or minimised.
    – anki
    Nov 25, 2019 at 2:14
  • Ah yes got it, thanks for the info! That's why I adviced to keep the focus on the Youtube tab so these kind of things would not occur :p
    – Gregordy
    Nov 25, 2019 at 2:29
  • You can immediately confirm that a browser or video player application is successfully achieving this effect by opening MacOS's Activity Monitor, clicking on the Energy tab, Ctrl-clicking (or secondary-clicking) on the table's column headings, and enabling the "Preventing Sleep" column (this can also be enabled from the menu View>Columns>Preventing Sleep). You can now see if a browser or video player app's row has "Yes" displayed in the "Preventing Sleep" column.
    – Jacob C.
    Mar 3, 2020 at 22:08

If you don't want it to sleep, just go to "System Preferences" then click "Energy Saver" then make your Mac's sleep auto to "Never". Then change it to "Normal" once download is done, Also one tip: attach the charger (or what ever you wanna call the charger I.E AC power etc.) while app/file/document/any other things are downloading.

If it's too complicated just go to "System Preferences" -> "Energy Saver" then set it to "Never".


Try NoSleep Application.

It is simple and has easy to use User Interface You can even close your lid and listen to music after that. Your App Store will continue downloading even after closing the lid.


After having tried a couple of similar apps I settled on InsomniaX — a free and open-source app that allows sleeping the screen while keeping the system on. The only annoyance I've found is that once in a while it asks for the user's password.

Installable via homebrew with:

brew cask install insomniax

just leave a video running like a 8 hour sleep music video

  • 2
    Welcome to Ask Different! We're trying to find the best answers and those answers will provide info as to why they're the best. Answers should be self-contained so explain why you think the answer you provided will solve the problem or is better than others out there. Providing links as supporting information can also help the OP, and others, find additional info for themselves. See How to Answer on how to provide a quality answer. - From Review
    – fsb
    Aug 23, 2017 at 17:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .