From fc54f48257e011a629487e2f4b965c90355d9c9d Mon Sep 17 00:00:00 2001 From: flightlessmango Date: Fri, 2 Feb 2024 11:11:30 +0100 Subject: [PATCH] cpu temp: don't use nct if no TSI0_TEMP If nct doesn't have TSI0_TEMP then it won't have any cpu temp readings. In that case we want to make sure we don't use nct module. This happens on intel platforms and as such we should be using coretemp instead --- src/cpu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cpu.cpp b/src/cpu.cpp index 30dbc750..6d8a1a98 100644 --- a/src/cpu.cpp +++ b/src/cpu.cpp @@ -520,8 +520,10 @@ bool CPUStats::GetCpuFile() { find_input(path, "temp", input, "temp1"); break; } else if (starts_with(name, "nct")) { - find_input(path, "temp", input, "TSI0_TEMP"); - break; + // Only break if nct module has TSI0_TEMP node + if (find_input(path, "temp", input, "TSI0_TEMP")) + break; + } else if (name == "asusec") { find_input(path, "temp", input, "CPU"); break;