- How to Install AMD OpenCL GPU Drivers on Ubuntu 20.04 for Miners | Jan 2022
- Driver Installation: Updated Feb 2022
- Affiliate Links
- Related Posts
- Create an Inline Menu Telegram Bot using Node.js & grammY
- Root Your Woox IP Camera For RTSP & Home Assistant
- How to Easily Set Up a Personal Email Server in 2022
- Install OpenCL Drivers On Ubuntu¶
- Links
How to Install AMD OpenCL GPU Drivers on Ubuntu 20.04 for Miners | Jan 2022
UPDATE: January 2022 The whole method still works but the recommended distros that i have personally tested that work are 20.04 and Debian Bullseye. Start with a server image and add a desktop if you need to AFTER you have tested that the drivers have installed correctly from following this guide.
UPDATE: December 2021 – Those using Plasma desktop will find they have problems, especially when using Kubuntu for instance. Best to switch to a different distro like Xubuntu or anything that doesn’t use plasma desktop until a fix is released. I have been waiting a few days myself and still no fix.
Installing drivers on Linux can be an absolute disaster waiting to happen. You install the drivers and you get either a black screen or the system will simply refuse to boot. I have tried absolutely every way to install them and i almost always have problems. (bare with me and i promise in the end you will have a solution and an understanding why so you will never have problems with AMD drivers on Linux again)
If you google “how to install AMD drivers on Linux” you will inevitably get led down the wrong path and there is no clear and easy way out of that rabbit hole of disasters.
The problem is all the guides are meant for users wanting to game on their system not mine Ethereum so that’s where the first problem arises because you will see everywhere that the AMD drivers are already installed to the kernel, which they are BUT the part you need to mine is not there because AMD did not include the OpenCL drivers in the kernel driver.
Type the command below and see for yourself, you will see the card is recognised and drivers have been loaded.
So now you can see how we can easily be led down the wrong path, are they installed or not?.
Driver Installation: Updated Feb 2022
First and foremost. You want to be on the latest version of Linux with the latest kernel. At the time of writing the details are:-
Ubuntu 21.04 (Kubuntu)EDIT Use Any Ubuntu 20.04 or Debian Bullseye!- Kernel: 5.11 or 5.10
- AMD RX 580 8GB STRIX
You may read online that older drivers are the best option but this is outdated information. All we need to do is install the OpenCL package on its own, without any of the other addons.
First lets install a couple of packages:
sudo apt install build-essential dkms
From here we need to download the drivers from AMD Official Website and unzip the package.
Let’s get an older version of the drivers because we only need the OpenCL component.
wget https://drivers.amd.com/drivers/linux/amdgpu-pro-20.40-1147286-ubuntu-20.04.tar.xz --referer https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-40
Use wget with the code above to download to a terminal, you can also visit the link below to download manually.
Unzip the tar. You may need to install the unzip tools with apt install xz-utils
tar -xJpf amdgpu-pro-*.tar.xz Change into the created directory cd amdgpu-pro-20.40-1147286-ubuntu-20.04
Now you can proceed with the command to install.
./amdgpu-pro-install -y --opencl=pal,legacy,rocm --headless
What this command does is install just the OpenCL driver so you can get your cards mining again on the latest OS! EDIT: It is advised to use Ubuntu 20.04 or Debian Bullseye at the current time.
If that doesn’t work for you and you get errors regarding dkms you can use the no-dkms flag.
./amdgpu-install -y --opencl=pal,legacy,rocr --no-dkms --headless
We can install clinfo to check if OpenCL is installed use
and you should be greeted with something like the below
Number of platforms 1 Platform Name AMD Accelerated Parallel Processing Platform Vendor Advanced Micro Devices, Inc. Platform Version OpenCL 2.1 AMD-APP (3302.5) Platform Profile FULL_PROFILE Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices Platform Extensions function suffix AMD Platform Host timer resolution 1ns Platform Name AMD Accelerated Parallel Processing Number of devices 1 Device Name Ellesmere Device Vendor Advanced Micro Devices, Inc. Device Vendor ID 0x1002 Device Version OpenCL 2.0 AMD-APP (3302.5)
Congratulations, you can get back to mining again.
UPDATE: As an added extra you can also install the Wattman alternative for overclocking. The software is called Corectl and you can get it on GitLab
sudo add-apt-repository ppa:ernstp/mesarc sudo apt-get update
Then unlock power controls by adding “amdgpu.ppfeaturemask=0xffffffff” to your grub file
We need to add «amdgpu.ppfeaturemask=0xffffffff» to the line that starts with GRUB_CMDLINE_LINUX_DEFAULT and add it in like below
GRUB_CMDLINE_LINUX_DEFAULT="quick splash amdgpu.ppfeaturemask=0xffffffff"
We can now install correctrl
sudo apt install corectrl
Now we can control the overclocking voltages and speeds
Below is a picture of corectl stats, if your GPU stats look like this you should change your thermal paste. As i quickly found out soon after posting this.
Here is an image of my GPU stats AFTER applying new thermal paste. 😂
Corectl will ask for root password every time on boot, you can disable this by following the instructions on the corectl setup page HERE
Affiliate Links
Some great affiliate links give you free cash to spend on VPS. If you use these links I will get a small commission if you choose to sign up.
Related Posts
Create an Inline Menu Telegram Bot using Node.js & grammY
Root Your Woox IP Camera For RTSP & Home Assistant
How to Easily Set Up a Personal Email Server in 2022
Install OpenCL Drivers On Ubuntu¶
Note This tutorial is using the OpenCL driver version that we tested. We recommend installing the latest OpenCL packages supported for your OS.
cd neo wget https://github.com/intel/compute-runtime/releases/download/19.07.12410/intel-gmmlib_18.4.1_amd64.deb wget https://github.com/intel/compute-runtime/releases/download/19.07.12410/intel-igc-core_18.50.1270_amd64.deb wget https://github.com/intel/compute-runtime/releases/download/19.07.12410/intel-igc-opencl_18.50.1270_amd64.deb wget https://github.com/intel/compute-runtime/releases/download/19.07.12410/intel-opencl_19.07.12410_amd64.deb wget https://github.com/intel/compute-runtime/releases/download/19.07.12410/intel-ocloc_19.07.12410_amd64.deb
Execute the following command to get a synthetic summary about all OpenCL platforms on the system and the devices they expose:
sudo add-apt-repository ppa:graphics-drivers/ppa
This will provide info on the current long-lived branch release: `nvidia-xxx`
sudo apt update sudo apt install nvidia-driver-xxx
sudo apt update sudo apt install nvidia-driver-xxx
sudo apt update sudo apt install nvidia-xxx
Execute the following command to get a synthetic summary about all OpenCL platforms on the system and the devices they expose:
Radeon no longer supports SPIR on some GPUs, please verify that your GPU drivers support SPIR to be compatible with Zivid Software.
Open a terminal window by pressing Ctrl + Alt + T keys on the keyboard. Create a temporary folder and navigate to it:
wget --referer http://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz
tar -Jxvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz cd amdgpu-pro-20.45-1188099-ubuntu-20.04
For Linux Kernel version 5.8 (Ubuntu LTS HWE stacks), download Radeon Software 20.50 for Linux 20.04:
wget --referer http://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-20.50-1234664-ubuntu-20.04.tar.xz
tar -Jxvf amdgpu-pro-20.50-1234664-ubuntu-20.04.tar.xz cd amdgpu-pro-20.50-1234664-ubuntu-20.04
wget --referer http://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-18.50-725072-ubuntu-18.04.tar.xz
tar -Jxvf amdgpu-pro-18.50-725072-ubuntu-18.04.tar.xz cd amdgpu-pro-18.50-725072-ubuntu-18.04
Warning Zivid no longer supports AMD on Ubuntu 16.04 (AMD dropped support for Ubuntu 16.04 as of Radeon Software 18.50 for Linux).
wget --referer http://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-18.40-673869-ubuntu-16.04.tar.xz
tar -Jxvf amdgpu-pro-18.40-673869-ubuntu-16.04.tar.xz cd amdgpu-pro-18.40-673869-ubuntu-16.04
./amdgpu-pro-install --opencl=pal
Open a terminal window by pressing Ctrl + Alt + T keys on the keyboard. Execute the following command to get a synthetic summary about all OpenCL platforms on the system and the devices they expose:
If clinfo doesn’t print anything, you might have to add your user to group Video . If your system does not boot up after installing the OpenCL driver, click System Boot Error After AMD OpenCL Drivers Installation .
© Copyright Copyright 2015-2021 (C) Zivid AS.