Disable setting EPP if HWP is active and governor is set to "performance" (#138) (#147)

This fixes #138. Thanks to @likeadoc for pointing out the reason for this behavior.
https://github.com/AdnanHodzic/auto-cpufreq/issues/138#issuecomment-753672590
This commit is contained in:
Gianmarco Rengucci 2021-01-17 10:16:31 +01:00 committed by GitHub
parent 070103dc0d
commit 19886a4d04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -459,7 +459,7 @@ def set_performance():
print(f"Setting to use: \"{get_avail_performance()}\" governor")
run(f"cpufreqctl --governor --set={get_avail_performance()}", shell=True)
if os.path.exists("/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference"):
if Path("/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference").exists() and Path("/sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost").exists() == False:
run("cpufreqctl --epp --set=balance_performance", shell=True)
print("Setting to use: \"balance_performance\" EPP")