neat fact: you can use pmset on MacOS to make a macbook get even better battery life by hibernating instead of sleeping. you can also configure a mac desktop to do Safe Sleep like a laptop, so if the power goes out while it's asleep it just boots from the hibernation file. i THINK this is safe security-wise due to FileVault and so on or else they wouldn't do it on laptops. if you're worried about that you can also set "destroyfvkeyonstandby" to make it forget the FileVault key every time it goes to sleep (though this makes it so you have to put in your password every time, no touch ID)
SAFE SLEEP ARGUMENTS
hibernatemode supports values of 0, 3, or 25.
Whether or not a hibernation image gets
written is also dependent on the values of
standby and autopoweroff
For example, on desktops that support standby
a hibernation image will be written after the
specified standbydelay time. To disable
hibernation images completely, ensure
hibernatemode standby and autopoweroff are
all set to 0.
hibernatemode = 0 by default on desktops. The
system will not back memory up to persistent
storage. The system must wake from the
contents of memory; the system will lose
context on power loss. This is, historically,
plain old sleep.
hibernatemode = 3 by default on portables.
The system will store a copy of memory to
persistent storage (the disk), and will power
memory during sleep. The system will wake
from memory, unless a power loss forces it to
restore from hibernate image.
hibernatemode = 25 is only settable via
pmset. The system will store a copy of memory
to persistent storage (the disk), and will
remove power to memory. The system will
restore from disk image. If you want
"hibernation" - slower sleeps, slower wakes,
and better battery life, you should use this
setting.
Please note that hibernatefile may only point
to a file located on the root volume.
STANDBY ARGUMENTS
standby causes kernel power management to
automatically hibernate a machine after it
has slept for a specified time period. This
saves power while asleep. This setting
defaults to ON for supported hardware. The
setting standby will be visible in pmset -g
if the feature is supported on this machine.
standbydelayhigh and standbydelaylow specify
the delay, in seconds, before writing the
hibernation image to disk and powering off
memory for Standby. standbydelayhigh is used
when the remaining battery capacity is above
highstandbythreshold , and standbydelaylow is
used when the remaining battery capacity is
below highstandbythreshold.
highstandbythreshold has a default value of
50 percent.
autopoweroff is enabled by default on
supported platforms as an implementation of
Lot 6 to the European Energy-related Products
Directive. After sleeping for
<autopoweroffdelay> seconds, the system will
write a hibernation image and go into a lower
power chipset sleep. Wakeups from this state
will take longer than wakeups from regular
sleep.
autopoweroffdelay specifies the delay, in
seconds, before entering autopoweroff mode.
