ObjectiveOverclock Radeon RX 400 series and newer graphics cards under Linux using the AMDGPU open source drivers.
DistributionsThis method will work on any Linux distribution running the AMDGPU drivers.
RequirementsA working Linux install running kernel 4.10 or newer with root privileges and the AMDGPU drivers installed.
- # - requires given command to be executed with root privileges either directly as a root user or by use of
- $ - given command to be executed as a regular non-privileged user
IntroductionThe open source AMDGPU drivers don't have a fancy GUI interface that lets you overclock your card. Actually, they don't come with any kind of control center at all. That's alright, though, you can still overclock your card by modifying a couple of values in configuration files, a perfectly Linux solution if you think about it.
Install Lm_sensorsIf you don't already have
lm_sensorsinstalled, you should install it. The command below works on Debian distributions, but you can use your distro's package manager just the same.
$ sudo apt install lm-sensorsIf your distribution doesn't start the service immediately, start and enable it.
$ sudo systemctl start lm-sensors $ sudo systemctl enable lm-sensors
Detect SensorsOnce the service is running on your system, use the included utility to detect the sensors on your system. This should include your AMD graphics card.
$ sudo sensors-detectSave your results at the end of the script.
In order to make sure that it worked, run
sensors, and see if your card is there. Try restarting the
lm-sensorsservice if you don't see your card there.
You should either run
sensorson a loop in an open terminal or use a program like gkrellm or conky to continually monitor your card's temperatures and fans as you overclock. For maximum safety, keep your temperatures around or below 80C.
Fan SpeedsIt's probably a good idea to set your fan speeds manually before you start messing with your clock and memory speeds. This way, you can control your temperatures more actively.
There are two files that you need to modify. You may want to make backup copies of them to restore to factory settings before doing this.
Set the value of
1to manually control it with a percentage value.
$ sudo echo "1" > /sys/class/drm/card0/device/hwmon/hwmon1/pwm1_enableNow, set the percentage of the fan speed.
$ sudo echo "65" > /sys/class/drm/card0/device/hwmon/hwmon1/pwm1
OverclockingThere are two files to modify when overclocking your card. They both set the percentage to which the card is overclocked. The maximum that you should enter for either is 20%, but never enter that at once. Begin at the base value of 0 and slowly step up, checking your temperatures every time.
Again, if you want to make backups of these files, you can. The default values here should be more obvious, though.
First, you can set the percentage of the overclock speed for the GPU clock.
$ sudo echo "8" > /sys/class/drm/card0/device/pp_sclk_odThen, you can do the memory. Recent tests have indicated performance drops when overclocking memory. Test it out for yourself, but be aware that this can happen.
$ sudo echo "5" > /sys/class/drm/card0/device/pp_mclk_odOnce you've set these, you can use utilities like the Unigine benchmarks to stress your GPU and make sure that the overclocks are stable and your temperatures remain within a safe range.
If you want to monitor your card's clock speed while you test, you can run the following script in a separate terminal window.
while true; do cat /sys/kernel/debug/dri/0/amdgpu_pm_info; sleep 5; done