What happens
The Metrics tab's Temperature gauge reports the hottest temp1_input across every chip sensors -j returns. On boards where a non-CPU sensor idles hot (very common for Intel PCH virtual sensors), the gauge shows a number that has nothing to do with how hot the machine actually is.
Reported by @maniqui in #3336 on an Asus Chromebox CN62 running 0.4.0-beta: the gauge read ~88 °C idle and ~115 °C during IBD, which read as an emergency and cost him a round of thermal troubleshooting. Actual CPU at the same moment:
coretemp-isa-0000
Package id 0: +36.0°C (high = +105.0°C, crit = +105.0°C)
Core 0: +36.0°C
Core 1: +35.0°C
acpitz-acpi-0
temp1: +37.0°C
pch_wildcat_point-virtual-0
temp1: +88.5°C <-- this is what the gauge shows
So the box was at 36 °C and StartOS said 88 °C.
Why
get_temp() in shared-libs/crates/start-core/src/system/mod.rs (~L916) flattens every chip from sensors -j, keeps each chip's temp1_input, and reduces with f64::max:
.filter_map(|(k, v)| {
// we have seen so far that `temp1` is always a composite reading of some sort, so we should just use that for each chip
if k.trim() == "temp1_input" { v.as_f64() } else { None }
})
.reduce(f64::max)
The temp1 heuristic is about picking the composite reading within a chip, which is fine. The problem is the max across chips: any single hot-running or miscalibrated sensor wins and becomes "the" temperature. pch_wildcat_point is a well-known offender (Intel PCH sensors idle hot and are not calibrated to be comparable to core temps).
That value flows straight through MetricsGeneral.temperature to the single gauge headed Temperature in projects/start-os/web/ui/src/app/routes/portal/routes/metrics/metrics.component.ts (L27-28), so the user sees one unlabeled number with no indication of which sensor produced it.
Related history: #1946 and #2207, which is where the move to lm-sensors came from.
The actual design question
Worth settling before anyone writes a patch, because it decides the fix:
Is that gauge meant to be "CPU temperature" or "hottest component in the box"?
- If CPU — prefer a known CPU chip and only fall back to the current max-across-all when none is recognized. Something like
coretemp-* (Intel), k10temp-* / zenpower-* (AMD), cpu_thermal-* (Pi), else today's behavior. This is conservative: it only changes what's displayed when a recognized CPU sensor exists, and in that case the CPU reading is unambiguously the better answer. VMs still report N/A.
- If hottest component — then the code is working as designed and the bug is presentational: the gauge needs to name the sensor it's showing, and probably needs per-chip thresholds, since 88 °C on a PCH and 88 °C on a CPU package mean completely different things.
I lean toward the first, but this is a product call rather than an obvious defect, so flagging rather than sending a patch. Happy to write whichever one you want.
Scope note
Filed out of #3336, which was closed as a hardware issue. The NVMe/read-only half of that report is genuinely hardware; this temperature item is separate, is on the StartOS side, and would otherwise be lost in a closed thread.
What happens
The Metrics tab's Temperature gauge reports the hottest
temp1_inputacross every chipsensors -jreturns. On boards where a non-CPU sensor idles hot (very common for Intel PCH virtual sensors), the gauge shows a number that has nothing to do with how hot the machine actually is.Reported by @maniqui in #3336 on an Asus Chromebox CN62 running 0.4.0-beta: the gauge read ~88 °C idle and ~115 °C during IBD, which read as an emergency and cost him a round of thermal troubleshooting. Actual CPU at the same moment:
So the box was at 36 °C and StartOS said 88 °C.
Why
get_temp()inshared-libs/crates/start-core/src/system/mod.rs(~L916) flattens every chip fromsensors -j, keeps each chip'stemp1_input, and reduces withf64::max:The
temp1heuristic is about picking the composite reading within a chip, which is fine. The problem is themaxacross chips: any single hot-running or miscalibrated sensor wins and becomes "the" temperature.pch_wildcat_pointis a well-known offender (Intel PCH sensors idle hot and are not calibrated to be comparable to core temps).That value flows straight through
MetricsGeneral.temperatureto the single gauge headedTemperatureinprojects/start-os/web/ui/src/app/routes/portal/routes/metrics/metrics.component.ts(L27-28), so the user sees one unlabeled number with no indication of which sensor produced it.Related history: #1946 and #2207, which is where the move to lm-sensors came from.
The actual design question
Worth settling before anyone writes a patch, because it decides the fix:
Is that gauge meant to be "CPU temperature" or "hottest component in the box"?
coretemp-*(Intel),k10temp-*/zenpower-*(AMD),cpu_thermal-*(Pi), else today's behavior. This is conservative: it only changes what's displayed when a recognized CPU sensor exists, and in that case the CPU reading is unambiguously the better answer. VMs still report N/A.I lean toward the first, but this is a product call rather than an obvious defect, so flagging rather than sending a patch. Happy to write whichever one you want.
Scope note
Filed out of #3336, which was closed as a hardware issue. The NVMe/read-only half of that report is genuinely hardware; this temperature item is separate, is on the StartOS side, and would otherwise be lost in a closed thread.