From 598327240d2e029884945c3f6efe0e49f0d20f14 Mon Sep 17 00:00:00 2001 From: astejko <89612834+astejko@users.noreply.github.com> Date: Sat, 25 Sep 2021 08:38:24 -0400 Subject: [PATCH] Add Thermald Conf FIle for AMD Surface Laptop 4 (#572) Merge pull-request #572. A new thermald configuration file for the AMD version of the Surface Laptop 4. It includes the ability to turn the CPU's Turbo Boost on and off as a cooling measure. --- contrib/thermald/surface_laptop_4a/README.md | 42 ++++++++++++++++ .../surface_laptop_4a/thermal-conf.xml | 50 +++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 contrib/thermald/surface_laptop_4a/README.md create mode 100644 contrib/thermald/surface_laptop_4a/thermal-conf.xml diff --git a/contrib/thermald/surface_laptop_4a/README.md b/contrib/thermald/surface_laptop_4a/README.md new file mode 100644 index 000000000..7fc9e9965 --- /dev/null +++ b/contrib/thermald/surface_laptop_4a/README.md @@ -0,0 +1,42 @@ +# Example thermal-conf.xml File + +A thermald configuration file tested on a Surface Laptop 4 (AMD) device. This file is adapted from the surface_laptop_1 configuration file in order to include control over CPU Turbo Boost. + +## File Description + +A new sensor (CPU_TEMP) is defined as the die temperature of the k10temp sensor, which can be found in the following directory: +``` +/sys/class/hwmon/hwmon1/ +``` +The trip point is set to 65° C, and can be freely adjusted to maintain a desired temperature. The first cooling device that is activated is the Processor cooling device which can be found the thermal directory: +``` +/sys/class/thermal/ +``` + +The second cooling device is set to turn off CPU Turbo Boost when the trip point is reached.The status of boost can be queried with the following command: +``` +cat /sys/devices/system/cpu/cpufreq/boost +``` + + +## Installation + +Deactivate thermald with the following command: + +``` +sudo systemctl stop thermald.service +``` + +Place thermal-conf.xml into the following directory: + +``` +\etc\thermald\ +``` +Restart thermald: + +``` +sudo systemctl start thermald.service +``` + +If it doesn't run, then you may need to remove the --adaptive flag in thermald.service + diff --git a/contrib/thermald/surface_laptop_4a/thermal-conf.xml b/contrib/thermald/surface_laptop_4a/thermal-conf.xml new file mode 100644 index 000000000..13c160877 --- /dev/null +++ b/contrib/thermald/surface_laptop_4a/thermal-conf.xml @@ -0,0 +1,50 @@ + + + + Override + * + QUIET + + + CPU_TEMP + /sys/class/hwmon/hwmon1/temp2_input + 0 + + + + + cpu + + + CPU_TEMP + 65000 + passive + SEQUENTIAL + + 1 + Processor + 100 + 15 + + + 2 + turbo + 50 + 60 + 0 + + + + + + + + turbo + /sys/devices/system/cpu/cpufreq/boost + 1 + 0 + 60000 + + + +