cpu_temp: Add support for Zen processors

This adds support for Zen based processors(AMD family 17h) like the Ryzen series using the k10temp module.
This requires either having a patched kernel with the hwmon updates see - lkml.org/lkml/2017/9/6/684
Or kernel 4.15+ where the patch was merged.
This commit is contained in:
Kayant 2018-04-21 12:20:57 +01:00
parent 810605d75e
commit 5c58244897
No known key found for this signature in database
GPG Key ID: DC254D45575233FD
1 changed files with 1 additions and 1 deletions

View File

@ -1022,7 +1022,7 @@ get_cpu() {
# Select the right temperature file.
for temp_dir in /sys/class/hwmon/*; do
[[ "$(< "${temp_dir}/name")" =~ (coretemp|fam15h_power) ]] && \
[[ "$(< "${temp_dir}/name")" =~ (coretemp|fam15h_power|k10temp) ]] && \
{ temp_dir="${temp_dir}/temp1_input"; break; }
done