From 2525d437fea723dddee8978db3aa3f2151ec8565 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 10 May 2023 11:35:39 +0100 Subject: [PATCH] system-info: Change AMD temp sensor source Use `k10temp-pci-00c3` sensor output instead of `asus_wmi_sensors-virtual-0` to read the CPU temperature because on the ASUS Prime x470 Pro the latter is buggy and can result in the UEFI fan control either slamming at 100% or not registering a temperature change at full load. --- system-info/system-info-Linux.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system-info/system-info-Linux.sh b/system-info/system-info-Linux.sh index 25f18a4..f696302 100755 --- a/system-info/system-info-Linux.sh +++ b/system-info/system-info-Linux.sh @@ -10,15 +10,15 @@ fi if sensors 'coretemp-isa-0000' &> /dev/null; then function get_cpu_temp() { - sensors coretemp-isa-0000 | awk 'NR == 3 { print substr($4, 2) }' + sensors 'coretemp-isa-0000' | awk 'NR == 3 { print substr($4, 2) }' } -elif sensors 'asus_wmi_sensors-virtual-0' &> /dev/null; then +elif sensors 'k10temp-pci-00c3' &> /dev/null; then function get_cpu_temp { - sensors asus_wmi_sensors-virtual-0 | grep 'CPU Temperature' | awk '{ print $3 }' + sensors 'k10temp-pci-00c3' | grep 'Tctl:' | awk '{ print $2 }' } else function get_cpu_temp { - echo 'cpu temp not available' + echo 'N/A°C' } fi