Can't enable OpenCL for AMD RX 5700 XT on Linux

Using Ubuntu 19.10, I seem to be having trouble getting OpenCL to work on Blender 2.81. It’s not being recognized in the settings. I’ve tried it with amdgpu pro 19.30 drivers and Oibaf PPA.

Anyone else experience this?

After hours of trial and error, I’ve managed to get it to work. I’ve narrowed down the necessary debs to these lot:

  • amdgpu-core_19.30-855429_all.deb
  • amdgpu-pro-core_19.30-855429_all.deb
  • clinfo-amdgpu-pro_19.30-855429_amd64.deb
  • libdrm2-amdgpu_2.4.98-855429_amd64.deb
  • libdrm-amdgpu-amdgpu1_2.4.98-855429_amd64.deb
  • libdrm-amdgpu-common_1.0.0-855429_all.deb
  • libopencl1-amdgpu-pro_19.30-855429_amd64.deb
  • opencl-amdgpu-pro-comgr_19.30-855429_amd64.deb
  • opencl-amdgpu-pro-icd_19.30-855429_amd64.deb

All found in the AMD proprietary driver.

as far as I know, the easiest way to get opencl is to have the proprietary drivers by amd

Thanks. I believe I’ve mentioned that I tried the AMD drivers in the original post, the problem was it wasn’t working with the recommended procedure that used to work with my previous card. I’ve updated the post so this might shed some light if someone else faces this problem.


rlamorato, how did you get past the amdgpu pro 19.30 drivers only wanting to install on Ubuntu 18.x?

I’m running 19.10 and an RX 5700 XT as well. Ended up having to purge everything amd and just use mesa, but now clinfo shows no GPUs found and my go bots (which depend on OpenCL) don’t work.

If you could elaborate a bit on your process of getting from AMD’s drivers for 18.x to a working installation on 19.10 I’d be very grateful.

Tried the RX 5700 XT on kernel 5.3.13 with Mesa 19.2.6 and opencl-amd

I ended up by replacing the RX 5700 XT with an old RX 480 … would be nice if AMD would work harder on its mesa integration so that we can use AMD mesa opencl >= 1.2

My final RX 5700 XT solution on Archlinux was to create the amdgpu-pro-installer from AUR and install this packages:

opencl-amdgpu-pro-comgr 19.30_934563-1
opencl-amdgpu-pro-dev 19.30_934563-1
opencl-amdgpu-pro-orca 19.30_934563-1
opencl-amdgpu-pro-pal 19.30_934563-1


Hello, the easiest method I know how is to edit /etc/os-release and find the line with VERSION_ID and replace it with 18.04. Just make sure you change it back after installing the drivers.

Hey guys. I have the (k)ubuntu 18.04 LTS but just decided to extract the opencl libraries and drivers manually from the pro drivers. Users cannot be expect to do this, but gives a far cleaner install IMO.
The opensource drivers work great for display and eevee. One thing to remember about about the opencl drivers is that they are separate and unrelated to display drivers.
You only need these libraries (re: 18.20 opencl that I’m using) extracted.

Put in a custom lib directory and add an entry to /etc/ run ldconfig. Make sure you have proper *.icd entries in /etc/OpenCL/vendors
test with clinfo (apt install clinfo).
If clinfo sees it blender should also.

These are the debs required for my case:


extract using dpkg-deb -x pay attention to the /etc/OpenCL/vendors entries. No more pesky multi-arch enforcement with the idiotic and inflexible amdgpu-install script or wondering why --no-dkms still insists on building the kernel module that you don’t need. Guys, this is terrible, I’m glad I spend a day on this sorting it all out for my use case. If this continues with AMD on linux my next GPU will not be AMD.


Thanks to this thread I’ve managed to enable OpenCL rendering on my Radeon VII.
Here is the list of installed packages. I just dpkg -install them in exact order.


Here is part of dependency graph:

DKMS and amdgpu-dkms install fails on kernel 5.4.0-0.

It’s not needed the kernel driver should suffice. However if it’s just OpenCL I would suggest only the packages I listed and stick with opensource drivers for X, since they are superior (I use oibaf ppa).
clinfo and loader is supplied by the packages clinfo and ocl-icd-libopencl1 respectively.
Glad you got it working, but AMD’s debs and installer causes more problems than it solves.

You are right. AMD needs to get their sh*t together with this.


This script must work, but needs to be updated sometimes

so I have made it a bit flexible
you can follow it and make OpenCL working
I am not a professional by any means but the modded script will work for any amdgpu driver version, just it needs a bit of manual work, just refer the README file
below is the link if above script fails try it