make default power limit configurable, add comment for power limit
This commit is contained in:
parent
c2367b2dc7
commit
5bb751c510
2 changed files with 20 additions and 11 deletions
20
playbook.yml
20
playbook.yml
|
@ -2,14 +2,20 @@
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
become: yes
|
become: yes
|
||||||
vars:
|
vars:
|
||||||
power_max_multi: 1.0 # should not exceed 1.0, must be a float. note: driver seems to do its own rounding
|
# the multipliers against power capability to determine power limits for the non-OC (default)/OC (custom) profiles
|
||||||
|
# 0.5 = 50%
|
||||||
|
# 1.0 = 100% (of card power capability, not stock limits)
|
||||||
|
# should not exceed 1.0, must be a float. driver will do some rounding/stepping
|
||||||
|
power_max_custom_multi: 1.0
|
||||||
|
power_max_default_multi: 0.75
|
||||||
power_max: "{{ power_max_b64['content'] | b64decode }}"
|
power_max: "{{ power_max_b64['content'] | b64decode }}"
|
||||||
power_cap_float: "{{ power_max |float * power_max_multi }}"
|
power_max_float: "{{ power_max_b64['content'] | b64decode |float }}"
|
||||||
power_cap_half_float: "{{ power_max |float * 0.5 }}"
|
power_cap_custom_float: "{{ power_max |float * power_max_custom_multi }}"
|
||||||
power_cap: "{{ power_cap_float |int }}"
|
power_cap_default_float: "{{ power_max |float * power_max_default_multi }}"
|
||||||
power_cap_half: "{{ power_cap_half_float |int }}" # used to limit GPU power to 50% on 'low' perf modes
|
power_cap_custom: "{{ power_cap_custom_float |int }}"
|
||||||
gpu_clock_min: "2300" # minimum GPU clock (in 3D) - defaults 500Mhz
|
power_cap_default: "{{ power_cap_default_float |int }}" # used to limit GPU power to some lower percentage on 'low' perf modes
|
||||||
gpu_clock_max: "2600" # maximum GPU clock (also 3D) - range allows up to 3000Mhz. default 2529
|
gpu_clock_min: "2200" # minimum GPU clock (in 3D) - defaults 500Mhz
|
||||||
|
gpu_clock_max: "2575" # maximum GPU clock (also 3D) - range allows up to 3000Mhz. default 2529
|
||||||
gpumem_clock_max: "1075" # maximum GPU memory clock - default 1000Mhz, range allows 1075Mhz
|
gpumem_clock_max: "1075" # maximum GPU memory clock - default 1000Mhz, range allows 1075Mhz
|
||||||
# note: (all clocks based on my non-reference 6900XT)
|
# note: (all clocks based on my non-reference 6900XT)
|
||||||
# consult '/sys/class/drm/{{ card }}/device/pp_od_clk_voltage'
|
# consult '/sys/class/drm/{{ card }}/device/pp_od_clk_voltage'
|
||||||
|
|
|
@ -25,16 +25,19 @@ script=${i:PROFILE_DIR}/amdgpu-clock-reset.sh
|
||||||
# ref: https://docs.kernel.org/gpu/amdgpu/thermal.html
|
# ref: https://docs.kernel.org/gpu/amdgpu/thermal.html
|
||||||
/sys/class/drm/{{ card }}/device/pp_power_profile_mode = {{ item.0.value }}
|
/sys/class/drm/{{ card }}/device/pp_power_profile_mode = {{ item.0.value }}
|
||||||
/sys/class/drm/{{ card }}/device/power_dpm_force_performance_level = auto
|
/sys/class/drm/{{ card }}/device/power_dpm_force_performance_level = auto
|
||||||
# give default profile {{ power_max_multi * 50.0 |int }}% (max) power capability
|
{# # give default profile {{ power_max_default_multi * 100.0 |int }}% of the max power capability -- {{ power_max_float * power_max_default_multi / 1000000.0 |int }} Watts of {{ power_max / 1000000 |int }} total #}
|
||||||
/sys/class/drm/{{ card }}/device/hwmon/hwmon9/power1_cap = {{ power_cap_half }}
|
# give default profile {{ power_max_default_multi * 100.0 |int }}% of the max power capability
|
||||||
|
# {{ power_cap_default|int/1000000 }} Watts of {{ power_max|int/1000000 }} total
|
||||||
|
/sys/class/drm/{{ card }}/device/hwmon/hwmon9/power1_cap = {{ power_cap_default }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if 'custom' in item.0.name %}
|
{% if 'custom' in item.0.name %}
|
||||||
[sysfs]
|
[sysfs]
|
||||||
# configure GPU power/clock characteristics
|
# configure GPU power/clock characteristics
|
||||||
# ref: https://docs.kernel.org/gpu/amdgpu/thermal.html
|
# ref: https://docs.kernel.org/gpu/amdgpu/thermal.html
|
||||||
/sys/class/drm/{{ card }}/device/pp_power_profile_mode = {{ item.0.value }}
|
/sys/class/drm/{{ card }}/device/pp_power_profile_mode = {{ item.0.value }}
|
||||||
# give this custom oriented profile {{ power_max_multi * 100.0 |int }}% of the power capability
|
# give this custom oriented profile {{ power_max_custom_multi * 100.0 |int }}% of the max power capability
|
||||||
/sys/class/drm/{{ card }}/device/hwmon/hwmon9/power1_cap = {{ power_cap }}
|
# {{ power_cap_custom|int/1000000 }} Watts of {{ power_max|int/1000000 }} total
|
||||||
|
/sys/class/drm/{{ card }}/device/hwmon/hwmon9/power1_cap = {{ power_cap_custom }}
|
||||||
|
|
||||||
# reference/execute AMDGPU clock control script
|
# reference/execute AMDGPU clock control script
|
||||||
[gpuclockscript]
|
[gpuclockscript]
|
||||||
|
|
Loading…
Reference in a new issue