-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
gh-667: Modify message when using amd-pstate-epp #674
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -267,13 +267,23 @@ def turbo(value: bool = None): | |
""" | ||
p_state = Path("/sys/devices/system/cpu/intel_pstate/no_turbo") | ||
cpufreq = Path("/sys/devices/system/cpu/cpufreq/boost") | ||
amd_pstate = Path("/sys/devices/system/cpu/amd_pstate/status") | ||
scaling_driver = Path("/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver") | ||
|
||
if p_state.exists(): | ||
inverse = True | ||
f = p_state | ||
elif cpufreq.exists(): | ||
f = cpufreq | ||
inverse = False | ||
elif amd_pstate.exists() and scaling_driver.exists(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove |
||
amd_value = amd_pstate.read_text().strip() | ||
scaling_driver_value = scaling_driver.read_text().strip() | ||
if amd_value == "active" and scaling_driver_value == "amd-pstate-epp": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also this isn't really important but I think this entire if statement doesn't actually do anything since the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, by the way, what for amd_pstate == guided or amd_pstate == passive? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Self-reply for guided mode: #602 (comment) |
||
print("CPU turbo is controlled by amd-pstate-epp driver") | ||
else: | ||
print("Warning: CPU turbo is not available") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure if more status can exist at this moment which can set the turbo. If "yes," we should make it to set the turbo if the user wants. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These can be removed since this else statement will never be reached. the |
||
return False | ||
else: | ||
print("Warning: CPU turbo is not available") | ||
return False | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need to check
scaling_driver
. Justamd_pstate/status
is enough