Skip to content

Commit

Permalink
Re-calibrated performance/powersave triggers (fixed turbo always on o…
Browse files Browse the repository at this point in the history
…n powersave)
  • Loading branch information
AdnanHodzic committed Dec 6, 2020
1 parent 40f349b commit c8c8fab
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: auto-cpufreq
base: core20
version: '1.5.0'
version: '1.5.1'
summary: Automatic CPU speed & power optimizer for Linux
description: |
Automatic CPU speed & power optimizer for Linux based on active
Expand Down
66 changes: 33 additions & 33 deletions source/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,52 +338,52 @@ def set_powersave():
print("\nHigh CPU load")

# high cpu usage trigger
if cpuload > 35:
if cpuload >= 20:
print("setting turbo boost: on")
turbo(True)

# set turbo state based on average of all core temperatures
elif cpuload < 35 and avg_all_core_temp >= 70:
elif cpuload <= 20 and avg_all_core_temp >= 70:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("setting turbo boost: off")
turbo(False)
else:
print("setting turbo boost: on")
turbo(True)
print("setting turbo boost: off")
turbo(False)

elif load1m > powersave_load_threshold:
print("\nHigh system load")

# high cpu usage trigger
if cpuload > 35:
if cpuload >= 20:
print("setting turbo boost: on")
turbo(True)

# set turbo state based on average of all core temperatures
elif cpuload < 35 and avg_all_core_temp >= 65:
elif cpuload <= 20 and avg_all_core_temp >= 65:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("setting turbo boost: off")
turbo(False)
else:
print("setting turbo boost: on")
turbo(True)
print("setting turbo boost: off")
turbo(False)

else:
print("\nLoad optimal")

# high cpu usage trigger
if cpuload > 35:
if cpuload >= 20:
print("setting turbo boost: on")
turbo(True)

# set turbo state based on average of all core temperatures
elif cpuload < 35 and avg_all_core_temp >= 60:
elif cpuload <= 20 and avg_all_core_temp >= 60:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("setting turbo boost: off")
turbo(False)
else:
print("setting turbo boost: on")
turbo(True)
print("setting turbo boost: off")
turbo(False)

footer()

Expand All @@ -405,51 +405,51 @@ def mon_powersave():
print("\nHigh CPU load")

# high cpu usage trigger
if cpuload > 35:
if cpuload >= 20:
print("suggesting to set turbo boost: on")
get_turbo()

# set turbo state based on average of all core temperatures
elif cpuload < 35 and avg_all_core_temp >= 70:
elif cpuload <= 20 and avg_all_core_temp >= 70:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("suggesting to set turbo boost: off")
get_turbo()
else:
print("suggesting to set turbo boost: on")
print("suggesting to set turbo boost: off")
get_turbo()

elif load1m > powersave_load_threshold:
print("\nHigh system load")

# high cpu usage trigger
if cpuload > 35:
if cpuload >= 20:
print("suggesting to set turbo boost: on")
get_turbo()

# set turbo state based on average of all core temperatures
elif cpuload < 35 and avg_all_core_temp >= 65:
elif cpuload <= 20 and avg_all_core_temp >= 65:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("suggesting to set turbo boost: off")
get_turbo()
else:
print("suggesting to set turbo boost: on")
print("suggesting to set turbo boost: off")
get_turbo()

else:
print("\nLoad optimal")

# high cpu usage trigger
if cpuload > 35:
if cpuload >= 20:
print("suggesting to set turbo boost: on")
get_turbo()

# set turbo state based on average of all core temperatures
elif cpuload < 35 and avg_all_core_temp >= 60:
elif cpuload <= 20 and avg_all_core_temp >= 60:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("suggesting to set turbo boost: off")
get_turbo()
else:
print("suggesting to set turbo boost: on")
print("suggesting to set turbo boost: off")
get_turbo()

footer()
Expand Down Expand Up @@ -477,12 +477,12 @@ def set_performance():
print("\nHigh CPU load")

# high cpu usage trigger
if cpuload > 25:
if cpuload >= 20:
print("setting turbo boost: on")
turbo(True)

# set turbo state based on average of all core temperatures
elif cpuload < 25 and avg_all_core_temp >= 70:
elif cpuload <= 25 and avg_all_core_temp >= 70:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("setting turbo boost: off")
turbo(False)
Expand All @@ -494,12 +494,12 @@ def set_performance():
print("\nHigh system load")

# high cpu usage trigger
if cpuload > 25:
if cpuload >= 20:
print("setting turbo boost: on")
turbo(True)

# set turbo state based on average of all core temperatures
elif cpuload < 25 and avg_all_core_temp >= 65:
elif cpuload <= 25 and avg_all_core_temp >= 65:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("setting turbo boost: off")
turbo(False)
Expand All @@ -511,12 +511,12 @@ def set_performance():
print("\nLoad optimal")

# high cpu usage trigger
if cpuload > 25:
if cpuload >= 20:
print("setting turbo boost: on")
turbo(True)

# set turbo state based on average of all core temperatures
elif cpuload < 25 and avg_all_core_temp >= 60:
elif cpuload <= 25 and avg_all_core_temp >= 60:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("setting turbo boost: off")
turbo(False)
Expand Down Expand Up @@ -547,12 +547,12 @@ def mon_performance():
print("\nHigh CPU load")

# high cpu usage trigger
if cpuload > 25:
if cpuload >= 20:
print("suggesting to set turbo boost: on")
get_turbo()

# set turbo state based on average of all core temperatures
elif cpuload < 25 and avg_all_core_temp >= 70:
elif cpuload <= 25 and avg_all_core_temp >= 70:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("suggesting to set turbo boost: off")
get_turbo()
Expand All @@ -564,12 +564,12 @@ def mon_performance():
print("\nHigh system load")

# high cpu usage trigger
if cpuload > 25:
if cpuload >= 20:
print("suggesting to set turbo boost: on")
get_turbo()

# set turbo state based on average of all core temperatures
elif cpuload < 25 and avg_all_core_temp >= 65:
elif cpuload <= 25 and avg_all_core_temp >= 65:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("suggesting to set turbo boost: off")
get_turbo()
Expand All @@ -581,12 +581,12 @@ def mon_performance():
print("\nLoad optimal")

# high cpu usage trigger
if cpuload > 25:
if cpuload >= 20:
print("suggesting to set turbo boost: on")
get_turbo()

# set turbo state based on average of all core temperatures
elif cpuload < 25 and avg_all_core_temp >= 60:
elif cpuload <= 25 and avg_all_core_temp >= 60:
print("Optimal total CPU usage:", cpuload, "%, high average core temp:", avg_all_core_temp, "°C")
print("suggesting to set turbo boost: off")
get_turbo()
Expand Down

0 comments on commit c8c8fab

Please sign in to comment.