So I saw a lots of old discussion on this topic, but I'm trying to find out an actual solution that still works on Mojave / Catalina, without the use of external monitor/keyboard/mouse/with power adapter.

When looking up Amphetamine, they claimed that you can only do it when the 4 criteria are met, and cannot overridden it.


But on the other hands, Anti Sleep provide the feature in their pro version...

enter image description here

So, which one gets the real deal ? Is Anti Sleep lying about it or Amphetamine (and all other caffeine app on the appStore) is out of date ?

I also heard about InsomniaX and built-in caffeine but it's really not user friendly, and appear not to be supported anymore...


You can accomplish this in terminal. No additional software needed.

Display global power settings:
pmset -g

System-wide power settings:
Currently in use:
 lidwake              1
 autopoweroff         1
 standbydelayhigh     86400
 autopoweroffdelay    28800
 proximitywake        1
 standby              1
 standbydelaylow      10800
 ttyskeepawake        1
 hibernatemode        3
 powernap             1
 gpuswitch            2
 hibernatefile        /var/vm/sleepimage
 highstandbythreshold 50
 womp                 0
 displaysleep         10
 networkoversleep     0
 sleep                1 (sleep prevented by sharingd)
 tcpkeepalive         1
 halfdim              1
 acwake               0
 disksleep            10

To stop sleep entirely:
sudo pmset -a disablesleep 1

To revert, allowing sleep again:
sudo pmset -a disablesleep 0

  • Well, that was an easy one ! But then, why amphetamine claim it's impossible ? Thanks CJ ! – Edd Growl Jun 2 '19 at 17:11
  • 2
    these settings are stored in the PRAM/NVRAM which is covered by the logic board and protected by Apple's System Integrity Protection. Thats why sudo is required for the command to execute. – CJ Dana Jun 3 '19 at 22:19
  • 5
    Be careful with this. It literally disables the sleep option on the Apple menu. When I used it and put my Mac away in my backpack at the end of the day, it kept running and got very hot. Before stopping work for the day, you'll have to allow sleep again with the ...disablesleep 0 option. – JESii Dec 3 '19 at 10:03
  • This is a fantastic solution. I can have my Mac running connected to a monitor, and my lid is closed and it is still running. – MikeyN0 Oct 30 '20 at 5:28
  • Thank you! This finally did the trick! – Jono Nov 9 '20 at 17:20

A better way to do this is to follow the instructions here. Very simply, with the cover open:

  1. Connect to power
  2. Connect a bluetooth / USB keyboard and mouse

Now close the cover. Clicking the mouse will light up the external monitor if it shut down when you closed the cover.

  • 4
    Thanks for the heads up on apple support, but I was looking for a solution without the use of external monitor/keyboard/mouse/with power adapter as I said in the question... so CJ's way is definitely the better ;) – Edd Growl Dec 3 '19 at 17:21

You must log in to answer this question.

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