Videos
I've been searching here and there for a few days now, and can't seem to find a complete answer that rivals something like afterburner.
specifically I think I'm looking for voltage and clock options. I've never overclocked a card before but over / under stock on voltage and clock covers everything I think
I see that the mining focused distros have all the options, and profiles and stuff, but I cant seem to find out how to do it outside of that. What are they doing under the hood?
gui / cli whatever
I am trying to tune my rx 580 gpus on Ubuntu 20.04 (kernel downgraded to 5.4.0-54 to install amdgpu-pro 20.40). I followed this post. However, I am having problems doing "sudo sh -c "echo 's 7 1150 875' > /sys/class/drm/card0/device/pp_od_clk_voltage". It seemed the command was stuck at an infinite loop but I could interrupt it with Ctrl+c. I could see the values were being set correctly though (sudo cat /sys/class/drm/card0/device/pp_od_clk_voltage). I do have amdgpu.ppfeaturemask=0xffffffff in the GRUB configuration.
Also, the keyboard interruption generates the following message (dmesg).
[ 1556.408582] [drm] PCIE GART of 256M enabled (table at 0x000000F400000000).[ 1556.516184] [drm] UVD and UVD ENC initialized successfully.[ 1556.651170] [drm] VCE initialized successfully.[ 1556.655024] [drm] Cannot find any crtc or sizes[ 1557.478559] [drm] PCIE GART of 256M enabled (table at 0x000000F400000000).[ 1557.666041] [drm] UVD and UVD ENC initialized successfully.[ 1557.767006] [drm] VCE initialized successfully.[ 1557.776713] [drm] Cannot find any crtc or sizes[ 1558.661846] [drm] PCIE GART of 256M enabled (table at 0x000000F400000000).[ 1558.866083] [drm] UVD and UVD ENC initialized successfully.[ 1558.967046] [drm] VCE initialized successfully.[ 1558.971009] [drm] Cannot find any crtc or sizes[ 1560.676695] [drm] PCIE GART of 256M enabled (table at 0x000000F400000000).[ 1560.782288] [drm] UVD and UVD ENC initialized successfully.[ 1560.918262] [drm] VCE initialized successfully.[ 1560.921708] [drm] Cannot find any crtc or sizes
I am wondering if anyone has and insight to help me with this. Thanks in advance.
Your post has been automatically set the flair of "Hardware" because we detected the model of a video card in your title.
If this is incorrect, please set the proper flair for your post.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
Many miners set clocks in miner now. Likely a lot easier than doing it this way.
OS: Ubuntu 16.04 LTS Driver: AMDGPU-Pro 17.30 Miner : Claymore ETH V10.0 I'm really new to Linux, but have been able to find my way around pretty easily with all the content on the web. One think that has eluded me is how to clock my GPU memory. I went from 28/29 MH per card to 18/19.... I attempted to OC in the terminal, it gives me only stock memory clocks even though I have flashed the bios. I first tried via Claymore but apparently AMD ADL SDK isn't supported by the driver.
Anyone turned this stone over yet?
Any help would be much appreciated.
I confirm you cannot overclock or undervolt throug claymore with amdgpupro in ubuntu 16.8
note that you should consider instaling rocm which solves Polaris bug that make speed fall with DAG size https://www.reddit.com/r/EtherMining/comments/6wsf7o/new_amd_blockchain_optimized_drivers_availible/
I can get 26-31 MH/s with RX480 after editing bios, and testing many variation :
-
change the straps. NB this polarisbioseditor allow to set optimal memory strap https://github.com/jaschaknack/PolarisBiosEditor (UBER or GOOD) ... anyway sometime using for 2000 the strap of 1500/1625/1750 (depend on the card) is better. some bad cards alos enjoy UBER below 2000MHz, or 1625/1500 ... each card is different...
-
half GPU frequency to 1100 or 1200 , it is useless for ETH
-
change ram frequency to something stable... it can be 2250, 2150,2000 or 1900 depending on the card
for consumption undervolting from bios (or claymore) don't work unless you have modified the bios to edit the VoltageObjectinfo to add an offset... very risky but some sell the service . you have to know which voltage controller is on the card, which mean an i2cdump, which is not possible with amdgpu (need windows AFAIK) http://www.overclock.net/t/1621800/would-appreciate-help-in-finding-editing-the-voltage-offset-in-the-rx480-bios/0_100#post_26047272
in case of bricked GPU, I could save my card by booting in generic kernel in rescue mode (edit grub to have the boot menu available), and using atiflash http://bios.ethosdistro.com/atiflash-linux/
keed original bios of couse, put is on your disk, with atiflash, and even create a quick script for atiflash -p 0 OriginalBios.rom
https://github.com/OhGodACompany/OhGodATool
Many people that I have seen have modified their BIOS and then used a GPU tweaker to maximize their hashrate. Seeing as Windows is $130 CAD, I decided to use linux. I have 4X 470 4GB and with a BIOS mod I am getting about 23MH/s each. Are there any GPU tweaking tools for linux? Thanks.
I use local.conf to apply OC settings to the cards. You can modify voltage, clock rate, etc, per-GPU or globally.
I then generally use a custom BIOS (I roll my own) with tighter timings applied. I make that on a Windows box with Polaris like everyone else. It's super easy, don't fear it. Just be sure to save your original BIOS somewhere safe.
I'm rolling 29.5 MH on rx480 8gb micron memory cards. 27-28MH on rx580 8gb with Samsung memory.
Need help? Hit me up.
I've got the same question, except for fan control there doesn't seem to be much.
One thing I missed from Windows after my transition to Linux was the ability to easily adjust my GPU's clock speeds and voltages. I went to the godly Arch Wiki and found there's a way to overclock AMD GPUs, but some steps are not very clear and I had to do some googling to get everything working.
EDIT: Vega GPU are not supported as of kernel 4.20.2! Here's a workaround by u/whatsaspecialusername.
First things first, your kernel has to be at least version 4.17 (you can check by running uname -a), although it's recommended to update it to the latest version for system stability, bug fixes and new features (for instance, Hawaii support for overclocking was introduced in 4.20). The driver should be amdgpu (not the proprietary amdgpu-pro). I suggest installing the latest mesa+amdgpu from this PPA for *buntu, but I don't know about other distros. It might not even be a necessary step.
You need to add the parameter amdgpu.ppfeaturemask=0xffffffff to your GRUB configuration. To do so, edit /etc/default/grub as root and add the parameter between the quotes of GRUB_CMDLINE_LINUX_DEFAULT. Save, then run sudo update-grub2 or sudo grub-mkconfig -o /boot/grub/grub.cfg, depending on your distro. Reboot. If you're running any bootloader other than GRUB, check this Arch Wiki page.
Now, we need to find the file with our GPU's clocks and voltages. In my case it was in /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/, but you can find the directory by running readlink -f /sys/class/drm/card0/device.
The file we want to work with is called pp_od_clk_voltage. Mine looked like the following (my card is a Sapphire RX 580 Nitro+ 4GB):
OD_SCLK: 0: 300MHz 750mV 1: 600MHz 769mV 2: 900MHz 887mV 3: 1145MHz 1100mV 4: 1215MHz 1181mV 5: 1257MHz 1150mV 6: 1300MHz 1150mV 7: 1411MHz 1150mV OD_MCLK: 0: 300MHz 750mV 1: 1000MHz 800mV 2: 1750MHz 950mV OD_RANGE: SCLK: 300MHz 2000MHz MCLK: 300MHz 2250MHz VDDC: 750mV 1200mV
We want to edit the P-state #7 for the core and #2 for the VRAM, as those are the values that our GPU is going to run at while under load. On Windows, my optimal values were 1450MHz for core and 2065MHz for memory, so I'm going to edit the file as follows:
sudo sh -c "echo 's 7 1450 1150' > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/pp_od_clk_voltage"
Where "s" means we're editing the core's values, 7 is the seventh P-state, 1450 is the speed we want in MHz, 1150 is the voltage in mV. Note that I didn't run sudo echo "s 7 1450 1150" > /sys/class/drm/card0/device/pp_od_clk_voltage like the Arch Wiki states, because it would throw an error and not apply the changes (this might have worked without "sudo" if we logged in as root with sudo su, but it's best not to do so for safety reasons). See here.
Same with the VRAM: sudo sh -c "echo 'm 2 2065 950' > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/pp_od_clk_voltage"
After these two commands the file is going to be the same except for the two lines of the P-states we just edited. We can check by running cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/pp_od_clk_voltage.
I didn't mess with voltages because I'm already satisfied with my results and I'm very paranoid about damaging my GPU. If you really want to, please be really careful as you might cause fatal damage to your card!
Once we are done, running sudo sh -c "echo 'c' > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/pp_od_clk_voltage" will apply the changes and the GPU will start running at those new frequencies when under load.
While I haven't found a way to actively monitor clock speeds à la MSI Afterburner (EDIT: there is actually! See this comment by u/AlienOverlordXenu), I could see a sudden increase in FPS in Heaven Benchmark as soon as I applied the new clocks. I set the camera to free mode (so that it stops moving) and after applying the FPS went from 55-56 to 60-61!
(The guide on ArchWiki also has a command to change the maximum power consumption in Watts: I didn't mess with it as I wasn't sure what was a safe value)
Now there's one problem: every time we reboot our PC the clocks are going to reset. So how do we make them stick?
Assuming your distro has systemd, we can create a service that runs the three commands that edit and apply the clocks at boot. If your distro doesn't have systemd, you can follow these steps.
First, we need to create a script. I named mine "overclock" and put it in /usr/bin/. It looks like this:
#!/bin/sh sudo sh -c "echo 's 7 1450 1150' > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/pp_od_clk_voltage" sudo sh -c "echo 'm 2 2065 950' > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/pp_od_clk_voltage" sudo sh -c "echo 'c' > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/pp_od_clk_voltage"
Then, we have to create a file in /etc/systemd/system/ with a .service extension. I named mine overclock.service:
[Unit] Description=Increase GPU core and memory clocks [Service] Type=oneshot ExecStart=/usr/bin/overclock [Install] WantedBy=multi-user.target
sudo systemctl enable overclock.service will enable our service. After rebooting it should automatically overclock the GPU. We can check if it did by running cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/pp_od_clk_voltage.
(It's not necessary, but I also made a script that sets the GPU back to the stock clock speeds. I didn't make a service for it, I just put it in my Documents folder.)
So that should be it! Keep in mind that it might not work on any AMD GPU, in fact I couldn't find a way to do it on my Ryzen+Vega laptop (something with power saving mode I'm guessing), but it's always worth a try. This is my first "real" guide so any feedback is very much appreciated.
I'm a gpu to spare on crypto mining. But found If it can't be overclocked on linux?!
Any readings or software to try oc gpu on linux?
I have a 3080 in a dual boot Win 10/Ubuntu 20.04 machine. I've spent upwards of a week trying to figure out how to overclock this card consistently and autonomously on Linux but I found out today that it's not actually being set correctly.
I have already gone through and did the coolbits=28 option in my xorg.conf file
In order, this is what my script does:
-
Sets persistence mode (nvidia-smi -pm 1)
-
Sets fan override via nvidia-settings
-
Sets fan speed to 50% via nvidia-settings
-
Sets PowerMizer mode = 1 via nvidia-settings
-
Sets the "GPUGraphicsClockOffset[3]" value to 200 via nvidia-settings
-
Sets the "GPUMemoryTranserRateOffset[3]" value to 800 via nvidia-settings
Now, all of these report back successful, but only 1-3 actually are successful, 4-6 print success but if I query the card before the commands/script, the value matches with the query after the script is run. I can set all of this via Green With Envy or within NVIDIA's own X configuration, but these options don't persist through a reboot and neither really appears operable from the command line or provide the ability to load overclocking configuration files of any sort.
I've done quite a bit of research and I'm either finding outdated information or inaccurate information. For example, some sources say the overclock commands (steps 5 & 6) won't work if the PowerMizer mode isn't 1 (step 4) and I just saw that today, but no difference after implementing that.
The fact that it reports back OK is the most confusing part. I've never seen a program so fussy about parameters as nvidia-settings and then it reports back positive when actually nothing happened? Weird.
Anyway, I'm out of ideas and out of search results with any variance from what I already have.