This is not a complete recipe - it's a component of the cryptominer "uber-recipe", but has been split into its own page to reduce complexity.
- AMD drivers for your GPU
- Linux version of "atiflash" command
- A VBIOS rom compatible with your GPU model and memory manufacturer
Install the drivers¶
There are links on the AMD driver download page (linked above) to drivers for RHEL/CentOS6, RHEL/CentOS7, and Ubuntu 16.04. As I write this, the latest version is amdgpu-pro-17.50-511655.
You'll find reference online to the "blockchain" drivers. These were an earlier, beta release which have been superseded by version 17.50 and later. You can ignore these.
Uncompress the drivers package, and run the following:
./amdgpu-install --opencl=legacy --headless
If you have a newer (than my 5-year-old one!) motherboard/CPU, you can also try the following, for ROCm support (which might allow you some more software-based overclocking powers):
./amdgpu-install --opencl=legacy,rocm --headless
Reboot upon completion.
Flash the BIOS¶
Yes, this sounds scary, but it's not as bad as it sounds, if you want better performance from your GPUs, you have to flash your GPU BIOS.
Why flash BIOS?¶
Here's my noob-level version of why:
GPU-mining performance is all about the memory speed of your GPU - you get the best mining from the fastest internal timings. So you want to optimize your GPU to do really fast memory work, which is not how it's designed by default.
The processor on your GPU sits almost idle, so you lower the power to the processor (undervolt) to save some power.
As it turns out, the factory memory timings of the RX5xx series were particularly poor.
As an aside, here's an illustration re why you'd want to flash your BIOS. Below is the mining throughput of 2 AMD RX580s I purchased together. Guess which one had its BIOS flashed?
ETH: GPU0 30.115 Mh/s, GPU1 22.176 Mh/s
Here's the power consumption of the two GPUs while doing the above test:
GPU1 (original ROM)
1 2 3 4 5 6 7 8 9 10
GFX Clocks and Power: 1750 MHz (MCLK) 1411 MHz (SCLK) 144.107 W (VDDC) 16.0 W (VDDCI) 171.161 W (max GPU) 172.209 W (average GPU) GPU Temperature: 67 C GPU Load: 100 %
GPU0 (flashed ROM)
1 2 3 4 5 6 7 8 9 10
GFX Clocks and Power: 2050 MHz (MCLK) 1150 MHz (SCLK) 87.155 W (VDDC) 16.0 W (VDDCI) 117.152 W (max GPU) 116.1 W (average GPU) GPU Temperature: 62 C GPU Load: 100 %
So, by flashing the BIOS, I gained 8 MH/s (a 36% increase), while reducing power consumption by ~40W!
How to flash AMD GPU BIOS?¶
Get atiflash for linux.
Identify which card you want to flash, by running
Example output below:
1 2 3 4 5 6
[root@kvm ~]# ./atiflash -i adapter bn dn dID asic flash romsize test bios p/n ======= == == ==== =============== ============== ======= ==== ================ 0 01 00 67DF Ellesmere M25P20/c 40000 pass 113-1E3660EU-O55 [root@kvm ~]#
- Save the original, factory ROM, by running
./atiflash -s <adapter number> <filename to save>
[root@kvm ~]# ./atiflash -s 0 rx580-4gb-299-1E366-101SA.orig.rom 0x40000 bytes saved, checksum = 0x7FBF
Now find an appropriate ROM to flash onto the card, and run ```atiflash -p
I share (with my patreon patrons) a private "premix" git repository, which includes a range of RX580-compatible ROMs, some of which I've tweaked for my own GPUs. 👍
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
[root@kvm ~]# ./atiflash -f -p 0 Insan1ty\ R9\ 390X\ BIOS\ v1.81/R9\ 290X/MEM\ MOD\ --\ ELPIDA/290X_ELPIDA_MOD_V1.8.rom Old SSID: E285 New SSID: 9395 Old P/N: 113-E285FOC-U005 New P/N: 113-GRENADA_XT_C671_D5_8GB_HY_W Old DeviceID: 67B1 New DeviceID: 67B0 Old Product Name: C67111 Hawaii PRO OC GDDR5 4GB 64Mx32 300e/150m New Product Name: C67130 Grenada XT A0 GDDR5 8GB 128Mx32 300e/150m Old BIOS Version: 015.044.000.011.000000 New BIOS Version: 015.049.000.000.000000 Flash type: M25P10/c Burst size is 256 20000/20000h bytes programmed 20000/20000h bytes verified Restart System To Complete VBIOS Update. [root@kvm ~]#
Reboot the system, hold onto your butts, and wait for your newly-flashed GPU to fire up.
If it goes wrong¶
The safest way to do this is to run more than one GPU, and to flash the GPUs one-at-a-time, rebooting after each. That way, even if you make your GPU totally unresponsive, you'll still get access to your system to flash it back to the factory ROM.
That said, it's very unlikely that a flashed GPU won't let you boot at all though. In the (legion) cases where I overclocked my RX580 too far, I was able choose to boot into rescue mode in CentOS7 (bypassing the framebuffer / drm initialisation), and reflash my card back to its original BIOS.
Mooar tweaking! 🔧¶
If you want to tweak the BIOS yourself, download the Polaris bios editor and tweak away!
Continue your adventure¶
Now, continue to the next stage of your grand mining adventure:
- Build your mining rig 💻
- Setup your AMD (this page) or Nvidia GPUs 🎨
- Sign up for mining pools
- Setup your miners with Miner Hotel 🏨
- Send your coins to exchanges or wallets 💹
- Monitor your empire
- Profit! 💰
- My two RX580 cards (bought alongside each other) perform slightly differently. GPU0 works with a 2050Mhz memory clock, but GPU1 only works at 2000Mhz. Anything over 2000Mhz causes system instability. YMMV.
Tip your waiter (donate) 👏¶
Did you receive excellent service? Want to make your waiter happy? (..and support development of current and future recipes!) See the support page for (free or paid) ways to say thank you! 👏