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

Fix dynamic boosting being incorrectly diagnosed #631

Merged
merged 3 commits into from
Jan 24, 2024
Merged

Fix dynamic boosting being incorrectly diagnosed #631

merged 3 commits into from
Jan 24, 2024

Conversation

PhoenixCausesOof
Copy link
Contributor

Previously, auto-cpufreq would only check if the intel_pstate/hwp_dynamic_boost file existed to determine if EPP was supported. This didn't account for the fact that the file's contents could be 0, so it incorrectly assumed dynamic boosting was enabled.

@AdnanHodzic
Copy link
Owner

Looks like too much was removed in terms of energy_performance_preference. Because now when I do sudo auto-cpufreq --install I end up with following error:

sudo auto-cpufreq --install
Traceback (most recent call last):
  File "/opt/auto-cpufreq/venv/bin/auto-cpufreq", line 5, in <module>
    from auto_cpufreq.bin.auto_cpufreq import main
  File "/opt/auto-cpufreq/venv/lib/python3.11/site-packages/auto_cpufreq/bin/auto_cpufreq.py", line 14, in <module>
    from auto_cpufreq.core import *
  File "/opt/auto-cpufreq/venv/lib/python3.11/site-packages/auto_cpufreq/core.py", line 904
    if Path("/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference").exists() is false:
IndentationError: unexpected indent

@PhoenixCausesOof
Copy link
Contributor Author

There we go. It was my first time programming Python, ever, so forgive for that.

Anyway, tested on my machine as well (didn't know that was possible, was a GUI user) and it works now.

By the way, the two issues I faced were:

  1. Boolean literals are True and False, not true and false.
  2. Indentation (more specifically, BECAUSE OF A SINGLE WHITESPACE CHARACTER, my code refused to compile).

@AdnanHodzic
Copy link
Owner

LGTM! It's to good to have EPP showing up again on Intel hardware, thank you for your contribution, you will be credited for your work as part of future release.

@AdnanHodzic
Copy link
Owner

@PhoenixCausesOof are you able to see EPP on intel in --monitor related to my comment in #641

shadeyg56 pushed a commit to shadeyg56/auto-cpufreq that referenced this pull request Feb 12, 2024
* Fix dynamic boosting being incorrectly diagnosed

* Fix indentation

* Fix bool literal
rootCircle pushed a commit to rootCircle/auto-cpufreq that referenced this pull request Feb 16, 2024
* Fix dynamic boosting being incorrectly diagnosed

* Fix indentation

* Fix bool literal
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.

2 participants