5 ms·
I've had this in my .profile for years: alias sleepsafe='sudo pmset -a destroyfvkeyonstandby 1 hibernatemode 25' alias sleepfast='sudo pmset -a hibernatemo
by dashesyan 10y ago
I've had this in my .profile for years:
alias sleepsafe='sudo pmset -a destroyfvkeyonstandby 1 hibernatemode 25'
alias sleepfast='sudo pmset -a hibernatemode 0'
alias sleepdefault='sudo pmset -a hibernatemode 3'
Whenever I travel or need to leave my laptop, I always run `sleepsafe`, which will delete the key from memory and hibernate the computer when I close the lid. It has the added benefit of saving battery life.
Day-to-day, I use `sleepfast`, which is faster than the default hybrid sleep, because it doesn't spend time copying the contents of memory to disk.
I very rarely switch to `sleepdefault` which is the insecure and slower hybrid sleep.
This has been a known issue for years
http://osxdaily.com/2013/07/06/maximize-filevault-security-destroy-key-storage-standby/ http://osxdaily.com/2013/07/06/maximize-filevault-security-d...
https://nakedsecurity.sophos.com/2012/02/02/filevault-encryption-broken/ https://nakedsecurity.sophos.com/2012/02/02/filevault-encryp...
- j_s 10y agoThanks for sharing these awesome shortcuts! Are there any caveats that I should be aware of before just stealing this to use for myself?
- lstamour 10y agoYou could read through http://training.apple.com/pdf/WP_FileVault2.pdf http://training.apple.com/pdf/WP_FileVault2.pdf for some of the details, or `man pmset`. Use `pmset -g` at any time to see your current settings.
- dashesyan 10y agoJust make sure you eject any removable disks before hibernating. And, sleepfast may drain your battery faster than the default hybrid sleep
- shshhdhs 10y agoOP said sleepfast increases his battery life. It sounds like you lose whatever is in memory though
- dootdootskeltal 10y agoIt doesn't work for me on Sierra, I disabled powernap and it keeps asking for my account password. Also I set standbydelay and standby to 0. Edit: After some time and some tries, idk why but it started working. Commands that I used: $ sudo pmset -a darkwakes 0 $ sudo pmset -a standby 0 $ sudo pmset -a standbydelay 0 Also check that powernap is disabled.
- bburky 10y agoI prefer YoNTMA: https://github.com/iSECPartners/yontma-mac https://github.com/iSECPartners/yontma-mac If the laptop is disconnected from AC, it hibernates. It will switch to hibernate if power is removed while already sleeping. If I want to force a hibernate manually, I just pull the power before closing the lid.