33 lines
1.1 KiB
Django/Jinja
33 lines
1.1 KiB
Django/Jinja
#!/bin/bash
|
|
# script for tuned AMDGPU clock control
|
|
# clocks in 3D usage are dynamic based on need/usage
|
|
#
|
|
# this sets the minimums / maximums
|
|
#
|
|
# rendered by Ansible with environment-appropriate values:
|
|
# card #, eg: card0
|
|
# min/max GPU clocks
|
|
|
|
# send a reset for a clean slate
|
|
# echo 'r' | tee /sys/class/drm/{{ card }}/device/pp_od_clk_voltage
|
|
|
|
# set manual control mode
|
|
echo 'manual' | tee /sys/class/drm/{{ card }}/device/power_dpm_force_performance_level
|
|
|
|
# set the minimum GPU clock
|
|
echo 's 0 {{ gpu_clock_min }}' | tee /sys/class/drm/{{ card }}/device/pp_od_clk_voltage
|
|
|
|
# set the maximum GPU clock
|
|
echo 's 1 {{ gpu_clock_max }}' | tee /sys/class/drm/{{ card }}/device/pp_od_clk_voltage
|
|
|
|
# set the maximum GPU *memory* clock
|
|
echo 'm 1 {{ gpumem_clock_max }}' | tee /sys/class/drm/{{ card }}/device/pp_od_clk_voltage
|
|
|
|
# boost offset voltage 100mV / 0.1V
|
|
echo 'vo +100' | tee /sys/class/drm/{{ card }}/device/pp_od_clk_voltage
|
|
|
|
# commit the changes
|
|
echo 'c' | tee /sys/class/drm/{{ card }}/device/pp_od_clk_voltage
|
|
|
|
# force GPU memory into highest profile
|
|
echo '3' | tee /sys/class/drm/{{ card }}/device/pp_dpm_mclk
|