Auto hibernation: make sure auto-hibernation feature only happens when hibernatemode is set to 3. (Never when mode 0 or 25). #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm a bit experimenting with
hbfx-ahbm | Number | 1
on my desktop build. Laptops have hibernatemode 3 by default.Desktops have hibernatemode 0, which cause a S3 Sleep/Wake cycle. However I found that with standby / autopoweroff 1, auto-hibernation triggers. This also happens when I want to force hibernation using mode 25...
Since hbfx-ahbm's should be used when hibernatemode 3 (https://applelife.ru/posts/670121/), I've fixed all this behaviors by adding a simple check in the auto-hibernation logic.
Here are all the logs. (latest DEBUG build, and with the fix applied)
pmset -g
sudo dmesg > dmesg_hib0_standby1.txt
dmesg_hib0_standby1.txt
log show --style syslog --last boot --predicate 'subsystem == "powerd" && category == "sleepWake" && (composedMessage CONTAINS " state due to" OR composedMessage CONTAINS " from ")' > log_SleepWake_hib0_standby1.txt
log_SleepWake_hib0_standby1.txt
dmesg_hib0_autopoweroff1.txt
log_SleepWake_hib0_autopoweroff1.txt
dmesg_hib25_standby1.txt
log_SleepWake_hib25_standby1.txt
Logs with the fix
dmesg_hib25_standby1_fix.txt
log_SleepWake_hib25_standby1_fix.txt
dmesg_hib0_standby1_fix.txt
log_SleepWake_hib0_standby1_fix.txt
dmesg_hib0_autopoweroff1_fix.txt
log_SleepWake_hib0_autopoweroff1_fix.txt