fix linux hwmon high/crit of -273150 mC (0 K) (#2959) - #2960
Open
icedream wants to merge 1 commit into
Open
Conversation
icedream
marked this pull request as draft
August 6, 2026 01:31
icedream
force-pushed
the
fix/sensor-sentinel-thresholds
branch
from
August 6, 2026 01:36
fd4a751 to
0efd985
Compare
icedream
marked this pull request as ready for review
August 6, 2026 01:39
Author
|
I've backported my patch to 7.2.2 to test it out on system level, patching the Screenshot showing it working within s-tui, top uses psutil 7.2.2 unpatched, bottom uses psutil 7.2.2 + my changes backported:
Backport patch file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
sensors_temperatures()treats placeholder thresholds as real alarm limits #2959Description
sensors_temperatures()returns -273.15 as the literal sensor value when a hwmon trip point has not been configured in the kernel. This is the sentinel value the core hwmon driver writes when a max/crit threshold is unset (-273150 mC = 0 K = absolute zero), not a real measured temperature.The fix detects raw values of -273150 mC in both the hwmon and thermal zone paths and replaces them with None, matching the behavior for other unavailable thresholds. Apps like s-tui currently show -273.15 in red as an alarm limit, even though no alarm is present.