MacOS – the difference between pmset and systemsetup sleep options

macossleep-wake

On my MacBook Air 2013 (Mountain Lion):

pmset has the following sleep settings:

$ pmset -g
...
 disksleep            10
 sleep                1
 displaysleep         2

while systemsetup has the following settings:

$ systemsetup -getsleep
Sleep: Computer sleeps after 10 minutes
Sleep: Display sleeps after 10 minutes
Sleep: Disk sleeps after 10 minutes

What is the difference between these settings?

Also, Energy Saver shows "Display sleep" is set to 2 minutes, so coincides with pmset, while "Computer sleep" is no longer shown in Mountain Lion I have read. Why is this no longer possible?

UPDATE: Turns out MacBook Air 2013 dropped separate sliders for computer- and display sleep: http://forums.macrumors.com/showthread.php?t=1595455
Using pmset to set these individually should still work however. Not sure I like the change though…

Best Answer

In this case, systemsetup is a high level wrapper that is analogous to the System Preferences UI. Both call the lower level power API which are the internals about how the system actually stores these values for the hardware to use and implement. pmset is a lower level tool that reads the API/hardware values directly, so I would generally trust that over the higher level tools like Energy Saver or system setup

If you are right and there is a discrepancy, you might have to file a bug report with Apple to figure out if it's really a bug or just that the information is being mixed up before it is presented to you.

You can go directly to the source file as it's stored at /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist and perhaps it can break the tie between which of these three tools is telling you the correct information?

In all my computers, the numbers match up, so perhaps the systemsleep values are incorrect for your hardware or OS build?