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

danallen

macrumors regular
Original poster
Oct 8, 2018
186
39
Houston
Until a few months ago, when my MacPro 5,1 went to sleep, the machine would be quiet, no fans, for hours or days, which was great. To awaken the machine, a key on the mouse and the keyboard would have to be tapped. At that point, the screen would come on, requiring my password, and then the wake up completed immediately. Fans would not come on, because every part of the machine was at the same temperature it would be from power-off for a long time. It seemed as if no power was being drawn, but my session would come back to exactly where it was when the sleep started

Now, when the machine is "asleep" it stirs every few minutes. The screen won't come on for these self-initiated stirs, but something causes the fans to come of for a minute or so. After that, the machine goes back to quiet sleep, until the stir self starts again after 30-40 seconds I don't know what it is doing during these stirs.

When I wake the machine completely, causing the screen to turn on requiring a password to continue, after entering my password,. the fan for the power supply roars for a minute or so, because the power supply temperature has gone way past the limits i keep it to using mac fans.

What can I do to get the more complete sleep mode I used to see?

Any information you can provide will be appreciated immensely.


Thank you.



s2.png
 
Last edited:
You might want to check the sleep / wake schedule to see what events are waking it up. It could be the Calendar waking the system to make sure it hasn't moved geographically in case it needs to update time-to-leave alerts for events.

Here is my entire reference document for the issue:

Code:
Check Sleep / Wake schedule:

pmset -g sched

Clear Sleep / Wake schedule:

sudo pmset schedule cancelall

Lock Sleep / Wake schedule:

sudo chflags schg /Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist

Unlock Sleep / Wake schedule:

sudo chflags noschg /Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist

Check Wake reasons:

log show --style syslog | fgrep "Wake reason"


Example: 

pmset -g sched
Scheduled power events:
 [0]  wake at 05/18/2024 21:54:54 by 'com.apple.alarm.user-visible-com.apple.CalendarNotification.EKTravelEngine.periodicRefreshTimer'
 [1]  wake at 05/19/2024 00:00:00 by 'com.apple.alarm.user-visible-com.apple.donotdisturb.server.ScheduleLifetimeMonitor.timer' User visible: true
 [2]  wake at 05/19/2024 07:58:51 by 'com.apple.alarm.user-visible-com.apple.acmd.alarm'


On another forum a solution was found by somebody:
#------------------------------------------------------------------------------
Having investigated this further I found that there is a MacOS FeatureFlag for enabling CoreSmartPowerNap in powerd.plist in the system folder /System/Library/FeatureFlags/Domain/

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CoreSmartPowerNap</key>
<dict>
<key>Enabled</key>
<true/>
</dict>
</dict>
</plist>



We cant change this plist directly because the file is in the secure system enclave but another user pointed out that we can override MacOS FeatureFlags by setting in them in the /Library/Preferences/FeatureFlags/Domain/ folder.

I've tried this approach and since implementing I have not seen any CSPNEvaluation wake reasons.

If you want to try this for yourself do the following :-

1. Open Terminal

2. Create the folder structure in terminal with: sudo mkdir -p /Library/Preferences/FeatureFlags/Domain/

3. Copy the above code into a editor and change the boolean flag <true/> to <false/>

4. Save the file as powerd.plist into the new folder: /Library/Preferences/FeatureFlags/Domain/

5. Reboot
#------------------------------------------------------------------------------

Tried and tested this:
1. put the machine into sleep
2. wake it up
3. pmset -g log > pmset.txt.
4. Voila -> no CSPNEvaluation Wake Request for this sleep action
 
@mattspace, this is a tremendous information. Thank you LARGE. I am going to try the commands you shared and let you know how that works out.

How did you come by this information? It looks like something you figured and and developed over time
You might want to check the sleep / wake schedule to see what events are waking it up. It could be the Calendar waking the system to make sure it hasn't moved geographically in case it needs to update time-to-leave alerts for events.

[snip]



@mattspace
I really cannot thank you enough for sharing what you know about this aspect of macOS. Thank you.

I am not sure I understand the instructions completely. Walking through what I see.

OBJECTIVE 1 (This seems ok, I think)
Create the folder structure in terminal with: sudo mkdir -p /Library/Preferences/FeatureFlags/Domain/

RESULTS
1. The folder structure /Library/Preferences/FeatureFlags/Domain/ already exists. However. To move into that directory, I have to be logged in as root user. sudo does not put me in there.

1.png


Switching to root user produces what I expected:
2.png


OBJECTIVE 1 appears COMPLETE
.
.


OBJECTIVE 2 (This is where I am having a problem)
Copy the above code into a editor and change the boolean flag <true/> to <false/>.
.
Here is the file, listed in /Library/Preferences/FeatureFlags/Domain/
3.png


QUESTION: is it ok for root to be the file owner?

Here is the file contents:
s3.png


Now Rebooting. Will let you know how it goes.

Thank you again
 
My system drive is on a PCIe ssd. What kind of checking can I do for this?

This might be the issue. Are you able to completely take out the PCIe card and try a local SATA boot drive to see if it still sleeps?

But you did say originally that sleep used to work even with this setup.

Have you changed anything lately before this started to happen? New software? Hardware? Connected USB peripherals?
 
@mattspace, this is a tremendous information. Thank you LARGE. I am going to try the commands you shared and let you know how that works out.

How did you come by this information? It looks like something you figured and and developed over time

Various searching ususally turning up answers on Apple's forums for the first part at least.

I haven't done the second part, with the FeatureFlags stuff, because it isn't necessary on Ventura; just the lockig of the sleep / wake schedule.

Another thing to try would be Ohanaware's Sleep Aid, which lets you disable all the WiFi / BT radios during sleep, defer maintenance tasks etc.

@mattspace
I really cannot thank you enough for sharing what you know about this aspect of macOS. Thank you.

I am not sure I understand the instructions completely. Walking through what I see.

Unfortunately I can't advise on that stage, I did get this part of the info from these forums though, so if you search here, maybe in the macos forum, you might find the person who posted it, and be able to get help from them.
 
@mattspace I'm using Sequoia here on a 4,1 -> 5,1 (OCLP 2.4.1)

I tried the FeatureFlags solution for a day by itself. Rebooting of course, for it to take. It greatly reduced the wakeups, but a couple still slipped through.

I've now applied the sleep / wake schedule solution. Without removing FeatureFlags. If this fixes the insomnia all the way, I'll remove FeatureFlags, testing the sleep/wake schedule by itself.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.