Need help with RyzenAdj?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

FlyGoat
657 Stars 62 Forks GNU Lesser General Public License v3.0 146 Commits 14 Opened issues

Description

Adjust power management settings for Mobile Raven Ridge Ryzen Processors

Services available

!
?

Need anything else?

Contributors list

RyzenAdj

Adjust power management settings for Ryzen Mobile Processors.

Build Status

Based on: FlyGoat/ryzennbsmu

RyzenAdjUI_WPF by "JustSkill" is no longer maintained, for GUI please see ryzen-controller-team/ryzen-controller.

Usage

The command line interface is identical on both Windows and Unix-Like OS.

You should run it with Administrator on Windows or root on Linux.

You can write a shell script or bat to do it automaticly.

$./ryzenadj -h
Usage: ryzenadj [options]

Ryzen Power Management adjust tool.

-h, --help                            show this help message and exit

Options -i, --info Show information and most importand power metrics after adjustment --dump-table Show whole power metric table before and after adjustment

Settings -a, --stapm-limit= Sustained Power Limit - STAPM LIMIT (mW) -b, --fast-limit= Actual Power Limit - PPT LIMIT FAST (mW) -c, --slow-limit= Average Power Limit - PPT LIMIT SLOW (mW) -d, --slow-time= Slow PPT Constant Time (s) -e, --stapm-time= STAPM constant time (s) -f, --tctl-temp= Tctl Temperature Limit (degree C) -g, --vrm-current= VRM Current Limit - TDC LIMIT VDD (mA) -j, --vrmsoc-current= VRM SoC Current Limit - TDC LIMIT SoC (mA) -k, --vrmmax-current= VRM Maximum Current Limit - EDC LIMIT VDD (mA) -l, --vrmsocmax-current= VRM SoC Maximum Current Limit - EDC LIMIT SoC (mA) -m, --psi0-current= PSI0 VDD Current Limit (mA) -n, --psi0soc-current= PSI0 SoC Current Limit (mA) -o, --max-socclk-frequency= Maximum SoC Clock Frequency (MHz) -p, --min-socclk-frequency= Minimum SoC Clock Frequency (MHz) -q, --max-fclk-frequency= Maximum Transmission (CPU-GPU) Frequency (MHz) -r, --min-fclk-frequency= Minimum Transmission (CPU-GPU) Frequency (MHz) -s, --max-vcn= Maximum Video Core Next (VCE - Video Coding Engine) (MHz) -t, --min-vcn= Minimum Video Core Next (VCE - Video Coding Engine) (MHz) -u, --max-lclk= Maximum Data Launch Clock (MHz) -v, --min-lclk= Minimum Data Launch Clock (MHz) -w, --max-gfxclk= Maximum GFX Clock (MHz) -x, --min-gfxclk= Minimum GFX Clock (MHz) -y, --prochot-deassertion-ramp= Ramp Time After Prochot is Deasserted: limit power based on value, higher values does apply tighter limits after prochot is over --apu-skin-temp= APU Skin Temperature Limit - STT LIMIT APU (degree C) --dgpu-skin-temp= dGPU Skin Temperature Limit - STT LIMIT dGPU (degree C) --apu-slow-limit= APU PPT Slow Power limit for A+A dGPU platform - PPT LIMIT APU (mW) --skin-temp-limit= Skin Temperature Power Limit (mW) --power-saving Hidden options to improve power efficiency (is set when AC unplugged): behavior depends on CPU generation, Device and Manufacture --max-performance Hidden options to improve performance (is set when AC plugged in): behavior depends on CPU generation, Device and Manufacture

Demo

If I'm going to set all the Power Limit to 45W, and Tctl to 90 °C, then the command line should be:

./ryzenadj --stapm-limit=45000 --fast-limit=45000 --slow-limit=45000 --tctl-temp=90

Documentation

Installation

You don't need to install RyzenAdj because it does not need configuration, everything is set via arguments However, some settings could get overwritten by power management features of your device, and you need to regularly set your values again.

We did provide some examples for automation. And these require configuration during installation.

Linux Installation

Because it is very easy to build the latest version of RyzenAdj on Linux, we don't provide precompiled packages for distributions. Just follow the build instructions and you are ready to use it.

Windows Installation

Before you start installing anything, it is highly recommended getting familiar with RyzenAdj to find out what can be done on your device. Use the CLI

ryzenadj.exe
to test the support of your device and to benchmark the effects of each setting. If your values don't stay persistent you may want to consider installing our example script for automation.
  1. Prepare your favorite RyzenAdj arguments
  2. Copy the content of your RyzenAdj folder to the final destination
  3. Put your configuration into
    readjustService.ps1
    and test it as administrator until everything works as expected
  4. Install
    readjustService.ps1
    as Task for Windows Task Scheduler by running
    installServiceTask.bat

Deinstallation of the Task can be done via

uninstallServiceTask.bat

Over Windows Task Scheduler you can check if it is running. It is called

RyzenAdj
below
AMD
folder. Or just run
SCHTASKS /query /TN "AMD\RyzenAdj"

Build

Build Requirements

Building this tool requires C & C++ compilers as well as cmake. It requires privileged access to NB PCI config space, in order to compile it one must have pcilib library & headers available.

Linux

Please make sure that you have libpci dependency before compiling. On Debian-based distros this is covered by installing pcilib-dev package:

sudo apt install libpci-dev

On Fedora:

sudo dnf install pciutils-devel

The simplest way to build it:

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Windows

It can be built by Visual Studio + MSVC automaticaly, or Clang + Nmake in command line. However, as for now, MingW-gcc can't be used to compile for some reason.

Required dll is included in ./win32 of source tree. Please put the dll library and sys driver in the same folder with ryzenadj.exe.

We don't recommend you to build by yourself on Windows since the environment configuarion is very complicated. If you would like to use ryzenadj functions in your program, see libryzenadj.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.