aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2026-01-05 04:53:51 +0000
committerCy Schubert <cy@FreeBSD.org>2026-01-22 04:36:33 +0000
commitad9932995cf8f93143ff033712016d95b5cb7a50 (patch)
treebcf3d60b0ba099f6563d6f97be5353f3c3bd01d0
parenteacc501eff52db16b7b784c89a3a4a03c9a3ef34 (diff)
hwpstate: Add CPPC enable tunable
The Framework 13 runs very hot the maximum frequency is possible. By disabling CPPC (reverting to Cool`n'Quiet 2.0) we can use powerd to limit the CPU frequency to 2200, thereby reducing the CPU temperature. Some systems may run slower with CPPC enabled. See PR/292615 for that bug. Those experiencing either of these issues may add the following to their loader.conf or device.hints to disable CPPC: machdep.hwpstate_amd_cppc_enable="0" PR: 292615 Reviewed by: lwhsu, olce Differential revision: https://reviews.freebsd.org/D54803
-rw-r--r--sys/x86/cpufreq/hwpstate_amd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/x86/cpufreq/hwpstate_amd.c b/sys/x86/cpufreq/hwpstate_amd.c
index 5676d8ce7dae..34838753e221 100644
--- a/sys/x86/cpufreq/hwpstate_amd.c
+++ b/sys/x86/cpufreq/hwpstate_amd.c
@@ -179,6 +179,11 @@ SYSCTL_BOOL(_machdep, OID_AUTO, hwpstate_pkg_ctrl, CTLFLAG_RDTUN,
&hwpstate_pkg_ctrl_enable, 0,
"Set 1 (default) to enable package-level control, 0 to disable");
+static bool hwpstate_amd_cppc_enable = true;
+SYSCTL_BOOL(_machdep, OID_AUTO, hwpstate_amd_cppc_enable, CTLFLAG_RDTUN,
+ &hwpstate_amd_cppc_enable, 0,
+ "Set 1 (default) to enable AMD CPPC, 0 to disable");
+
static device_method_t hwpstate_methods[] = {
/* Device interface */
DEVMETHOD(device_identify, hwpstate_identify),
@@ -667,7 +672,8 @@ hwpstate_probe(device_t dev)
sc = device_get_softc(dev);
- if (amd_extended_feature_extensions & AMDFEID_CPPC) {
+ if (hwpstate_amd_cppc_enable &&
+ (amd_extended_feature_extensions & AMDFEID_CPPC)) {
sc->flags |= PSTATE_CPPC;
device_set_desc(dev,
"AMD Collaborative Processor Performance Control (CPPC)");