Skip to content

Commit 1a43fe4

Browse files
authored
Merge pull request #1 from AdnanHodzic/master
Fix issue where epp cannot be set in `powersave` governor (AdnanHodzic#738)
2 parents 947e69c + 34ebd04 commit 1a43fe4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

auto_cpufreq/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ def set_performance():
928928
if conf.has_option("charger", "energy_performance_preference"):
929929
epp = conf["charger"]["energy_performance_preference"]
930930

931-
if Path(intel_pstate_status_path).exists() and open(intel_pstate_status_path, 'r').read().strip() == "active" and epp != "performance":
931+
if Path(intel_pstate_status_path).exists() and open(intel_pstate_status_path, 'r').read().strip() == "active" and epp != "performance" and gov == "performance":
932932
print(f'Warning "{epp}" EPP cannot be used in performance governor')
933933
print('Overriding EPP to "performance"')
934934
epp = "performance"
@@ -948,7 +948,7 @@ def set_performance():
948948
if conf.has_option("charger", "energy_performance_preference"):
949949
epp = conf["charger"]["energy_performance_preference"]
950950

951-
if Path(amd_pstate_status_path).exists() and open(amd_pstate_status_path, 'r').read().strip() == "active" and epp != "performance":
951+
if Path(amd_pstate_status_path).exists() and open(amd_pstate_status_path, 'r').read().strip() == "active" and epp != "performance" and gov == "performance":
952952
print(f'Warning "{epp} EPP cannot be used in performance governor')
953953
print('Overriding EPP to "performance"')
954954
epp = "performance"

0 commit comments

Comments
 (0)