Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EPB (Energy Performance Bias) settings support #771

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

snyypi
Copy link
Contributor

@snyypi snyypi commented Sep 8, 2024

This PR adds support for the energy_perf_bias setting, giving users more control over how their Intel CPU (intel_pstate driver) balances performance and power efficiency

What's Changed:

  • Introduced a new energy_perf_bias option, which can be set as a number (0-15) or using predefined strings like "performance", "balance_performance", "default", "balance_power" and "power" (made their names the same as EPP's)
  • Integrated the energy_perf_bias setting into the existing power management logic, dynamically adjusting it based on the selected profile or user preferences
  • Updated the documentation to explain how to configure and use the new energy_perf_bias setting

Closes: #522

Looking forward to any feedback or suggestions!

@AdnanHodzic
Copy link
Owner

LGTM & this is great stuff! Making my experience much smoother.

It would be great if it could be enabled by default (automatically) without having to explicitly specify it as part of config file.

Setting i.e energy_perf_bias = balance_power when on powersavings governor & energy_perf_bias = balance_performance when on performance?

Either way, thank you for your contribution, you will be credited for your work as part of future release.

@AdnanHodzic AdnanHodzic merged commit 08d95b6 into AdnanHodzic:master Sep 9, 2024
2 checks passed
@snyypi
Copy link
Contributor Author

snyypi commented Sep 10, 2024

@AdnanHodzic Thank you for the amazing project! Regarding the configuration, if the parameter is missing in the configuration file, balance_performance (on charge) and balance_power (on battery) will be used if the hardware supports it. My mistake, I forgot to specify this in both the PR description and the documentation

@AdnanHodzic
Copy link
Owner

Regarding the configuration, if the parameter is missing in the configuration file, balance_performance (on charge) and balance_power (on battery) will be used if the hardware supports it.

Yes I saw that in lines like

    if Path("/sys/devices/system/cpu/intel_pstate").exists() is False:
        print('Not setting EPB (not supported by system)')
        return
    epb = "balance_performance" if profile == "charger" else "balance_power"

But I misinterpreted it that it would be used only as part of config file if you didn't explicitly define other settings.

My mistake, I forgot to specify this in both the PR description and the documentation

Could you please create a PR to update ReadMe with this info, just to avoid any confusion? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make use of energy_perf_bias?
2 participants