sibradzic / upp

A tool for parsing, dumping and modifying data in Radeon PowerPlay tables
GNU General Public License v3.0
155 stars 24 forks source link

sys file values vs pp values #8

Closed SomeFixItDude closed 4 years ago

SomeFixItDude commented 4 years ago

Sorry I am pretty new at overclocking and under volting. When I try to set the state clock and vddc settings. It goes in but when I query the fs doesn't seem to match. Do I need to do something to make them sync?

upp.py -i /sys/class/drm/card1/device/pp_table set --write /VddcLookupTable/7=906 /SocClockDependencyTable/7/ulClk=107500

cat /sys/class/drm/card1/device/pp_dpm_sclk
0: 852Mhz *
1: 991Mhz
2: 1084Mhz
3: 1138Mhz
4: 1200Mhz
5: 1401Mhz
6: 1576Mhz
7: 1663Mhz

dump:

SocClockDependencyTable:
  RevisionId: 0
  NumEntries: 8
  Entries:
    Entries 0:
      ulClk: 60000
      ucVddInd: 0
    Entries 1:
      ulClk: 72000
      ucVddInd: 1
    Entries 2:
      ulClk: 80000
      ucVddInd: 2
    Entries 3:
      ulClk: 84700
      ucVddInd: 3
    Entries 4:
      ulClk: 90000
      ucVddInd: 4
    Entries 5:
      ulClk: 96000
      ucVddInd: 5
    Entries 6:
      ulClk: 102800
      ucVddInd: 6
    Entries 7:
      ulClk: 107500
      ucVddInd: 7

The dump shows it set the setting... maybe I am doing the wrong setting?

Ultimately I am trying to pull off:

# set to compute mode
echo 5 > /sys/class/drm/card1/device/pp_power_profile_mode
# manual mode
echo manual > /sys/class/drm/card1/device/power_dpm_force_performance_level
# manual fan
echo 1 > /sys/class/drm/card1/device/hwmon/hwmon*/pwm1_enable
# set fan speed
echo 165 > /sys/class/drm/card1/device/hwmon/hwmon*/pwm1
# set state 7, 1075Mhz 906mV
echo 's 7 1075 906' > /sys/class/drm/card1/device/pp_od_clk_voltage
# set available pstates to only 7
echo 7 > /sys/class/drm/card1/device/pp_dpm_sclk

But settings seem to not take or I am not sure if the pp_table doesn't reflect the sys values.

Any help greatly appreciated.

Thanks!

SomeFixItDude commented 4 years ago

sorry it made my comments headings above Testing on Vega64 ubuntu 18.4 kernel: 5.4.26-050426-generic amdgpu-pro 19.5 drivers

Thanks Again

sibradzic commented 4 years ago

I think there is a driver limitation in place where you can't set the frequency & voltage of a N state below frequency & voltage of a N-1 state. In other words, if you wish your state 7 to be at 1075Mhz 906mV, all previous states has to have to be set to lower frequency and voltages than 1075Mhz 906mV.

SomeFixItDude commented 4 years ago

ok thanks! I will give that a try

SomeFixItDude commented 4 years ago

Looks like after Rebooting bunch of times it just works now. Maybe all my sys value settings were mucking up the state of gpu. Thanks again for your help.