I've found a number of hints to force a MacBook (or other) into Hibernation mode (ie. write RAM to Disk, and completely power off - so system is back in it's pre-sleep state upon next boot), but they all appear to only work when the MacBook is slept while on Battery Power.
Is there a way to force a MacBook Pro to hibernate, even when on AC power (magsafe)?
The reason is: due to a hardware problem, I had to remove the battery from my MacBook (it's got a "Permanent Battery Failure" which was slowing down the whole system presumably due to hardware communication issues, until I removed it - waiting for a replacement). So once the MagSafe AC adapter is unplugged, the system goes down hard - zero power. It loses system time every time I remove the AC power & reboot.
So, while I wait for a new battery to arrive, I would like to make the laptop at least hibernate before I unplug it. So far, trying things like sudo pmset hibernatemode 25 standby 1 standbydelay 0
haven't made this work yet. If I close the laptop or do pmset sleepnow
, wait even a few hours and then unplug the AC & then reboot, the system is always starting afresh (no previous state to be restored, and loses system time).
Is this because there is no low-power battery backup (the cause for losing system time), or because the system never went into hibernation? Ie., would a system in hibernate mode, that then lose the system time due to absoluytely zero power, also lose it's hibertaion state? (This doesn't make sense to me, as I'd expect the system to restore from the hard drive.)
FYI, a hibernate file was indeed written, eg.:
>>> ls -fal /var/vm/
-rw------T 1 root wheel 1073741824 Jul 31 18:31 sleepimage
Perhaps losing system time causes the hibernate file to be skipped?
Thanks for suggestions. System Specs: MacBook Pro 13-inch late 2011, OS 10.11.6, SSD drive as primary, HDD in-place of DVD drive.