ObjectiveInstall the OpenCL portion of the AMDGPU-PRO drivers on Debian and Ubuntu.
DistributionsDebian and Ubuntu
RequirementsA working install of Debian or Ubuntu with root privileges
- # - requires given linux command to be executed with root privileges either directly as a root user or by use of
- $ - given linux command to be executed as a regular non-privileged user
IntroductionThe proprietary AMDGPU-PRO drivers only support a select small subset of Linux distributions. Non-LTS Ubuntu releases aren't supported, and Debian users are completely out of luck. To make things worse, AMD doesn't provide OpenCL support through their open source drivers.
There is good news. You can install just the OpenCL parts of the AMDGPU-PRO drivers on your Debian or Ubuntu system using the packages provided by AMD. There's a very specific way that you need to go about it, but it can be done, making things like mining cryptocurrency on an AMD card possible.
WARNING: This may interfere with your existing drivers, resulting in poor performance and instability. Proceed with caution.
Install The PrerequisitesBefore you get started, you're going to need a couple of packages. Install them.
$ sudo apt install build-essential dkms
Get the AMDGPU-PRO DriversNext, you'll need to download the latest AMDGPU-PRO packages for Ubuntu from AMD. AMD decided to make this as unnecessarily difficult as possible and locked newer packages to fail unless being installed on a supported Ubuntu release, so you're going to need an older release which you can find in the release notes for that release. Download the tarball for Ubuntu.
Unpack the tarball, either with your graphical archive manager or using
$ tar -xJpf amdgpu-pro-*.tar.xz
Install The OpenCL PackagesYou'll need to install a set of packages in order to get OpenCL support. Go to the directory where you unpacked the tarball. You'll need to use
dpkgto install them all separately. These packages need to be installed in a very specific order. Follow the order below.
$ sudo dpkg -i ... amdgpu-pro-core libopencl1-amdgpu-pro clinfo-amdgpu-pro opencl-amdgpu-pro-icd amdgpu-pro-dkms libdrm2-amdgpu-pro ids-amdgpu-pro libdrm-amdgpu-pro-amdgpu1