Amd Gpu overclocking not persistent.

Good day. For Polaris Gpu i followed this article: https://wiki.archlinux.org/index.php/AMDGPU#Overclocking

This worked but replacing the symlinks with the persistent path didn’t stay after reboot. What is the problem?

Hi
Yes, you would need to look at a script to set the values at boot via a simple systemd service file.

You might want to try out my WattmanGTK package?

https://build.opensuse.org/package/show/home%3Amalcolmlewis%3ATESTING/WattmanGTK

https://download.opensuse.org/repositories/home:/malcolmlewis:/TESTING/openSUSE_Tumbleweed/noarch/WattmanGTK-0.0.1+20181115.e94ba23-1.1.noarch.rpm

Hello, i installed your build but where is the app in my Whisker menu?

Hi
At present no menu file, can cook one up. Do you have a run option, then just enter wattmanGTK <enter>.

Well, ‘user’ doesn’t work, ‘sudo’ doesn’t workn either. ‘su’ works but it doesn’t save when you hit ‘apply’:

Traceback (most recent call last): File “/usr/lib/python3.6/site-packages/WattmanGTK/handler.py”, line 510, in apply
svoltages.append(self.new_state[f"Pstate voltage {i}"])
KeyError: ‘Pstate voltage 0’

Hi
If you use su - (minus) rather than just su so you switch to root user and environment? At present it’s not working for me with the newer kernel and TW, need to investigate more…

Anyway, what are your settings that you have to run after reboot to get your desired settings?

Hello, tested but nothing. I have tested these as best settings for my Rx570 itx and getting 105wp-64c:


echo "s 7 1300 970" > /sys/devices/pci0000:00/0000:00:01.1/0000:10:00.0/pp_od_clk_voltage
echo "s 6 1300 970" > /sys/devices/pci0000:00/0000:00:01.1/0000:10:00.0/pp_od_clk_voltage
echo "m 2 1800 850" > /sys/devices/pci0000:00/0000:00:01.1/0000:10:00.0/pp_od_clk_voltage
echo "0 1 2 6 7" > /sys/devices/pci0000:00/0000:00:01.1/0000:10:00.0/pp_dpm_sclk

Hi
OK, so if you create a script as say /usr/sbin/amdrx570 and chmod 0700 it;


#!/bin/bash
# Script to configure AMD Rx570 itx
# and getting 105wp-64c

echo "s 7 1300 970" > /sys/devices/pci0000:00/0000:00:01.1/0000:10:00.0/pp_od_clk_voltage
echo "s 6 1300 970" > /sys/devices/pci0000:00/0000:00:01.1/0000:10:00.0/pp_od_clk_voltage
echo "m 2 1800 850" > /sys/devices/pci0000:00/0000:00:01.1/0000:10:00.0/pp_od_clk_voltage
echo "0 1 2 6 7" > /sys/devices/pci0000:00/0000:00:01.1/0000:10:00.0/pp_dpm_sclk

Then create a systemd service say called /etc/systemd/system/amdrx570.service


# /etc/systemd/system/amdrx570.service
#

[Unit]
Description=Set overclocking on AMD RX570 GPU

[Service]
Type=oneshot
ExecStart=/bin/sh -c "/usr/sbin/amdrx570"

[Install]
WantedBy=multi-user.target

Test the service and enable, then on a reboot it should set the GPU up;


systemctl status amdrx570.service
systemctl start amdrx570.service
systemctl status amdrx570.service
systemctl enable amdrx570.service

Thanks it works. So then i should add the last command for other users:

echo “c” > /sys/devices/pci0000:00/0000:00:01.1/0000:10:00.0/pp_od_clk_voltage

Hi
Yes, just add to your script as required.