LACT
The wonderful https://github.com/ilya-zlobintsev/LACT provides a daemon and a UI that can:
- set various performance flags and values
- monitor GPU activity
- save and apply profiles
Nonetheless, you will need the Kernel cmdline parameter to expose the interface allowing to set parameters.
Please follow LACT documentations to set it up.
Kernel cmdline parameter
Add this kernel cmdline parameter to enable power controls: amdgpu.ppfeaturemask=0xffffffff
I added this to the grub configuration:
$ cat /etc/default/grub|grep ppfea
GRUB_CMDLINE_LINUX_DEFAULT="quiet amdgpu.ppfeaturemask=0xffffffff"
$ grub-mkconfig -o /boot/grub/grub.cfg
Then reboot, and verify:
$ cat /proc/cmdline |grep amdgpu.ppfeaturemask
BOOT_IMAGE=/vmlinuz-6.12.73+deb13-amd64 root=UUID=0162acaf-1924-4e08-8546-22f983a2c9d3 ro rootflags=subvol=@rootfs quiet amdgpu.ppfeaturemask=0xffffffff
Automatically set limits at boot without LACT
I'm using a systemd unit and a custom script that also sets cpupower:
Systemd
$ cat /etc/systemd/system/power-settings.service
[Unit]
Description=Power Settings
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/power-settings.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
This can conflict with power-profiles-daemon that will reset your CPU settings.
In addition, the powersave mode of power-profiles-daemon is actually setting the max freq higher than the performance mode⦠it's garbage and i've got it disabled:
systemctl disable --now power-profiles-daemon
systemctl mask power-profiles-daemon
Custom script (cpupower + amdgpu)
Just in case you miss the link to the kernel documentation: v6.12 amdgpu pp-od-clk-voltage
#!/usr/bin/env bash
FREQ_CPU=3.0 # GHz
FREQ_GPU=1925 # MHz
GOV_CPU=powersave # i can't really see any diff between these governors. jic.
if [ "$1" = "S" ]; then # MIN
FREQ_CPU=1
FREQ_GPU=1300
GOV_CPU=powersave
fi
if [ "$1" = "M" ]; then # MAX
FREQ_CPU=4.15
FREQ_GPU=2600
GOV_CPU=performance
fi
echo "CPU=${FREQ_CPU} GPU=${FREQ_GPU} GOV=${GOV_CPU}"
cpupower frequency-set -d 0.55GHz -u ${FREQ_CPU}GHz -g ${GOV_CPU} > /dev/null
# ArchLinux uses card1 for some reason, but Debian 13 on my machine is card0
cd /sys/class/drm/card0/device
# requires amdgpu.ppfeaturemask=0xffffffff on boot cmdline
# https://www.kernel.org/doc/html/v6.12/gpu/amdgpu/thermal.html#pp-od-clk-voltage
echo manual > power_dpm_force_performance_level
echo "s 0 500" > pp_od_clk_voltage
echo "s 1 ${FREQ_GPU}" > pp_od_clk_voltage
echo "c" > pp_od_clk_voltage
I can use this script any time with S or M as parameter to change performances.