====== Ubuntu - GPU - AMD GPU - Performance Tuning ======
The dpm performance level can be changed to push the memory and GPU frequency to the highest levels (maximum performance).
**NOTE:** The default is **auto**, but this may result in some lag at some points while the GPU ramps up performance.
----
===== Check the Existing Performance Level =====
cat /sys/class/drm/card0/device/power_dpm_force_performance_level
returns:
auto
----
===== Set High Performance =====
To set max performance:
echo "high" > /sys/class/drm/card0/device/power_dpm_force_performance_level
----
===== Set Low Performance =====
To set low performance:
echo "low" > /sys/class/drm/card0/device/power_dpm_force_performance_level
----
===== Set Auto Performance =====
To set Auto performance:
echo "auto" > /sys/class/drm/card0/device/power_dpm_force_performance_level
----
===== Set Manual Performance =====
To set manual performance:
echo "manual" > /sys/class/drm/card0/device/power_dpm_force_performance_level
**NOTE:** When **manual** is selected, the user can manually adjust which power states are enabled for each clock domain via the sysfs pp_dpm_mclk, pp_dpm_sclk, and pp_dpm_pcie files and adjust the power state transition heuristics via the pp_power_profile_mode sysfs file.
----
===== Profiling Mode Performance Settings =====
echo "profile_standard" > /sys/class/drm/card0/device/power_dpm_force_performance_level
echo "profile_min_sclk" > /sys/class/drm/card0/device/power_dpm_force_performance_level
echo "profile_min_mclk" > /sys/class/drm/card0/device/power_dpm_force_performance_level
echo "profile_peak" > /sys/class/drm/card0/device/power_dpm_force_performance_level
**NOTE:** When the profiling modes are selected, clock and power gating are disabled and the clocks are set for different profiling cases.
This mode is recommended for profiling specific work loads where you do not want clock or power gating for clock fluctuation to interfere with your results.
* **profile_standard** sets the clocks to a fixed clock level which varies from asic to asic.
* **profile_min_sclk** forces the sclk to the lowest level.
* **profile_min_mclk** forces the mclk to the lowest level.
* **profile_peak** sets all clocks (mclk, sclk, pcie) to the highest levels.
----
===== Set the DPM Performance Level Permanently =====
Created a **/etc/rc.local** file and populate with:
#!/bin/bash
echo low > /sys/class/drm/card0/device/power_dpm_force_performance_level
==== Make it executable ====
chmod a+x /etc/rc.local
----
==== Enable systemd service to run this script ====
See How to enable rc.local with systemd.
----
===== References =====
https://dri.freedesktop.org/docs/drm/gpu/amdgpu.html#power-dpm-state