Download raw body.
apmd: adapt to changes in hw.perfpolicy sysctl
hi,
i had noticed my laptop performing worse and finally found out that this is
related to the change of the hw.perfpolicy sysctl. i had apmd_flags=-A in my
rc.conf.local and on startup this calls setperfpolicy("auto"). this sets the
hw.perfpolicy sysctl to auto, which previously meant the current default of
high,auto but now means auto,auto resulting in slowdowns even when running
pluged-in. the patch below restores the old behaviour.
kind regards,
thomas
diff --git usr.sbin/apmd/apmd.c usr.sbin/apmd/apmd.c
index f29d5c9a081..8ddb2505b68 100644
--- usr.sbin/apmd/apmd.c
+++ usr.sbin/apmd/apmd.c
@@ -674,6 +674,8 @@ setperfpolicy(char *policy)
} else if (strcmp(policy, "high") == 0) {
policy = "manual";
new_perf = 100;
+ } else if (strcmp(policy, "auto") == 0) {
+ policy = "high,auto";
}
if (sysctl(hw_perfpol_mib, 2, NULL, NULL,
apmd: adapt to changes in hw.perfpolicy sysctl