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

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

I installed opencl-amd (1.5.5.1-1) package from chaotic aur
but when I ran clinfo I got an error stating that it could not locate “libamdocl-orca64.so” lib and there was no OpenCL. So I searched the net with this file name and I happened to arrive at This Page.
On this page search for

libamdocl-orca64.so

you will arrive a comment by dagrim

I have OpenCL working in Ubuntu 20.04 with an RX570. Here is what I did :

    install ROCm 4.5.2
    get the 21.10 Radeon Software for Linux for Ubuntu 20.04 .tar.xz from here : https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-10
    extract the .tar.xz
    extract the opencl-orca-amdgpu-pro-icd_21.10-1247438_amd64.deb and ocl-icd-libopencl1-amdgpu-pro_21.10-1247438_amd64.deb files
    check that you get those 4 files : opt/amdgpu-pro/lib/x86_64-linux-gnu/{libamdocl12cl64.so,libamdocl-orca64.so,libOpenCL.so.1.2,libOpenCL.so.1}
    put those 4 files into a custom directory, say /opt/myopencl/lib/
    create a new file /etc/OpenCL/vendors/myopencl.icd with only 1 line : /opt/myopencl/lib/libamdocl-orca64.so
    try clinfo ; here is what I get :

I didn’t install ROCm 4.5.2 but followed the rest. OpenCL started working but clinfo will still give the error of not finding “libamdocl-orca64.so” so I just copied this file in /usr/lib (I don’t know the side effect) Now no error and opencl works in Darktable as well as geekbench6 --compute.

The linked page has so many solutions hope one of them makes your system work. I am not an expert by any chance but I try different things.

2 Likes

thanks, i somehow forgot about this thread. And it seems to work fine after copying the files so thank you very much for the pointer!

1 Like
sudo echo   'ROC_ENABLE_PRE_VEGA=1' >> /etc/environment

also from this thread. This makes it work with the standard amd-opencl package with no more changes. Just set it and reboot. Logging out and in most likely works too but I did not test it

1 Like