休眠模式确实变了,但有方法可以像以前那样设置。
OS X El Capitan introduced lots of changes, most of them are not easy to be found since they are not on the GUI level. Well, SIP can be one of them but this post will not talk about it once again.
Here are some changes/hacks I found. Hibernate mode restriction
To check current hibernate mode setting:“hibernatemode” value teardown (Reference):
_ ____ ___1 (bit 0) enable hibernate, suspend to disk, write sleep image file.
_ ____ __1_ (bit 1) safe sleep, suspend to RAM first, and hibernate when battery level critical.
_ ____ _1__ (bit 2) sleepimage file encryption.
_ ____ 1___ (bit 3) “encourages the dynamic pager to page out inactive pages prior to hibernation, for a smaller memory footprint.”
_ ___1 ____ (bit 4) “encourages the dynamic pager to page out more aggressively prior to hibernation, for a smaller memory footprint.”
_ __1_ ____ (bit 5) set “boot-switch-vars”, useful for CloverEFI on some Hacks.
_ _1__ ____ (bit 6) restart machine after writing sleepimage
_ 1___ ____ (bit 7) SSD mode invert
1 ____ ____ (bit 8) dynamic sleepimage size And also code reference from Apple Open Source: - {
- kIOHibernateModeOn = 0x00000001,
- kIOHibernateModeSleep = 0x00000002,
- kIOHibernateModeEncrypt = 0x00000004,
- kIOHibernateModeDiscardCleanInactive = 0x00000008,
- kIOHibernateModeDiscardCleanActive = 0x00000010,
- kIOHibernateModeSwitch = 0x00000020,
- kIOHibernateModeRestart = 0x00000040,
- kIOHibernateModeSSDInvert = 0x00000080,
- kIOHibernateModeFileResize = 0x00000100,
- };
复制代码Before 10.11, hibernate mode can be set without restriction. However, in 10.11, pmset tool would only allow mode 0, 3 and 25 to be set. If values other than these three need to be set, just edit the system preferences file manually: - /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist
复制代码After reboot, the new hibernate mode would be working perfectly as before.
要想设置其它模式,自己手动改“/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist”就行了。
|