2

I am using open-source driver amdgpu on my arch linux. I read that I can overclock my GPU by writing to this files: /sys/class/drm/card0/device/pp_sclk_od and /sys/class/drm/card0/device/pp_mclk_od to adjust my GPU's core and mem frequencies accordingly. But when I write, for example 5, to any of this files it resets it to 0 and clocks aren't applied.

Also I have this file pp_dpm_sclk and pp_dpm_mclk the contents of sclk is: 0: 300Mhz 1: 483Mhz 2: 662Mhz 3: 841Mhz 4: 881Mhz 5: 914Mhz 6: 939Mhz 7: 947Mhz *

And I can actually switch between this frequencies, but I want to go way beyond 947 and I don't understand how to do this.

Question is why pp_mclk_od and pp_sclk_od resets to 0 when I try to give some percentage boost (0-20) to it? And how can I add more frequencies to pp_dpm_sclk and select it from there if I can't achieve it with od?

2 Answers 2

2

You can change the frequencies and voltage by modifying the file /sys/class/drm/card0/device/pp_od_clk_voltage

first: This holds the presets for pp_dpm_sclk and pp_dpm_mclk.

Second check the current settings:

sudo cat /sys/class/drm/card0/device/pp_od_clk_voltage

You should see something similar to this:

OD_SCLK:
0:        300MHz        750mV
1:        588MHz        765mV
2:        980MHz        987mV
3:       1100MHz        950mV
4:       1100MHz        950mV
5:       1100MHz        950mV
6:       1100MHz        950mV
7:       1100MHz        950mV
OD_MCLK:
0:        300MHz        750mV
1:       1000MHz        800mV
2:       1970MHz        950mV
OD_RANGE:
SCLK:     300MHz       2000MHz
MCLK:     300MHz       2250MHz
VDDC:     750mV        1150mV

Example to set 1280Mhz at 950mV (check your output above for possible ranges!):

sudo echo "s 7 1280 950" > /sys/class/drm/card0/device/pp_od_clk_voltage

Then to apply the changes:

sudo echo 0 > /sys/class/drm/card0/device/pp_sclk_od
sudo echo 1 > /sys/class/drm/card0/device/pp_sclk_od

These are all the settings I use on my crypto mining card which is an AMD Radeon RX570 in case it's useful to anyone.

echo 1 > /sys/class/drm/card0/device/hwmon/hwmon0/pwm1_enable
echo manual > /sys/class/drm/card0/device/power_dpm_force_performance_level
echo 200 > /sys/class/drm/card0/device/hwmon/hwmon0/pwm1 # Fan speed
echo 4 > /sys/class/drm/card0/device/pp_power_profile_mode # Compute Mode

echo "s 3 1100 950" > /sys/class/drm/card0/device/pp_od_clk_voltage
echo "s 4 1100 950" > /sys/class/drm/card0/device/pp_od_clk_voltage
echo "s 5 1100 950" > /sys/class/drm/card0/device/pp_od_clk_voltage
echo "s 6 1100 950" > /sys/class/drm/card0/device/pp_od_clk_voltage
echo "s 7 1100 950" > /sys/class/drm/card0/device/pp_od_clk_voltage

echo "m 2 1985 950" > /sys/class/drm/card0/device/pp_od_clk_voltage

echo 0 > /sys/class/drm/card0/device/pp_sclk_od
echo 1 > /sys/class/drm/card0/device/pp_sclk_od

echo 0 > /sys/class/drm/card0/device/pp_mclk_od
echo 1 > /sys/class/drm/card0/device/pp_mclk_od
1
  • Is there any way to go further than OD_RANGE? For my GPU the default values are already at maximum, but on Windows it was no problem to go higher... Dec 18, 2022 at 23:19
0

2 possibilities to consider:

1)not all cards support this function

2) In Ubuntu at least, you have to modify those files as root not just use "sudo". So make sure you:

sudo su

to become root user. then:

echo "5" >> ./pp_mclk_od (for example)

4
  • Can you elaborate on the inadequacy of sudo (contrasted to root) or provide a reference? Jan 17, 2018 at 5:25
  • 1
    @Scott he's wrong, sudo is perfectly adequate
    – radman
    Feb 26, 2018 at 23:50
  • 1
    @radman no he's right. sudo gives Permission Denied
    – Tooniis
    Jan 13, 2020 at 10:31
  • 4
    @Scott running a command with sudo makes the command passed to sudo run with root privileges, but it does not make your shell run with root privileges. When you run the command sudo echo foo > bar Only the echo foo bit runs as root. The redirection happens in your shell under your user. As an alternative to sudo su you can use sudo sh -c "echo foo > bar" or echo foo | sudo tee bar (in the latter case, tee is used instead of shell redirection.) Nov 13, 2020 at 6:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.