mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-26 23:24:17 +02:00
set turbo boost off in performance if load/cpu usage is low
This commit is contained in:
parent
1218ffd8cb
commit
cea1530ecf
@ -208,9 +208,21 @@ def set_performance():
|
|||||||
print("\nTotal CPU usage:", cpuload, "%")
|
print("\nTotal CPU usage:", cpuload, "%")
|
||||||
print("Total system load:", load1m, "\n")
|
print("Total system load:", load1m, "\n")
|
||||||
|
|
||||||
print("Setting turbo boost: on")
|
# conditions for setting turbo in performance
|
||||||
s.run("echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo", shell=True)
|
if load1m > 1:
|
||||||
footer(79)
|
print("High load, setting turbo boost: on")
|
||||||
|
s.run("echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo", shell=True)
|
||||||
|
footer(79)
|
||||||
|
elif cpuload > 20:
|
||||||
|
print("High CPU load, setting turbo boost: on")
|
||||||
|
s.run("echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo", shell=True)
|
||||||
|
#print("\n" + "-" * 60 + "\n")
|
||||||
|
footer(79)
|
||||||
|
else:
|
||||||
|
print("Load optimal, setting turbo boost: off")
|
||||||
|
s.run("echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo", shell=True)
|
||||||
|
#print("\n" + "-" * 60 + "\n")
|
||||||
|
footer(79)
|
||||||
|
|
||||||
# make turbo suggestions in performance
|
# make turbo suggestions in performance
|
||||||
def mon_performance():
|
def mon_performance():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user