From 828db0ef31d13bc299f143472b2e60a57129eb5b Mon Sep 17 00:00:00 2001 From: FosRexx Date: Sat, 20 Apr 2024 21:28:48 +0545 Subject: [PATCH] Only applies the spam error message fix for intel_pstate drivers --- auto_cpufreq/core.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py index a7fdd1b7..a0ad8743 100755 --- a/auto_cpufreq/core.py +++ b/auto_cpufreq/core.py @@ -942,8 +942,12 @@ def set_performance(): run(f"cpufreqctl.auto-cpufreq --epp --set={epp}", shell=True) print(f'Setting to use: "{epp}" EPP') else: - run("cpufreqctl.auto-cpufreq --epp --set=performance", shell=True) - print('Setting to use: "performance" EPP') + if Path("/sys/devices/system/cpu/intel_pstate/status").exists() is True: + run("cpufreqctl.auto-cpufreq --epp --set=performance", shell=True) + print('Setting to use: "performance" EPP') + else: + run("cpufreqctl.auto-cpufreq --epp --set=balance_performance", shell=True) + print('Setting to use: "balance_performance" EPP') # set frequencies set_frequencies()