Install OpenCL For The AMDGPU Open Source Drivers On Debian and Ubuntu -

The 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.
This is a companion discussion topic for the original entry at

You have to install amdgpu-core before you can install any of the other packages.
This MIGHT be a change with 18.50 though.

Tried same approach with debian 10 testing and amdpro drivers 19.30 … unfortunately the package names they are different, and trying to follow the guide “by approximation” lead me to boot with no display working… would You mind updating the tutorial? In the meanwhile I’m on arch, mostly cause I wanted an updated distro, and cause there is a very nice aur package called opencl-amd… (can’t post links since I’m a new user) and it works well in blender and darktable. Maybe it will help out, I think it builds from ubuntu 18.04 package… (but not sure)

My way installing OpenCL from proprietary driver on Debian Buster:

  1. Download radeon driver (tested on Revision 19.30)
  2. Extract files

tar xf amdgpu-pro-19.30-855429-ubuntu-18.04.tar.xz

  1. Rename folder

$ mv amdgpu-pro-19.30-855429-ubuntu-18.04 amdgpu-pro-repo

  1. Move your repository to /opt

$ sudo mv amdgpu-pro-repo /opt

  1. Create your repository

$ sudo nano /etc/apt/sources.list.d/amdgpu-pro.list


deb file:/opt/amdgpu-pro-repo /

  1. Update apt allowing insecure repositories security risks

$ sudo apt update --allow-insecure-repositories

  1. Install legacy opencl driver. Allow again to install non-signed packages.

$ sudo apt install clinfo-amdgpu-pro opencl-orca-amdgpu-pro-icd

Optional steps:
8) Install package clinfo (some aplications use it)

$ sudo apt install clinfo

  1. Remove your repository if you do not want to see more warnings during apt upgrade

$ sudo rm /etc/apt/sources.list.d/amdgpu-pro.list

  1. Remove files if you want to save disk space

$ sudo rm -Rf /opt/amdgpu-pro-repo

Now you have your device with full opencl support. (Tested for AMD RX 570 and RX 550 graphics cards)

To remove the packages simply

$ sudo apt remove --auto-remove clinfo-amdgpu-pro opencl-orca-amdgpu-pro-icd


Thanks You Deleterium! Your solution works perfectly (tried on Debian Testing Buster), and it looks quite future-proof … I mean, if I get it correctly, as soon as the new driver will be ready, it would be a matter of just replacing amdgpu-pro-19.30-855429-ubuntu-18.04 with the newer one, instead of fiddling with files and paths that changes from version to version. I think it needs to be “spotlighted” better…
Strange how such an important feature, such opencl, essential to work with most “pro” graphical and video application haves such a low general interest in the linux community: in most forums, when someone ask expressively about opencl and amdgpu-pro the very superficial answer is : just stick with the opensource drivers, they are better.

Hey Claudio, take a look at ROCm.
Maybe that’s what people refer to when they talk about open source OpenCL drivers. Phoronix has done some comparisons between ROCm and amdgpu-pro and performance is comparable. I’ve even heard rumours of ROCm being mainlined into the kernel (fingers crossed!).

I mostly use Opencl with blender and darktable, and ROCm is not supported by these 2 apps,(specially blender cycles gpu+cpu rendering) or at least, even when compiling from scratch, it works pretty bad

Hi everybody,

I’m also trying to get OpenCL to work on Debian Buster. I tried like @Deleterium described above, but it isn’t working.
I want to use it also with darktable but I’m getting this:

flatpak run org.darktable.Darktable -d opencl
0.135862 [opencl_init] opencl related configuration options:
0.135890 [opencl_init] 
0.135893 [opencl_init] opencl: 1
0.135896 [opencl_init] opencl_library: ''
0.135900 [opencl_init] opencl_memory_requirement: 768
0.135903 [opencl_init] opencl_memory_headroom: 300
0.135906 [opencl_init] opencl_device_priority: '*/!0,*/*/*'
0.135910 [opencl_init] opencl_mandatory_timeout: 200
0.135913 [opencl_init] opencl_size_roundup: 16
0.135918 [opencl_init] opencl_async_pixelpipe: 0
0.135925 [opencl_init] opencl_synch_cache: 0
0.135931 [opencl_init] opencl_number_event_handles: 25
0.135938 [opencl_init] opencl_micro_nap: 1000
0.135944 [opencl_init] opencl_use_pinned_memory: 0
0.135951 [opencl_init] opencl_use_cpu_devices: 0
0.135957 [opencl_init] opencl_avoid_atomics: 0
0.135963 [opencl_init] 
0.136083 [opencl_init] could not find opencl runtime library 'libOpenCL'
0.136131 [opencl_init] could not find opencl runtime library ''
0.137669 [opencl_init] found opencl runtime library ''
0.137709 [opencl_init] opencl library '' found on your system and loaded
0.495312 [opencl_init] found 1 platform
0.495338 [opencl_init] found 1 device
0.495695 [opencl_init] discarding device 0 `AMD Radeon (TM) RX 460 Graphics (POLARIS11, DRM 3.33.0, 4.19.0-6-amd64, LLVM 7.0.1)' due to missing image support.
0.495718 [opencl_init] no suitable devices found.
0.495722 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.495726 [opencl_init] initial status of opencl enabled flag is OFF.

I’m getting the same error message “due to missing image support” with every method I tried.

I’m using a AMD RX 460 egpu connected through an expresscard adapter on my x230.
Could that be the problem? I also tried rocm but it that case that combination (Polaris GPU through PCI 2.0) isn’t supported.

Any ideas would be fantastic, would love to use OpenCL with that setup!
Thanks in advance!

i have a Ryzen 3400G and wanted to use openCL without switching to the DKMS module, so i wrote a small script to activate openCL and VCE (video encoding for handbrake).

Works well on Debian 10 (buster). Feel free to adjust.

Thank you very much Deleterium!
Works like a charm with Mx-linux 19 (based on Debian Buster), RX 570, Revision: 19.50-967956.
Have a nice day!

I’ve tried many different versions of the driver but every single one fails to build the DKMS package.

  1. Fu#k amd!
  2. This guide is a bad way to approach things.

Hello, I tried these steps as well and everything went well except for the DKMS package…didn’t go well. Any work around? I was trudging 'through the nets and came across this bud i’m not sure what to do with it as im not super familiar with linux so a step by step is much easier to navigate.

link to fix possibly? >>> i guess i cant post a link. google “amg pro dkms failure” first askbuntu result

here is what error was

Building initial module for 5.8.0-55-generic
ERROR (dkms apport): unable to determine source package for amdgpu-pro-dkms
Error! Bad return status for module build on kernel: 5.8.0-55-generic (x86_64)
Consult /var/lib/dkms/amdgpu/17.40-492261/build/make.log for more information.
dpkg: error processing package amdgpu-pro-dkms (–install):
installed amdgpu-pro-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:

Hi Sytheii,

Welcome to our forums.

Did you check the logfile the error message mentions?

There may be some hints in this file on what went wrong.