Appreciate the help, but it didn’t work. I did get it to install after reading on AMDs website. I think I installed way more than I needed, not to worry however. Oh and yes, it did pop up a text box to get me to accept the EULA.
Unfortunately Darktable still cannot use opencl on my system (same startup message)
Getting following error ERROR: using '--no-dkms' with '--opencl=legacy' is not supported
can someone explain meaning of --no-dkms and why it is required?
[opencl_init] OpenCL successfully initialized.
[opencl_init] here are the internal numbers and names of OpenCL devices available to darktable:
[opencl_init] 0 'Intel(R) UHD Graphics 630 [0x3e92]'
[opencl_init] 1 'Ellesmere'
[opencl_init] FINALLY: opencl is AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is ON.
[opencl_init] set scheduling profile to default.
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 1 0 1 0 0
[dt_opencl_update_priorities] -1 -1 0 1 1
[dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 1 0 1 1 1
[opencl_synchronization_timeout] synchronization timeout set to 200
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 1 0 1 0 0
[dt_opencl_update_priorities] -1 -1 0 1 1
[dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 1 0 1 1 1
[opencl_synchronization_timeout] synchronization timeout set to 200
In my case I never had this error. As I am not an expert for many days I was experimenting, installing/uninstalling various things, but am not sure why today I was able to get success so I am sending you my terminal History file of all the trial and errors of past many days. I only got success in line 917.
Hope some expert can analyze and shade some light
DKMS refers to Linux’s Dynamic Kernel Module Support. The error message is saying that a dynamically loaded kernel module is required for legacy OpenCL support.
I’m not on a Linux machine at the moment, but you should be able to find the tools to build kernel modules pretty readily.
The “–no-dkms” parameter for the amdgpu-install command opts out of installing AMD’s proprietary (closed-source) drivers into your linux kernel. I believe the proprietary drivers are required for the legacy implementation of OpenCL.
Unfortunately, installing OpenCL often takes some fiddling and trial and error to get it installed correctly. The clinfo command is your friend. Focus on getting clinfo to see your graphics card first, and in all likelihood darktable will take care of itself after that. If you can see your card in clinfo and are still having problems, darktable has their own documentation on troubleshooting OpenCL.
I gave up with my AMD gpu (RX 5500 XT) 2 months ago after a year of no OpenCL on Linux/Darktable ( a major pain performance-wise even on a 12-core Ryzen), and many, many, many wasted weeks of fiddling/googling/installing/trying to fix. I concluded AMD driver support for Linux is too poor to commit any more of my time and my post-processing to any longer so I bought a Nvidia RTX 3070. After replacing the AMD and booting the OS (Mint 20.3 Cinnamon) I selected Install Nvidia drivers in the desktop drivers panel and 2 MINUTES later I had fully operational graphics and OpenCL, plus a very nice config/diagnostic gui! Plus no issues since, during which there have been 2 OS updates.
Prior to Autumn 2021, for about a year I had OpenCL from the AMDGPU-PRO package running alongside the open-source amdgpu drivers, on the workstation running OpenSuse Leap 15.1. It did take me quite a while to get the OpenCL installed as I found it needed a kernel several releases higher than the default Leap stable version. Importantly the AMD installer at that time did not recompile dkms (it used the --no-dkms option) and there was a reasonable amount of shared experience on the forums.
I guess a Leap 15.1 update Autumn 2021 time mangled some dependencies and caused OpenCL to start giving problems which after an upgrade to DT 3.8 would then freeze the system completely. Disable opencl in DT and everything was ok, so it was an Opencl issue.
I did a clean install of Leap 15.2 and installed the same version of AMDGPU-PRO OpenCL (ie the old installer). Installed ok but same freeze-ups. Back to no OpenCL.
I clean installed Leap 15.3 and the AMDGPU-PRO package marked ‘for Leap 15.3’ on the AMD website. This came with the new installer which DOES recompile dkms (hence the removal of the --no-dkms option). I found this installer downloads AMD own repository of kernel source code against which the specific version of the AMDGPU-PRO drivers have been tested, and mixes this code base with whatever version of the kernel you have installed when compiling/making dkms. What a surprise when it fails to compile/make because your kernel is too far behind (or ahead of) their sources! AMD don’t even mention which kernel version they tested against in their release notes. Also the kernel version you have affects other components that AMDGPU-PRO OpenCL needs but these version dependencies also aren’t mentioned (eg c-compiler version). Recipe for version-msimatch hell! I updated to the latest stable kernel and tried again but compile/make errors, now the kernel was too new! I eventually gave up and reverted to 15.2 .
Then I installed Mint 20.3 Cinnamon and the latest AMD package for that OS. It failed to compile dkms regardess of which kernel I tried. I didn’t have the time to waste so I went back to Leap 15.2 and no Opencl.
A major frustration is that most info on forums etc is out of date and not relevent to the new AMD install/compile process. But the lack of info on the AMD website is shocking. Nvidia have much, much more, and an install method that is built into Linux (at least the distros I’ve used). When I built the workstation early 2020, the general consensus of comments was that AMD were better than Nvidia for linux support, hence my choice of AMD gpu. A lot changes in a couple of years!
Thanks for sharing your experience.
My problem is that I cannot replace AMD with Nvidia as Its a dual boot system with macOS Big Sur and Ubuntu 22.04 and macOS only supports AMD GPUs.
Though openCL is working but now my Ubuntu will sometimes wake from suspend but mostly will freeze with black screen with only option to reboot.
After upgrading to v4, I invested some time to get OpenCL running on my RX560 on Linux Mint 21, based on Ubuntu 22.04. It was shortly before I was given an RX480 for cheap which is why I knew that once I get it going on the RX560, the RX480 will run plug’n’play as well. And it did.
To save you the time I had to invest:
the stock driver does not support opencl.
the rocm-opencl implementation established opengl recognition, but the missing “image” feature for those old Polaris chips ment that it was no use to darktable.
there is no need to install the “pro” version of AMD closed source driver using the use case “workstation”, opencl will be available in the “graphics” version as well, at least when installing it with the opencl flag.
the version on AMD website causes the mentioned package dependency errors and cannot be installed on Linux Mint 21 and maybe similar OS as well.
amd has a version of the drivers online that is only to be found when browsing the directories. It is newer than those linked on their main site and installs just fine in Linux Mint 21.
No updates on the driver? Opencl still broken with amdgpu.
*** The OpenCL driver doesn’t provide image support. See also ‘clinfo’ output ***
Using an old R390x that is supposed to be supported by the driver as it is specified on the released notes.
Tried all installing methods and driver versions and none have worked for me on ubuntu 22.04.1.
[dt_opencl_device_init]
DEVICE: 0: ‘AMD Radeon R9 390 Series (hawaii, LLVM 13.0.1, DRM 3.46, 5.15.0-52-generic)’
CANONICAL NAME: amdradeonr9390serieshawaiillvm1301drm346515052generic
PLATFORM NAME & VENDOR: Clover, Mesa
DRIVER VERSION: 22.0.5
DEVICE VERSION: OpenCL 1.1 Mesa 22.0.5
DEVICE_TYPE: GPU
*** The OpenCL driver doesn’t provide image support. See also ‘clinfo’ output ***
[opencl_init] no suitable devices found.
[opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is OFF.
[imageio_load_module_format] failed to open `avif’: (null)
It seems to be a driver problem. Clinfo detects the gpu but spews out :
*** The OpenCL driver doesn’t provide image support. See also ‘clinfo’ output ***
Gpu works fine but no opencl support!!! Drivers installed correctly and user group permission video:render assigned properly.
Trying all the install methods to be able to use opencl in darktable with an old r390x.
Rocm does seem to have a problem with imaging even if the gpu is supported as detailed in the release papers.
dlerror: libamdocl-orca64.so: cannot open shared object file: No such file or directory
Number of platforms 2
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 22.0.5
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.1 AMD-APP (3486.0)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback
Platform Extensions function suffix AMD
Platform Host timer resolution 1ns
Platform Name Clover
Number of devices 1
Device Name AMD Radeon ™ R9 390 Series (hawaii, LLVM 13.0.1, DRM 3.46, 5.15.0-52-generic)
Device Vendor AMD
Device Vendor ID 0x1002
Device Version OpenCL 1.1 Mesa 22.0.5
Device Numeric Version 0x401000 (1.1.0)
Driver Version 22.0.5
Device OpenCL C Version OpenCL C 1.1
Device Type GPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Max compute units 44
Max clock frequency 1080MHz
Max work item dimensions 3
Max work item sizes 256x256x256
Max work group size 256
Preferred work group size multiple (kernel) 64
Preferred / native vector sizes
char 16 / 16
short 8 / 8
int 4 / 4
long 2 / 2
half 0 / 0 (n/a)
float 4 / 4
double 2 / 2 (cl_khr_fp64)
Half-precision Floating-point support (n/a)
Single-precision Floating-point support (core)
Denormals No
Infinity and NANs Yes
Round to nearest Yes
Round to zero No
Round to infinity No
IEEE754-2008 fused multiply-add No
Support is emulated in software No
Correctly-rounded divide and sqrt operations No
Double-precision Floating-point support (cl_khr_fp64)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Address bits 64, Little-Endian
Global memory size 27487790692 (25.6GiB)
Error Correction support No
Max memory allocation 6871947673 (6.4GiB)
Unified memory for Host and Device No
Minimum alignment for any data type 128 bytes
Alignment of base address 32768 bits (4096 bytes)
Global Memory cache type None
Image support No
Local memory type Local
Local memory size 32768 (32KiB)
Max number of constant args 16
Max constant buffer size 67108864 (64MiB)
Max size of kernel argument 1024
Queue properties
Out-of-order execution No
Profiling Yes
Profiling timer resolution 0ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
ILs with version (n/a)
Built-in kernels with version (n/a)
Device Extensions cl_khr_byte_addressable_store cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64 cl_khr_extended_versioning
Device Extensions with Version cl_khr_byte_addressable_store 0x400000 (1.0.0)
cl_khr_global_int32_base_atomics 0x400000 (1.0.0)
cl_khr_global_int32_extended_atomics 0x400000 (1.0.0)
cl_khr_local_int32_base_atomics 0x400000 (1.0.0)
cl_khr_local_int32_extended_atomics 0x400000 (1.0.0)
cl_khr_int64_base_atomics 0x400000 (1.0.0)
cl_khr_int64_extended_atomics 0x400000 (1.0.0)
cl_khr_fp64 0x400000 (1.0.0)
cl_khr_extended_versioning 0x400000 (1.0.0)
Platform Name AMD Accelerated Parallel Processing
Number of devices 0
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, …) No platform
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, …) No platform
clCreateContext(NULL, …) [default] No platform
clCreateContext(NULL, …) [other] Success [MESA]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name Clover
Device Name AMD Radeon ™ R9 390 Series (hawaii, LLVM 13.0.1, DRM 3.46, 5.15.0-52-generic)
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
Platform Name Clover
Device Name AMD Radeon ™ R9 390 Series (hawaii, LLVM 13.0.1, DRM 3.46, 5.15.0-52-generic)
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)
Platform Name Clover
Device Name AMD Radeon ™ R9 390 Series (hawaii, LLVM 13.0.1, DRM 3.46, 5.15.0-52-generic)