How to enable OpenCL/OpenCL ROCm for AMD RX 570/580 on Ubuntu 23.04

You installed it in the past with the proprietary opencl libraries, did you try that way(link below) ?

I’m telling you so because I had a RX580 and it worked great with mesa + amd proprietary opencl libraries.

I used
sudo amdgpu-install --usecase=graphics,opencl --no-dkms --no-32 --accept-eula
But that also didn’t work. I think the latest ROCm doesn’t support RX-570

@rgo Yes that worked for me on Ubuntu 22.04 but as DT is no longer updating for Ubuntu 22.04 and it will not be supported for the upcoming 4.4, The DT developer wants to give something cutting edge which not possible in Ubuntu 22.04 but still using OpenCL which the inventor Apple has already years ago deprecated! I upgraded to Ubuntu 23.04 and officially AMD has no official supported drivers for it. Specially OpenCL=legacy requires supported kernel and AMD DKMS, which will fail in Ubuntu 23.04.

As of now I am using DT with Intel NEO driver which are available in 23.04 (which by the way has no impact on speed). The rustcl mesa drivers though enables OpenCL but it is not used by DT as it has no image support!!!

So now I have no clue what to do. Someone suggested that I should switch to some other distro like Arch and it’s like getting myself adopted by a new family at this age!

Well, changing all that code that makes DT fast(i.e. OpenCL) is not that easy. You can try vkdt, that uses vulkan and a totally different paradigm (nodes graph).

It seems that rusticl is able to run darktable: Mesa's "Rusticl" Implementation Now Manages To Handle Darktable OpenCL - Phoronix

Thing is that Mesa 22.3 has it included but not enabled by default. You need to compile it yourself (read somewhere). It’s a pity :sweat:

You could try

sudo amdgpu-install --opencl=legacy --no-dkms

in case that still brings in support for RX570.

Which Intel GPU? For supported Intel GPUs all that is needed (for OpenCL) is:

apt install intel-opencl-icd

(it will pull all other necessary packages).

I am sure you know this for a fact but if not it seems like the latest code from the dev is still being built for 22.04 so are you 100% sure it is not going to run as 4.4 on 22.04 Ubuntu??

Opencl=legacy and no-dkms are mutually exclusive

I have already installed intel-opencl-icd

I think it will not be as master branch for ubuntu 22.04 has no updates after 4.3-1231 or similar for others it is some 2629 and being updated mostly once or twice a week.
By the way I have again shifted to macOS as DT is faster than what I am using on Ubuntu without rx-570 opencl and is the current build thanks to @MStraeten

This migth be the latest amdgpu-pro, which still supports RX570:
https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-22-40

please see the version for 22.04 it is stuck at 4.3.0-git1231 while the rest are at git-2441 and 2435 and there are no updates for the past 1+ months there is a thread regarding this in this forum.

are the OBS repo for darktable dead?

1 Like

May be still worth the try…

it totally screws up the kernel and the system will not be able to boot. I have tried it and have to restore my system from partition image which I periodically create using Disks app after booting from the install USB.

Raj, are you wiling to try my method
(which, among other things, means
that you will NOT be using Ubuntu)?

Have fun!
Claes in Lund, Sweden

It doesn’t do anything with kernel, if you are not using their dkms.
It’s just few libraries and documentation in those legacy packages…

@Claes I have now switched over to Garuda Gnome. I also managed to enable OpenCL for my RX-580. :blush:
There were some hiccups but some how I solved most of the problems.

I am really happy with this migration. Thanks for pushing me in this direction. I hope you wanted me to go on this path??

1 Like

Splendid, @Rajkhand :-)))))))

I hope you wanted me to go on this path??

In that direction, yes!
But actually on a slightly different path; viz. Endeavour OS,
because that is the distro that I presently know the best.
The main thing is of course that you managed to solve most of
your problems.

Have fun!
Claes in Lund, Sweden

For knowledge how you wanted me to enable OpenCL?

I also have the same issue on EndeavourOS. Any pointers? on my old antergos install it worked fine. I was using the legacy pkgbuild from AndyRTR from AUR (en) - opencl-amd Now it does not see my RX 580 on my fresh install.

What did you do to get there?

@Rajkhand @piratenpanda

For knowledge how you wanted me to enable OpenCL?

Honestly: I have no idea, since I do not have that set-up up here.
I based my assumption on the fact that Endeavouros is based
on Arch Linux (as is Garuda!) — which means that it ought to work!

1 Like

Thanks I’ll wait for @Rajkhand to answer then