A simple systemd package that uses ryzenadj to apply different --set-coall values based on power source:
- AC power: apply
AC_UNDERVOLT - Battery power: apply
BATTERY_UNDERVOLT
Configuration is stored in /etc/default/ryzen-auto-undervolt.
- Allowed range:
-30to30 - Negative values mean undervolt
- Values are converted to the 20-bit format required by
ryzenadj --set-coall=0x... - Example:
-16becomes0xFFFF0
ryzenadjis installed- Your device supports
--set-coall ryzenadj -iworks correctly
Example:
sudo /usr/bin/ryzenadj -iOr if you use a custom path:
sudo /home/deck/.local/bin/ryzenadj -iAfter installation, edit:
sudoedit /etc/default/ryzen-auto-undervoltDefault values:
RYZENADJ_BIN=/usr/bin/ryzenadj
AC_UNDERVOLT=-30
BATTERY_UNDERVOLT=-10
DRY_RUN=0ryzen-auto-undervolt.serviceruns once at boot- A
udevrule monitorsMainsstate changes inpower_supply - Plugging/unplugging power triggers the same service again
View logs:
journalctl -u ryzen-auto-undervolt.service -bRun in project root:
dpkg-buildpackage -us -uc -bInstall the built package:
sudo dpkg -i ../ryzen-auto-undervolt_0.1.0-1_all.debIf debhelper is not available, use the included script:
./build-deb.sh
sudo dpkg -i ./ryzen-auto-undervolt_0.1.0-1_all.debsudo systemctl restart ryzen-auto-undervolt.service
sudo systemctl status ryzen-auto-undervolt.service --no-pager--set-coall tuning can affect stability. Increase/decrease gradually (for example -5, then -10) instead of using aggressive values immediately.