From 34ebd04df0fd605c6c741f834f7b2d9205999f30 Mon Sep 17 00:00:00 2001 From: Abhishek Girish Date: Mon, 15 Jul 2024 23:05:47 +0530 Subject: [PATCH] Fix issue where epp cannot be set in `powersave` governor (#738) * Fix issue where epp cannot be set in `powersave` governor * Fix issue where epp cannot be set in `powersave` governor #2 --- auto_cpufreq/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py index ae43b73..106ad9d 100755 --- a/auto_cpufreq/core.py +++ b/auto_cpufreq/core.py @@ -928,7 +928,7 @@ def set_performance(): if conf.has_option("charger", "energy_performance_preference"): epp = conf["charger"]["energy_performance_preference"] - if Path(intel_pstate_status_path).exists() and open(intel_pstate_status_path, 'r').read().strip() == "active" and epp != "performance": + if Path(intel_pstate_status_path).exists() and open(intel_pstate_status_path, 'r').read().strip() == "active" and epp != "performance" and gov == "performance": print(f'Warning "{epp}" EPP cannot be used in performance governor') print('Overriding EPP to "performance"') epp = "performance" @@ -948,7 +948,7 @@ def set_performance(): if conf.has_option("charger", "energy_performance_preference"): epp = conf["charger"]["energy_performance_preference"] - if Path(amd_pstate_status_path).exists() and open(amd_pstate_status_path, 'r').read().strip() == "active" and epp != "performance": + if Path(amd_pstate_status_path).exists() and open(amd_pstate_status_path, 'r').read().strip() == "active" and epp != "performance" and gov == "performance": print(f'Warning "{epp} EPP cannot be used in performance governor') print('Overriding EPP to "performance"') epp = "performance"