I have a Late 2008 MacBook Pro, that runs only on charger (wall power), because the battery died a long time ago. With battery it used to be able to hibernate to disk, but it seems like I can not get that feature to work now, because the battery level never gets low enough to trigger the hibernation to disk - there is no battery.
I want to be able to close the lid and for the system to get into safe state, where I can remove the charger and later restore my work from were I left off, when I plug it in again.
After reading
How to add hibernate mode to MacBook Pro and it seems like my only option is to switch to hibernatemode 25. This is quite old model so it does not support standby and autopoweroff:
$ sudo pmset -g
System-wide power settings:
Currently in use:
womp 1
Sleep On Power Button 1
halfdim 1
autorestart 0
hibernatefile /var/vm/sleepimage
gpuswitch 2
sms 1
networkoversleep 0
disksleep 10
sleep 0
hibernatemode 3
ttyskeepawake 1
displaysleep 15
acwake 0
lidwake 1
Is there a combination of settings that maintains the system state in memory but also always hibernates to disk that works on this model?
hibernatemode 3does exactly what you describe. Look at man pmset – Allan Apr 04 '17 at 12:05hibernatemode 3, but the problem is that when I remove the charger while it is sleeping and reconnect it again, it doesn’t resume from sleep - it just restarts after a brief failed attempt at resuming. – Palimondo Apr 05 '17 at 11:37rmeven withsudo. It just gave the errorrm: /var/vm/sleepimage: Operation not permitted– hippietrail Aug 17 '17 at 02:09-fflag to force the deletion. – Allan Aug 17 '17 at 02:20sudo pmset sleep 0. If you typesudo pmset -g, it will show you all the settings that are currently configured. 0 is disabled, any value greater than 0 is the number of minutes. – Allan Aug 17 '17 at 02:35