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

SunkenHero CPU fan speed display patch #431

Merged
merged 2 commits into from
Sep 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions auto_cpufreq/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
warnings.filterwarnings("ignore")

# ToDo:
# - re-enable CPU fan speed display and make more generic and not only for thinkpad
# - replace get system/CPU load from: psutil.getloadavg() | available in 5.6.2)

SCRIPTS_DIR = Path("/usr/local/share/auto-cpufreq/scripts/")
Expand Down Expand Up @@ -1146,9 +1145,10 @@ def sysinfo():
global avg_all_core_temp
avg_all_core_temp = float(avg_cores_temp / online_cpu_count)

# print current fan speed | temporarily commented
# current_fans = psutil.sensors_fans()['thinkpad'][0].current
# print("\nCPU fan speed:", current_fans, "RPM")
# print current fan speed
current_fans = list(psutil.sensors_fans())
for current_fan in current_fans:
print("\nCPU fan speed:", psutil.sensors_fans()[current_fan][0].current, "RPM")


def no_stats_msg():
Expand Down