Skip to content

Fix CPU temperature sensor path detection and parsing - #208

Open
Surojit890 wants to merge 1 commit into
PXDiv:mainfrom
Surojit890:fix-coretemp-detection
Open

Fix CPU temperature sensor path detection and parsing#208
Surojit890 wants to merge 1 commit into
PXDiv:mainfrom
Surojit890:fix-coretemp-detection

Conversation

@Surojit890

@Surojit890 Surojit890 commented Jun 21, 2026

Copy link
Copy Markdown

Pull Request Description

Summary

This PR fixes CPU temperature detection by improving how hardware monitor sensors are discovered and parsed across Intel and AMD systems.

What Changed

  • Reworked CPU temperature lookup to prefer valid package-level sensor paths from hwmon.
  • Added safer temperature parsing with better fallbacks.
  • Improved lm-sensors regex parsing to support more output formats.
  • Refactored temp reading into helper methods for cleaner logic and easier maintenance.
  • Fixed hwmon scanning flow so it does not stop early when one candidate path is invalid.

Why

Some systems were reporting incorrect CPU temperature values or failing to detect temperature because sensor path selection was too rigid and could exit too early.

Validation

  • dotnet restore succeeded
  • dotnet build -c Release succeeded
  • dotnet publish -c Release -r linux-x64 --self-contained true succeeded

Impact

  • Better CPU temperature reliability across different Linux hardware/sensor setups.
  • No breaking API or UI changes.

Issue

Fixes #207

@PXDiv

PXDiv commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Thank you for the PR!
Will be adding to the next release after more testing from the community.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CPU temperature on PHN16-71 reads acer temp instead of coretemp Package id 0

2 participants