Skip to content

Instantly share code, notes, and snippets.

@9bitbear
Last active March 20, 2021 21:54
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save 9bitbear/ed22baac9b59ae53bbee74ab9bff7150 to your computer and use it in GitHub Desktop.
Save 9bitbear/ed22baac9b59ae53bbee74ab9bff7150 to your computer and use it in GitHub Desktop.
AMD RX Series GPU setup for Mining

Running AMD Radeon GPUS on Ubuntu 16.04

Cards tested (so far):

Model Released
Radeon RX 550 April 2017
Radeon RX 560 April 2017
Radeon HD 7800 Series March 2012

amdgpu-pro-17.40.2712-510357 is the ONLY driver that works for RX 550

Update packages:

sudo apt update
sudo apt dist-upgrade
sudo reboot

Update & Check PCI devices:

sudo update-pciids 
lspci | grep VGA

Download driver & extract:

wget --referer=http://support.amd.com https://www2.ati.com/drivers/linux/beta/ubuntu/amdgpu-pro-17.40.2712-510357.tar.xz
tar -Jxvf amdgpu-pro-17.40.2712-510357.tar.xz

Install Linux driver:

cd amdgpu-pro-17.40.2712-510357
chmod u+x ./amdgpu-pro-install
sudo ./amdgpu-pro-install --compute -y
# ......
sudo reboot

Add yourself to the 'video' group:

sudo usermod -a -G video $LOGNAME
sudo reboot

Test groups & GPUs detected:

groups | grep video
clinfo | grep 'Board'

Install clinfo:

sudo apt update
sudo apt install ocl-icd-opencl-dev
sudo apt install clinfo
sudo reboot

Notes compiled from:

Other notes

Copy files from USB

## lsblk
sudo mkdir /media/usb
## find device
sudo fdisk -l
# mount it
sudo mount -t vfat /dev/sdb1 /media/usb -o uid=1000,gid=100,utf8,dmask=027,fmask=137

Other drivers I've tested

# wget --referer=http://support.amd.com https://www2.ati.com/drivers/linux/beta/ubuntu/amdgpu-pro-17.40-483984.tar.xz
# wget --referer=http://support.amd.com https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.50-511655.tar.xz

(optional) Install AMD-APP-SDK

cd amdGPU
wget https://s3.amazonaws.com/atlas-shapes/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
tar -vxjf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh
sudo reboot

Install/Configure the Optional ROCm Component

sudo apt install -y rocm-amdgpu-pro

env vars for OpenCL

# echo 'export LLVM_BIN=/opt/AMDAPPSDK-3.0/bin/x86_64' | sudo tee /etc/profile.d/amdgpu-pro.sh
echo 'export LLVM_BIN=/opt/amdgpu-pro/bin' | sudo tee /etc/profile.d/amdgpu-pro.sh
echo 'setenv LLVM_BIN /opt/amdgpu-pro/bin' | sudo tee /etc/profile.d/amdgpu-pro.csh

cleanup:

sudo apt autoremove

More ROCm notes: https://rocm.github.io/ROCmInstall.html

Next

Install a miner

@9bitbear
Copy link
Author

9bitbear commented Jan 1, 2018

fix for missing RX 550 device in clinfo:

$ sudo apt-get install mesa-opencl-icd

fix for bad install:

$ sudo dpkg --purge --force-all <package-with-unmet-deps>

@gonultasbu
Copy link

Works like a charm! Thanks.

@cloudrac3r
Copy link

Got it working on Ubuntu 16.04.4 with a Sapphire Nitro Radeon RX 570. Thanks for the guide!

@VhaTer
Copy link

VhaTer commented May 21, 2018

my first step on mining THANKS A LOT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment