Skip to content

Commit

Permalink
cpu temp: don't use nct if no TSI0_TEMP
Browse files Browse the repository at this point in the history
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
  • Loading branch information
flightlessmango committed Feb 2, 2024
1 parent 62fee60 commit fc54f48
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fc54f48

Please sign in to comment.