Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

felixen

macrumors 6502a
Original poster
Apr 13, 2009
881
113
I’m trying to run a node on my Mac mini (2011, running Catalina). I went to the energy settings or whatever it’s called and I dragged the slider all the way to the right where it says “never”.

I thought this meant it would never go to sleep. I noticed it didn’t work so I found a terminal command on Google. Can’t recall it right now as I’m away from home but it was something with caffeine I think.

Why does it not work and what can I do to keep that sucker on 24/7 without going to sleep?
 
Last edited:

felixen

macrumors 6502a
Original poster
Apr 13, 2009
881
113
There is sleep and there is off. Does the mini sleep or does it shut down? If shut down, perhaps you have a scheduled shut down configured?
My bad, I should have been more specific. I meant to say it’s going to sleep
 

dictoresno

macrumors 601
Apr 30, 2012
4,495
632
NJ
I was having the same problem with my garage Mac mini sleeping and not waking for network access through screen sharing. I was finally able to get the setting correct where its always awake and ready for remote access.

I think toggling on "prevent automatic sleep when the display is off" under energy saving in the settings menu was what finally made it always available for network access.
 

felixen

macrumors 6502a
Original poster
Apr 13, 2009
881
113
Please post the output of this command, entered in a Terminal window:
Code:
pmset -g
Sorry mate, I only came back home today so haven’t been able to get until now. Here is the output I get when using your command:

oliver@Mac-mini-tilhrende-Oliver ~ % pmset -g

System-wide power settings:

Currently in use:

standby 0

Sleep On Power Button 1

womp 1

autorestart 1

hibernatefile /var/vm/sleepimage

powernap 0

networkoversleep 0

disksleep 0

standbydelayhigh 86400

sleep 0

autopoweroffdelay 259200

hibernatemode 0

autopoweroff 1

ttyskeepawake 1

displaysleep 0

highstandbythreshold 50

standbydelaylow 86400

oliver@Mac-mini-tilhrende-Oliver ~ %
 

felixen

macrumors 6502a
Original poster
Apr 13, 2009
881
113
I was having the same problem with my garage Mac mini sleeping and not waking for network access through screen sharing. I was finally able to get the setting correct where its always awake and ready for remote access.

I think toggling on "prevent automatic sleep when the display is off" under energy saving in the settings menu was what finally made it always available for network access.
Thanks a lot but I don’t think I have that option. What macOS are you running? I’m on Catalina
 

chown33

Moderator
Staff member
Aug 9, 2009
10,767
8,468
A sea of green
I don't see anything obviously unusual with the 'pmset -g' settings. You may want to read the man page to learn how to output one of the various logs, which might tell you how or why the machine is sleeping.

Another thing to try is a controlled experiment. Use the Settings panel to set:
- system sleep to exactly 2 hrs
- display sleep to 15 minutes
- screensaver to 10 minutes
With those settings established, capture the pmset data:
Code:
pmset -g >~/pmsettings.txt
Confirm the settings in the file are as expected. Please post the contents of that file.

When you're not using the computer, observe whether the settings actually happen at the expected times. That is, watch whether the screensaver starts at 10 minutes, the display sleeps at 15 minutes, and the machine sleeps at 2 hours.

If all the times are correct, then wake the machine and set a longer sleep delay, say 6 hours, using pmset (remember the units are minutes). Then confirm that it sleeps after that interval.

If nothing else works, and the logs are uninformative, try setting a very high sleep delay, like 6 days, using pmset.
 
  • Love
Reactions: felixen

ab22

macrumors member
Nov 14, 2020
80
51
I've used sudo pmset -a disablesleep 1 on a MacBook I wanted to keep running even with the lid closed.

It disables even the Apple menu sleep item. Still works on Sonoma 14.4

Adds this section to the output of pmset -g

System-wide power settings: SleepDisabled 1
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.