From 93f1c6f96137a7ce6a4411778bc55c6b6a7caca6 Mon Sep 17 00:00:00 2001 From: tengel Date: Wed, 20 Mar 2024 11:55:03 -0500 Subject: [PATCH] Add 'Radeon Temperature' --- Radeon-Temperature.md | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Radeon-Temperature.md diff --git a/Radeon-Temperature.md b/Radeon-Temperature.md new file mode 100644 index 0000000..fa266ad --- /dev/null +++ b/Radeon-Temperature.md @@ -0,0 +1,48 @@ +## Overview + +When using a laptop with ATI/AMD GPU as a mini-server, the defaults for the `radeon` kernel module are set to a balanced mode for typical use. However, this causes the GPU to produce slighly more heat, which then triggers the SMBIOS fan controls to cool it. + +Install the `lm-sensors` package (depending on Linux distro, the package has different names - `lm_sensors`, `sensors`, etc.) and use the `sensors` command to view the temperatures and fans when implementing the below configurations. + + +## Configuration + +Reboot after adding the below. + +These settings ensure DPM/ASPM (power management) are enabled when the radeon kernel module loads, and disables the TV/Audio features we don't need. + +**/etc/modprobe.d/radeon.conf** +``` +options radeon dpm=1 aspm=1 tv=0 audio=0 +``` + +These rules activate the DPM "battery" power state and sets the Performance mode to "low" when the kernel module loads and detects the hardware. + +**/etc/udev/rules.d/30-radeon-pm.rules** +``` +SUBSYSTEM=="drm", DRIVERS=="radeon", ATTR{device/power_dpm_state}="battery" +SUBSYSTEM=="drm", DRIVERS=="radeon", ATTR{device/power_dpm_force_performance_level}="low" +``` + +## Status Check + +Helper script, nothing fancy. + +**radcheck.sh** +``` +#!/usr/bin/env bash + +_MOD="radeon" +_HW="/sys/class/drm/card0" + +echo -e "\nModule: ${_MOD}" +echo -e "Hardware: ${_HW}\n" +echo -n "DPM enabled: "; cat /sys/module/${_MOD}/parameters/dpm +echo -n "ASPM enabled: "; cat /sys/module/${_MOD}/parameters/aspm +echo -n "TV enabled: "; cat /sys/module/${_MOD}/parameters/tv +echo -n "Audio enabled: "; cat /sys/module/${_MOD}/parameters/audio +echo -n "DPM perfstate: "; cat ${_HW}/device/power_dpm_state +echo -n "DPM perfmode: "; cat ${_HW}/device/power_dpm_force_performance_level +echo +sensors | egrep "(CPU|GPU|Fan):" +```