I think that I have finally found a happy medium with my iMac’s sleep settings, thanks to MacPilot.
Although the Energy Saver pane is content to allow me to set the time to display sleep, and to ensure that my hard drive is not put to sleep, it does not permit separate display and CPU sleep settings, which MacPilot does. And they work.
If you don’t have MacPilot, but want to do better than your Energy Saver pane permits, the file which you need to edit using PlistEdit Pro or a plain text or XML editor such as BBEdit, is the property list at /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist
This contains normal hierarchical settings for various keys as follows.
ActivePowerProfiles lists a profile for AC Power; if you have a UPS connected, then there will also be one for UPS Power.
Custom Profile contains the power profiles. Within that,
AC Power lists the settings to use when on AC mains power. If you have a UPS, there may well be a separate set of settings to use when running on UPS power.
The important settings are:
Disk Sleep Timerwhich is set to 0 if you do not want hard drives to go to sleep, otherwise the time in minutes before they are put to sleep;
Display Sleep Timeris set to, say, 30, and is the time in minutes before the display is put to sleep;
System Sleep Timermight be set to 120, and is the time in minutes before the CPU and the rest of the system is put to sleep.
You may also find
LastSleepUUID which apparently gives old details of a previous sleep, but now appears to be disused.
SystemPowerSettings contains a single setting which is probably of no value to you.
UPSDefaultThresholds contains settings to determine when your Mac will shut down once it is running on UPS power.
I hope that these help you work around any bizarre shortcomings in the Energy Saver pane on your Mac.