auto-cpufreq/auto_cpufreq
Anshu Gahire f1c1dc6b10
Fix spam error message when setting energy_performance_preference (#680)
* Fix spam error message when setting energy_performance_preference

The 'intel_pstate' driver does not allow the EPP to be set to anything
but 'performance' when the scaling governor is set to 'performance',
previously auto-cpufreq when the scaling-governor was set to
'performance' tried to set the EPP to 'balance-performance'
which caused a spam of write error messages in journalctl in system
with 'intel_pstate' drivers.
This is an intended behavior, since according to the [kernel documentation](https://docs.kernel.org/admin-guide/pm/intel_pstate.html#hwp-performance)
when HWP is enabled[(which is enabled by default during boot with supported processors)](https://docs.kernel.org/admin-guide/pm/intel_pstate.html#active-mode-with-hwp)
and scaling governor is set to performance the processor’s internal
P-state selection logic is expected to focus entirely on performance.
And this will override the EPP setting and reject any value different from 0 (“performance”).
This commit just changes the 'balance-performance' EPP preference in
set_performance() to 'performance'. Which fixes the spam issue.

* Only applies the spam error message fix for intel_pstate drivers

* Comparing the content of the file

intel_pstate/staus to make sure the condition only applies when "active"

* Override custom config EPP to "performance" for intel_pstate driver
2024-05-06 13:58:38 +02:00
..
battery_scripts Rework config and reload config on file change/creation/deletion (#663) 2024-04-30 08:35:53 +02:00
bin Rework config and reload config on file change/creation/deletion (#663) 2024-04-30 08:35:53 +02:00
gui Fix SyntaxWarning in objects.py (#651) 2024-02-23 17:06:40 -06:00
utils Rework config and reload config on file change/creation/deletion (#663) 2024-04-30 08:35:53 +02:00
__init__.py Improved Python file structure (rename source > auto_cpufreq) #153 2021-01-21 07:55:23 +01:00
core.py Fix spam error message when setting energy_performance_preference (#680) 2024-05-06 13:58:38 +02:00
power_helper.py Add Snap package deprecation notice 2023-09-16 12:29:53 +02:00
tlp_stat_parser.py Reformatted codebase (#325) 2021-12-22 08:28:08 +01:00