MacOS Sierra sleep mode after a couple of minutes I am new to Mac and writing codes. When I leave the laptop idle for a couple of minutes, it goes into hibernation or sleep mode and doesn't run it. So, I have to press the power button to activate it. Sometimes, I need the codes to run while I sleep or do things, so I am trying to lift this hibernation/sleep mode. 

I used sudo pmset -g on terminal and it gave me the following:

System-wide power settings:
Currently in use:
 standbydelay         10800
 standby              1
 womp                 1
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 powernap             0
 gpuswitch            2
 networkoversleep     0
 disksleep            0
 sleep                1
 autopoweroffdelay    28800
 hibernatemode        3
 autopoweroff         0
 ttyskeepawake        1
 displaysleep         10
 tcpkeepalive         1
 acwake               0
 lidwake              1


Apparently, it has 3 hours to standby. Does this 3 minutes come from hibernatemode 3? 

I tried sudo pmset -a autopoweroff 0 and pmset -g |grep standbydelay but it gives a warning that 

Warning: Idle sleep timings for "Battery Power" may not behave as expected.
- Disk sleep should be non-zero whenever system sleep is non-zero.
Warning: Idle sleep timings for "AC Power" may not behave as expected.
- Disk sleep should be non-zero whenever system sleep is non-zero.


What should I do?
You should go to your terminal, type man caffeinate and read it. You'll have the answer you need. If not, please follow up with a specific question.