Objective:
The MacBook defaults to the hybrid sleep mode mode (mode 3) by default, and the computer is powered. If you don't want to power off, the current state of work is lost.
The MacBook can actually go into hibernation mode, but it's not open and we can set it up via terminal commands.
Types of sleep modes:
1. Sleep mode (mode 0):
Saves the current state in memory, the system continues to power up, and the wake-up from memory loads faster.
2. Sleep mode (Mode 1):
Saves the current state to the private disk space, the computer shuts down completely, and the wake-up from the hard disk is slightly slower to load. (Private disk space is the same as memory size)
3. Hybrid sleep mode (Mode 3):
Saves the current state in memory, saves the current state to disk when the power is running out, and then shuts down completely.
Mode settings:
1. Open Terminal: (finder-> application, utilities, terminal)
2. View the current mode:
Enter view command: PMSET-G
3. Settings:
Input settings command: sudo pmset-a hibernatemode 1
Enter the root password to take effect after the return (how to set a password without password)
4. Verify that the setting is successful:
Source: http://benyouhui.it168.com/thread-1886490-1-1.html
Set MacBook Hibernation mode