2

I believe I've correctly configured my MacBook Pro to hibernate (after a delay) when I close the lid, with the following settings

 standbydelay         900
 standby              1
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 powernap             0
 disksleep            0
 sleep                1
 autopoweroffdelay    28800
 hibernatemode        25
 autopoweroff         1
 ttyskeepawake        0
 displaysleep         2
 acwake               0
 lidwake              1

However I'm not sure that my machine is actually hibernating as expected and would like to be able to confirm that it has.

Is there a way to do this?

I've tried things like

pmset -g log|grep -e " Sleep  " -e " Wake  "  -e " DarkWake " | tail -n 5

which gives, for example

2016-11-17 08:39:03 -0500 Wake                  Wake from Standby [CDNVA] due to EC.LidOpen/Lid Open: Using BATT (Charge:93%) 1630 secs 
2016-11-17 09:06:13 -0500 Sleep                 Entering Sleep state due to 'Idle Sleep': Using Batt (Charge:83%) 868 secs  
2016-11-17 09:20:41 -0500 Wake                  Wake from Standby [CDNVA] due to EC.PME/User: Using BATT (Charge:83%) 462 secs  
2016-11-17 09:28:23 -0500 Sleep                 Entering Sleep state due to 'Clamshell Sleep': Using Batt (Charge:80%) 4586 secs 
2016-11-17 10:44:49 -0500 Wake                  Wake from Standby [CDNVA] due to EC.LidOpen/Lid Open: Using BATT (Charge:79%)

and

pmset -g log | grep LidOpen | tail -n 5

which gives

2016-11-16 18:10:07 -0500 Wake                  Wake from Deep Idle [CDNVA] due to EC.LidOpen/Lid Open: Using AC (Charge:35%) 95 secs   
2016-11-16 18:27:04 -0500 Wake                  Wake from Deep Idle [CDNVA] due to EC.LidOpen/Lid Open: Using AC (Charge:53%) 675 secs  
2016-11-17 07:50:59 -0500 Wake                  Wake from Deep Idle [CDNVA] due to EC.LidOpen/Lid Open: Using AC (Charge:100%) 174 secs  
2016-11-17 08:39:03 -0500 Wake                  Wake from Standby [CDNVA] due to EC.LidOpen/Lid Open: Using BATT (Charge:93%) 1630 secs 
2016-11-17 10:44:49 -0500 Wake                  Wake from Standby [CDNVA] due to EC.LidOpen/Lid Open: Using BATT (Charge:79%)

or

pmset -g log | grep sleep | tail -n 5

which gives

2016-11-17 09:28:10 -0500 Assertions            PID 198(coreaudiod) Released PreventUserIdleSystemSleep "com.apple.audio.context2626.preventuseridlesleep" 00:01:46  id:0x0x1000087fe [System: DeclUser SRPrevSleep kCPU kDisp]          
2016-11-17 10:44:24 -0500 Assertions            Kernel Idle sleep preventers: IODisplayWrangler          
2016-11-17 10:54:12 -0500 Assertions            PID 198(coreaudiod) Released PreventUserIdleDisplaySleep "com.apple.audio.context2629.preventuseridledisplaysleep" 00:09:04  id:0x0x500008862 [System: DeclUser kDisp]          
2016-11-17 10:54:12 -0500 Assertions            PID 198(coreaudiod) Released PreventUserIdleSystemSleep "com.apple.audio.context2629.preventuseridlesleep" 00:09:04  id:0x0x100008861 [System: DeclUser kDisp]          
Idle sleep preventers: IODisplayWrangler

but I'm not sure any of these are the right commands, or how to interpret their results.

How do I confirm (ideally from the command line) that my Mac has hibernated?

1

Use the following command to check:

pmset -g log | grep -i "wake from"

If the latest entry says: "Wake from Hibernate", the Mac was hibernated when you last woke it up (for example opened the lid).

If it says for example "Wake from Standby" it was not hibernated.

  • Is the omission of tail important? How is this different from what I tried in the OP? – orome Mar 15 '18 at 16:18
  • No, it is not important. The tail part of your old command meant that you only saw the last 5 lines of the log file. This is different because I have explained for you exactly what to look for, which you didn't have in your question. – jksoegaard Mar 15 '18 at 17:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .