giampaolo / psutil

Cross-platform lib for process and system monitoring in Python
BSD 3-Clause "New" or "Revised" License
10.31k stars 1.39k forks source link

Bug 2439 fix for thermal zones #2440

Open siena-sam opened 2 months ago

siena-sam commented 2 months ago

Summary

Description

Store and clear values for the high and critical temperatures read from thermal_zone#/trip_point_#_temp files. Otherwise, values will be incorrectly divided by 1000 (to account for milidegrees) for each trip point after the first that is of type critical or high.

siena-sam commented 2 months ago

For confirmation, here are some screenshots of this fix verified on the ARM system we first noticed this on.

Here is the bug seen in 5.9.8 which is the version we are currently using: image

Here is the bug fixed when running commit 7f705e4b1db4f0b220f84a17a02669a1e3e02eac: image