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

MBHockey

macrumors 601
Original poster
Oct 4, 2003
4,063
314
Connecticut
I'm having a heck of a time preventing my new M4 Mac Mini from sleeping. I run a few VMs and Plex server off it, so i just want it to stay on 24/7. I did not have this issue with the M1 Mac Studio before it.

Settings -> Energy
Energy Mode: automatic
Prevent Automatic sleeping when the display is off: enabled
Put hard disks to sleep when possible: disabled
Wake for network access: enabled
Start up automatically after power failure: enabled

Settings --> Lock Screen
Start screen saver when inactive: for 5 minutes
Turn display off when inactive: for 20 minutes
Require password after screen saver begins or display is turned off: after 1 hour

So i have these settings on, and also have set up Amphetamine to keep my computer from sleeping. But every few days, it still just decides it wants to sleep and breaks all my network connections.

When i go into terminal to see what's going on, this is what i get about the sleep/wake cycles:

Code:
pmset -g log | egrep "\b(Sleep|Wake|DarkWake|Start)\s{2,}"
2025-01-24 16:42:18 -0500 Sleep                   Entering Sleep state due to 'Software Sleep pid=579':TCPKeepAlive=active Using AC (Charge:0%) 943 secs
2025-01-24 16:58:01 -0500 DarkWake                DarkWake from Deep Idle [CDNPB] : due to SMC.OutboxNotEmpty smc.70070000 enet lan-10gb/ Using AC (Charge:0%) 45 secs
2025-01-24 16:58:46 -0500 Sleep                   Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using AC (Charge:0%) 943 secs
2025-01-24 17:14:29 -0500 DarkWake                DarkWake from Deep Idle [CDNPB] : due to SMC.OutboxNotEmpty smc.70070000 enet lan-10gb/ Using AC (Charge:0%) 45 secs
2025-01-24 17:15:14 -0500 Sleep                   Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using AC (Charge:0%) 905 secs
2025-01-24 17:30:19 -0500 DarkWake                DarkWake from Deep Idle [CDNPB] : due to NUB.SPMI0Sw3IRQ nub-spmi0.0x02 rtc/Maintenance Using AC (Charge:0%) 45 secs
2025-01-24 17:31:04 -0500 Sleep                   Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using AC (Charge:0%) 943 secs
2025-01-24 17:46:47 -0500 DarkWake                DarkWake from Deep Idle [CDNPB] : due to SMC.OutboxNotEmpty smc.70070000 enet lan-10gb/ Using AC (Charge:0%) 74 secs
2025-01-24 17:48:01 -0500 Sleep                   Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using AC (Charge:0%) 943 secs
2025-01-24 18:03:44 -0500 DarkWake                DarkWake from Deep Idle [CDNPB] : due to SMC.OutboxNotEmpty smc.70070000 enet lan-10gb/ Using AC (Charge:0%) 45 secs
2025-01-24 18:04:29 -0500 Sleep                   Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using AC (Charge:0%) 61 secs
2025-01-24 18:05:30 -0500 Wake                    Wake from Deep Idle [CDNVA] : due to SMC.OutboxNotEmpty smc.70070000 wifibt bluetooth-pcie/HID Activity Using AC (Charge:0%)       
2025-01-24 18:07:26 -0500 Start                   powerd process is started                                                           
2025-01-25 08:16:17 -0500 Sleep                   Entering Sleep state due to 'Software Sleep pid=382':TCPKeepAlive=active Using AC (Charge:0%) 942 secs
2025-01-25 08:31:59 -0500 DarkWake                DarkWake from Deep Idle [CDNPB] : due to SMC.OutboxNotEmpty smc.70070000 enet lan-10gb/ Using AC (Charge:0%) 2430 secs
2025-01-25 09:12:29 -0500 Wake                    DarkWake to FullWake from Deep Idle [CDNVA] : due to HID Activity Using AC (Charge:0%)       
2025-01-25 10:19:00 -0500 Start                   powerd process is started                                                           
2025-01-28 08:30:26 -0500 Sleep                   Entering Sleep state due to 'Software Sleep pid=402':TCPKeepAlive=active Using AC (Charge:0%) 942 secs
2025-01-28 08:46:08 -0500 DarkWake                DarkWake from Deep Idle [CDNPB] : due to SMC.OutboxNotEmpty smc.70070000 enet lan-10gb/ Using AC (Charge:0%) 45 secs
2025-01-28 08:46:53 -0500 Sleep                   Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using AC (Charge:0%) 943 secs
2025-01-28 09:02:36 -0500 DarkWake                DarkWake from Deep Idle [CDNPB] : due to SMC.OutboxNotEmpty smc.70070000 enet lan-10gb/ Using AC (Charge:0%) 45 secs
2025-01-28 09:03:21 -0500 Sleep                   Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using AC (Charge:0%) 924 secs
2025-01-28 09:18:45 -0500 DarkWake                DarkWake from Deep Idle [CDNPB] : due to NUB.SPMI0Sw3IRQ nub-spmi0.0x02 rtc/Maintenance Using AC (Charge:0%) 67 secs
2025-01-28 09:19:52 -0500 Sleep                   Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using AC (Charge:0%) 943 secs
2025-01-28 09:35:35 -0500 DarkWake                DarkWake from Deep Idle [CDNPB] : due to SMC.OutboxNotEmpty smc.70070000 enet lan-10gb/ Using AC (Charge:0%) 61 secs
2025-01-28 09:36:36 -0500 Sleep                   Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using AC (Charge:0%) 122 secs
2025-01-28 09:38:38 -0500 Wake                    Wake from Deep Idle [CDNVA] : due to SMC.OutboxNotEmpty smc.70070000 wifibt bluetooth-pcie/HID Activity Using AC (Charge:0%)

Any ideas why my Mac Mini is so determined to go to sleep despite my best efforts?

Computer specs (not sure it matters): M4 Pro Mac Mini, 2 TB SSD, 48 gb ram, 10G ethernet (this computer uses ethernet only, not wifi, MacOS 15.2). Hooked up to Apple Studio Display.
 
Last edited:
Weird, if anything I find Mac desktops (my m4 mini included) don’t like to sleep at all. Mine certainly doesn’t by itself (and rarely if I ask it).
I would try starting a new user profile and see if it’s linked to your account and software your running.
 
Download Amphetamine from the App Store
 
  • Like
Reactions: haralds
Download Amphetamine from the App Store

Unfortunately it isn’t working (stated in original post)
 
I’ve had other similar problem with my Mac mini Pro.

Everything works great when I’m using the computer. But here’s the catch: when I’m not using the computer, it wakes up when someone’s streaming from Plex. Then, after about a minute, it goes back to sleep.
I made an app for myself that shows something when someone’s streaming from my Plex server.

Example:
Screenshot 2025-03-12 at 23.04.47.png



But here’s the kicker: when it detects network traffic on port 32400, it wakes up the Mac mini again, and this wake/sleep cycle repeats.

The problem is that when network traffic is detected on the LAN, the Mac mini wakes up in a low-power mode called DarkWake. In this mode, the monitor doesn’t even turn on or display any image.

So, I figured I’d add an extra feature to my app to create a power assertion that switches from DarkWake to Full Wake. This way, the Mac mini stays in Full Wake mode while someone is using my Plex Media Server for streaming.

The monitor turns on for about a second or two, and then when they stop streaming, the Mac mini goes back to sleep.
This way, it doesn’t go to sleep while streaming.


I could easily create a simple app with this feature if needed. Here’s what the app should do:

1. Detect if Plex is streaming or not.
2. Check if the Mac is in DarkWake or not.
3. If Plex is streaming and the Mac is in DarkWake mode, create a power assertion to switch from DarkWake to FullWake.

Note: If the computer is wake up by you, then if someone streams, it should not go to sleep. Plex Media Server itself creates a power assertion to prevent idle sleep.

-----------------------------------------------------------------------------------------------
But If someone wants the Mac not to sleep ever, then run on terminal: caffeinate
Or use Amphetamine and select from the menu Start New Session: Indefinitely
-----------------------------------------------------------------------------------------------

The original poster says that "every few days, it still just decides it wants to sleep" but the pmset log shows that it sleeps and wakes multiple times a day.

It also shows that:
Prevent Automatic sleeping when the display is off: enabled

I believe this is the same as: pmset -a sleep 0 which should set the Mac to never sleep.

The original poster should post the output of: pmset -g

This is my output:

Code:
System-wide power settings:

Currently in use:
 standby              0
 Sleep On Power Button 1
 autorestart          0
 SleepServices        0
 powernap             0
 networkoversleep     0
 disksleep            10
 sleep                1 (sleep prevented by sharingd, powerd, bluetoothd)
 ttyskeepawake        0
 displaysleep         5
 tcpkeepalive         0
 powermode            0
 womp                 1

I've changed my settings for my needs and issue.
For example, I've disabled powernap because it was causing my MacMini to overheat in sleep mode.
 
oddly enough, i can't keep my mac mini from staying in sleep mode. it constantly wakes up for some background activity even after setting things up in the system to make sure it goes to sleep.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.