https://github.com/FlyGoat/RyzenAdj
Deploy this tool somewhere on your machine.
Add this to your /etc/systemd/system/ryzenadj.service
[Unit]
Description=Ryzen power mamangement
Wants=ryzenadj.timer
[Service]
Type=oneshot
ExecStart=/home/aj/bin/ryzenadj \
--fast-limit=27000 \
--slow-limit=27000 \
--stapm-limit=27000 \
--tctl-temp=96 \
--apu-skin-temp=70
[Install]
WantedBy=multi-user.target
Add this to your /etc/systemd/system/ryzenadj.timer
[Unit]
Description=Ryzen power mamangement
Requires=ryzenadj.service
[Timer]
Unit=ryzenadj.service
OnCalendar=*:0/15
[Install]
WantedBy=timers.target
loginctl enable-linger username
sudo systemctl daemon-reload
sudo systemctl enable ryzenadj.timer --now
This should run the tool every 15 minutes.
sudo systemctl list-timers