-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
destroyfvkeyonstandby requires additional pmset settings in order to avoid system shutdown #124
Comments
I like the idea of destroyfvkeyonstandby but find it to be somewhat of a PITA, making the system less stable. Downgraded to experimental. Related: drduh/macOS-Security-and-Privacy-Guide#124
I'm not using Yubikey, but I have tried |
What is likely happening is, the Mac is waking for Power Nap, hitting the FileVault unlock screen, then powering off due to a temperature failsafe. At least that's my theory. Try leaving Power Nap off and don't connect the machine to AC power to test it. |
you may find explanation and the fix there: https://derflounder.wordpress.com/2014/02/12/power-nap-power-management-settings-and-filevault-2/, not sure about Yubikey though. |
I've always had Power Nap disabled, so that wasn't the cause. It does appear to be a bug (or incorrect documentation) regarding the
So I've changed them to this, and it works:
¯_(ツ)_/¯ @kristovatlas, what are your current (non-working) settings (via |
Oh look, shrug is munged by github markdown. This: ¯_(ツ)_/¯ Should be:
🤔 |
sorry, but did you read the whole story from this link above? :) the quote: "Once I’d disabled Power Nap, I thought the problem would be solved. Nothing else should wake it up, right? Then I put my laptop to sleep the next night and tried to wake it the following morning. The laptop was off again, so not fixed". so, powernap is the part of the problem, but even with disabled powernap it is still there. and yes, to fix the problem you need to set these two variables to 0, as the link above says. |
My settings before applying the proposed fix are:
|
These commands were not sufficient to fix the problem:
Resulting in these overall settings:
|
yes, since you need to switch off powernap too (in the case of quinncomendant it was already disabled). |
I have the same problem (macbook pro randomly shutting itself off while in hibernation) and I have the powernap off. The instructions in here (https://derflounder.wordpress.com/2014/02/12/power-nap-power-management-settings-and-filevault-2/) did not help to prevent the problem. Below the best performing settings I found so far - with them the issue seems to be inconsistent: my macbook works as expected for a couple of days, then I suddenly find it powered off. Anyhow most of the times it works as expected.
|
two differences with my setup: autopoweroffdelay is 14400 in my settings (it is measured in minutes, so it never happens anyway I guess) and autopoweroff is 0 in my settings (you have 1, but I guess that it is never triggered in your case, since you set autopoweroffdelay to 0). |
Running this command resolved the issue: This doesn't appear to have anything to do with Yubikey's OS X Login since other people not using Yubikey observed the same problem. (I'll be adjust the title of the issue accordingly.) The final configuration of the machine is:
|
Information accumulated in drduh#124
@kristovatlas I would wait a couple of days before considering it resolved - in my case the laptop works fine for 1, 2 or even 3 days and then I suddenly find it powered off when it's supposed to be hibernating. |
@burguesia: ok, thanks for letting me know. |
FYI: just found my laptop off after a few days of correct functioning. It seems that it goes off more often if I leave the ac power connected while it's hibernating. If it's on battery power it seems to always work fine. |
I use these settings for at least two months without problems. however, I never put it to AC power while it is in hibernate mode. |
@burguesia: my machine is powered off today :( Some output for troubleshooting:
and
|
I think the problem could be
I'm going to test it out and report back. |
@kristovatlas yes, you are right, the unit for this setting is seconds now, but it was in minutes before, so I just remembered that and not rechecked, my bad. you may compare the sources for the man page of pmset here: https://opensource.apple.com/source/PowerManagement/PowerManagement-571.1.3/pmset/pmset.1 (10.11, says "seconds") https://opensource.apple.com/source/PowerManagement/PowerManagement-494.1.2/pmset/pmset.1 (10.10, says "minutes") on the other hand, I just tested the configuration with autopoweroff set to 1 and my notebook was hibernated after 60 seconds regardless of the number set to autopoweroffdelay (I tried 10, 60, 120). |
Since setting |
…behaved FileVault key eviction drduh#124
How are these settings working for folks? Can this issue be resolved now? |
@drduh with autopoweroff to 0 everything has been working fine for me for weeks. I'd say the issue is resolved. |
Please reopen the ticket and write to Apple if the intended behavior is still not working. |
Tried what's mentioned here, hasn't been working for a few days.
Am I just being stupid? |
I just encountered an edge case when I replaced the 512GB stock SSD of my late 2013 13 inch Macbook Pro with a 1TB OWC Aura SSD. "DestroyFVKeyOnStandby 1" + "hibernatemode 25" stopped working. Tweaking powernap, autopoweroffdelay and other options doesn't work. The system cannot come back from hibernation, the only possible solution is a hard reboot. I think the problem is that macOS views the new SSD as an "external" disk. When the system comes back from hibernation it doesn't seem to be able to find the disk. Either the screen stays black or the "missing disk" shows up. In any case the only solution is to manually power off the laptop. |
I am on Sierra 10.12.4 with late 2016 Macbook Pro without touchbar. It seems like my computer is still not sleeping and waking properly. Here are my settings:
Here is when things go wrong on my machine. I close the lid. After 1 minute, I open the lid, it prompts me for filevault key. IF I DO NOT ENTER IT AND CLOSE THE LID AGAIN, THE COMPUTER SHUTSDOWN WHEN I OPEN THE LID ONE MINUTE LATER. In my
I also see a sleep failure here. I think apple's |
Aloha, |
@skynw : I never managed to solve this issue. Only thing I could do was to go back to standard settings, which means not hibernating the laptop but just using the standard sleep. |
@kun-zhou I am seeing the exact same issue, including the same sleep failure log and how my Mac fails to re-awake after opening up the lid a second time. I am on Sierra 10.12.5 with Mid-2013 MacBook Air. |
PMSET behavior is very annoying. "UserAgent" preventing my Mac from sleeping. Even web apps running on Electron are having this behavior. Would not it be so simple to overwrite these things Apple?
|
I suppose that’s where Linux excels when you want to hack things around, I am so done adjusting these setting…. But macOS and its huge trackpad is just so intuitive comparing to any Desktop Environment on Linux or PC trackpad and I am willing to sacrifice security for convenience.Just make sure keep your laptop with you most of the time.
|
The other day after running |
If you have an OWC Aura SSD, there's a firmware update available that causes the drive to be recognized as an internal hard drive, making it possible to wake from hibernation. You can find information here: https://eshop.macsales.com/Service/Knowledgebase/Article/10/730/Aura-SSDs-Firmware-Update |
The instructions explicitly say to turn off Mojave, 10.14.3, MBP with touchbar. |
I'm wondering if anyone has tried the combination of OSX Login via Yubikey (https://www.yubico.com/why-yubico/for-individuals/computer-login/mac-os-login/) with the
pmset -a destroyfvkeyonstandby 1
system configuration enabled to destroy the file vault key.I have both of these set on a machine, and when I put my computer to sleep, upon waking it later I often find that the system has turned itself entirely.
I suspect that this is because of a negative interaction between these two configurations -- that removing my YubiKey during the sleep process is depriving the system of something it wants in order to stay on while the FileVault key is no longer accessible.
Similar experiences or suggestions on how to troubleshoot this are welcome.
The text was updated successfully, but these errors were encountered: