Skip to content

Instantly share code, notes, and snippets.

@florido
Forked from hariel18/Disable_Hibernate_mode
Created May 1, 2019 03:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save florido/35a3b29d79df5e63f4a86567a1b3941b to your computer and use it in GitHub Desktop.
Save florido/35a3b29d79df5e63f4a86567a1b3941b to your computer and use it in GitHub Desktop.
OSX: Disable Hibernate mode
#http://www.engadget.com/2011/08/22/why-hibernate-or-safe-sleep-mode-is-no-longer-necessary-in-os/
#https://www.idelta.info/archives/some-hidden-changes-in-os-x-el-capitan/
# disable hibernation
sudo pmset hibernatemode 0
# clear the image file
sudo rm -rf /var/vm/sleepimage
# inhibit file recreation
sudo touch /private/var/vm/sleepimage
sudo chflags uchg /private/var/vm/sleepimage
# additional commands (set to 1 to re-enable)
# reference: https://www.macissues.com/2015/05/08/how-to-fix-your-mac-not-waking-from-sleep/
# Apple’s main standby mode option
sudo pmset standby 0
# implementation required for European energy regulations
sudo pmset autopoweroff 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment