Skip to content

fix linux hwmon high/crit of -273150 mC (0 K) (#2959) - #2960

Open
icedream wants to merge 1 commit into
giampaolo:masterfrom
icedream:fix/sensor-sentinel-thresholds
Open

fix linux hwmon high/crit of -273150 mC (0 K) (#2959)#2960
icedream wants to merge 1 commit into
giampaolo:masterfrom
icedream:fix/sensor-sentinel-thresholds

Conversation

@icedream

@icedream icedream commented Aug 6, 2026

Copy link
Copy Markdown

Summary

Description

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.

@github-actions github-actions Bot added bug type linux platform : Linux specific labels Aug 6, 2026
@icedream
icedream marked this pull request as draft August 6, 2026 01:31
@icedream
icedream force-pushed the fix/sensor-sentinel-thresholds branch from fd4a751 to 0efd985 Compare August 6, 2026 01:36
@icedream
icedream marked this pull request as ready for review August 6, 2026 01:39
@icedream

icedream commented Aug 6, 2026

Copy link
Copy Markdown
Author

I've backported my patch to 7.2.2 to test it out on system level, patching the python-psutil Arch Linux package on my system with it.

Screenshot showing it working within s-tui, top uses psutil 7.2.2 unpatched, bottom uses psutil 7.2.2 + my changes backported:

image

Backport patch file:
0001-fix-sensor-sentinel-thresholds.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug type linux platform : Linux specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Linux] sensors_temperatures() treats placeholder thresholds as real alarm limits

1 participant