Last active
December 10, 2015 21:18
-
-
Save jackpooley/4493864 to your computer and use it in GitHub Desktop.
After Firmware update MBP hibernate mode is automatically set to 3 on shutdown (ignores 'sudo pmset -a hibernatemode 0' command).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # force_disable_hibernate_mode.sh | |
| # | |
| # More Info: https://discussions.apple.com/thread/4492672?start=0&tstart=0 | |
| # | |
| # First, disable hibernation mode: | |
| sudo pmset -a hibernatemode 0 | |
| # Delete /private/var/vm/sleepimage: | |
| sudo rm /private/var/vm/sleepimage | |
| # Option 1: Lock hibernatefile | |
| function lock_hibernatefile () | |
| { | |
| # create an empty file and name it 'sleepimage': | |
| sudo touch /private/var/vm/sleepimage | |
| # change its flag to immutable: | |
| sudo chflags uchg /private/var/vm/sleepimage | |
| } | |
| # Option 2: Set hibernatefile to /dev/null | |
| function set_hibernatefile_to_dev_null () | |
| { | |
| sudo pmset -a hibernatefile /dev/null | |
| } | |
| lock_hibernatefile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment