help - how to activate OpenCL accel - linux Mint

I need some directions on how to activate OpenCL acceleration because Darktable works badly without acceleration. DT is slow and needs a lot of processing power. Flatpak and AppImage are not even an alternative, since performance is bad and OpenCL acceleration is inacessible too.

AMD ROCm is active but all options under OpenCL acceleration are grayed out.

clinfo
Number of platforms:				 2
  Platform Profile:				 FULL_PROFILE
  Platform Version:				 OpenCL 2.1 AMD-APP (3625.0)
  Platform Name:				 AMD Accelerated Parallel Processing
  Platform Vendor:				 Advanced Micro Devices, Inc.
  Platform Extensions:				 cl_khr_icd cl_amd_event_callback 
  Platform Profile:				 FULL_PROFILE
  Platform Version:				 OpenCL 1.1 Mesa 23.2.1-1ubuntu3.1~22.04.4
  Platform Name:				 Clover
  Platform Vendor:				 Mesa
  Platform Extensions:				 cl_khr_icd


  Platform Name:				 AMD Accelerated Parallel Processing
Number of devices:				 0
  Platform Name:				 Clover
Number of devices:				 0

I tried to update

sudo apt-get install --only-upgrade mesa-opencl-icd
sudo apt-get install --only-upgrade ocl-icd-libopencl1

but in both cases, drivers are the newest version and don’t need any updates.

darktable-cltest 
darktable 5.6.1 [linux]
Copyright (C) 2012-2026 Johannes Hanika and other contributors.

Compile options:
  Bit depth              -> 64 bit
  Exiv2                  -> 0.27.5
  Lensfun                -> 0.3.2
  Debug                  -> DISABLED
  SSE2 optimizations     -> ENABLED
  OpenMP                 -> ENABLED
  OpenCL                 -> ENABLED
  Lua                    -> ENABLED  - API version 9.7.0
  Colord                 -> ENABLED
  gPhoto2                -> ENABLED  - Camera tethering is available
  OSMGpsMap              -> ENABLED  - Map view is available
  GMIC                   -> ENABLED  - Compressed LUTs are supported
  GraphicsMagick         -> ENABLED
  ImageMagick            -> DISABLED
  libavif                -> ENABLED
  libheif                -> DISABLED
  libjxl                 -> DISABLED
  LibRaw                 -> ENABLED  - Version 0.22.0-Release
  OpenJPEG               -> ENABLED
  OpenEXR                -> ENABLED
  WebP                   -> ENABLED
  AI                     -> ENABLED

See https://www.darktable.org/resources/ for detailed documentation.
See https://github.com/darktable-org/darktable/issues/new/choose to report bugs.

[dt_get_sysresource_level] switched to `default'
  total mem:       31829MB
  available mem:   15914MB
  singlebuff:      248MB
[opencl_init] opencl disabled via darktable preferences
[opencl_init] opencl library 'libOpenCL' found on your system and loaded, preference 'default path'
[opencl_init] found 2 platforms
[opencl_init] no devices found for Advanced Micro Devices, Inc. (vendor) - AMD Accelerated Parallel Processing (name)
[check platform] platform 'Clover' with key 'clplatform_clover' is NOT active
[opencl_init] found 0 device
[opencl_init] FINALLY: opencl PREFERENCE=NO is NOT AVAILABLE and NOT ENABLED

these lines look interesting:

[opencl_init] no devices found for Advanced Micro Devices, Inc. (vendor) - AMD Accelerated Parallel Processing (name)
[check platform] platform 'Clover' with key 'clplatform_clover' is NOT active

Did you try turning it on in preferences?

1 Like

wow, strange. AMD ROCm is active, should I activate Other platforms as well?

I checked all menus for other OpenCL settings, but can’t find other toggles/buttons to activate opencl.

Can you post a screenshot of your preference performance?

1 Like

sure gladly. What terminal command is needed, please?

from the GUI. The preference settings

1 Like

The first check box is gray out (nicht verfurgar). Your clinfo is not finding any device.

1 Like

I checked if ROCm is installed. Correct me if I’m wrong:

apt show rocm-libs -a
Package: rocm-libs
Version: 6.2.0.60200-66~22.04
Priority: optional
Section: devel
Maintainer: ROCm Dev Support <rocm-dev.support@amd.com>
Installed-Size: 13,3 kB
Depends: hipblas (= 2.2.0.60200-66~22.04), hipblaslt (= 0.8.0.60200-66~22.04), hipfft (= 1.0.14.60200-66~22.04), hipsolver (= 2.2.0.60200-66~22.04), hipsparse (= 3.1.1.60200-66~22.04), hiptensor (= 1.3.0.60200-66~22.04), miopen-hip (= 3.2.0.60200-66~22.04), half (= 1.12.0.60200-66~22.04), rccl (= 2.20.5.60200-66~22.04), rocalution (= 3.2.0.60200-66~22.04), rocblas (= 4.2.0.60200-66~22.04), rocfft (= 1.0.28.60200-66~22.04), rocrand (= 3.1.0.60200-66~22.04), hiprand (= 2.11.0.60200-66~22.04), rocsolver (= 3.26.0.60200-66~22.04), rocsparse (= 3.2.0.60200-66~22.04), rocm-core (= 6.2.0.60200-66~22.04), hipsparselt (= 0.2.1.60200-66~22.04), composablekernel-dev (= 1.1.0.60200-66~22.04), hipblas-dev (= 2.2.0.60200-66~22.04), hipblaslt-dev (= 0.8.0.60200-66~22.04), hipcub-dev (= 3.2.0.60200-66~22.04), hipfft-dev (= 1.0.14.60200-66~22.04), hipsolver-dev (= 2.2.0.60200-66~22.04), hipsparse-dev (= 3.1.1.60200-66~22.04), hiptensor-dev (= 1.3.0.60200-66~22.04), miopen-hip-dev (= 3.2.0.60200-66~22.04), rccl-dev (= 2.20.5.60200-66~22.04), rocalution-dev (= 3.2.0.60200-66~22.04), rocblas-dev (= 4.2.0.60200-66~22.04), rocfft-dev (= 1.0.28.60200-66~22.04), rocprim-dev (= 3.2.0.60200-66~22.04), rocrand-dev (= 3.1.0.60200-66~22.04), hiprand-dev (= 2.11.0.60200-66~22.04), rocsolver-dev (= 3.26.0.60200-66~22.04), rocsparse-dev (= 3.2.0.60200-66~22.04), rocthrust-dev (= 3.0.1.60200-66~22.04), rocwmma-dev (= 1.5.0.60200-66~22.04), hipsparselt-dev (= 0.2.1.60200-66~22.04)
Homepage: https://github.com/RadeonOpenCompute/ROCm
Download-Size: 1.056 B
APT-Sources: https://repo.radeon.com/rocm/apt/6.2 jammy/main amd64 Packages
Description: Radeon Open Compute (ROCm) Runtime software stack

if I follow the instructions of AMD,
sudo amdgpu-install --usecase=rocm --no-dkms

the installer tells me new packages will eat away 32 GB of space. I doubt this is the right path

I don’t know Ubuntu.

I should try to use Rustic instead, so I’ve added:
/etc/profile.d/rusticle-conf.sh

with
export RUSTICL_ENABLE=radeonsi

tomorrow I can tell more if this worked for me. Today it is already late for me. Thanks so far, g-man.

Edit
NO, cold reboot didn’t unlock RustiCL. The package required to make RustiCL work is mesa-opencl-icd but that one is already the latest for my OS, jammy (Ubuntu 22.04)

I guess installing ROCm in a Docker container could be the solution, but this is new terrain for me…anyone willing to enlighten me if my idea is the right way and maybe wants to explain how to do it too?

1 Like

Have you seen

Whatever driver you have now only supports open cl version 1.1

darktable needs at least open cl 1.2.

“clover” is not supported anyway as it’s not supported any more and has been “replaced” by rusticl.

Isn’t this too old for anything useful for AMD from RustiCL?

Isn’t there a way to install higher version of openCl with docker? just asking.
I understand upgrades is the normal development of software, still the peace increased in the past 10 years and I don’t like that.

If docker can’t help me, what are the latest version of DT supporting openCl 1.1? I guess the versions available in Mints’ Software repo, that should be min DT v3.9.x and max DT v4.6.x

Good to know that RustiCL improved so much, to be the favorite opencl driver: 2 years ago, rusticl was just experimental, therefore my preference to install rocm hip.

Well, old is relative. Only a few software force me from time to time to upgrade. I’m happy if I need to do less for my computer and can focus more on the content I’m producing.

The other day I checked for opencl drivers on my system and found out, rusticl is actually installed, but DT is picky and therefore it doesn’t use older versions at all. A pity, because older drivers should be at least a fallback (better than nothing) if newer drivers are missing.

Interesting.
Since Rusticl is now the new default opencl driver, will users get some LTS backward compatibility for older rusticl drivers as well ? would be a great benefit if DT would be less picky with drivers!

It looks like you have two drivers. One should work, but it all depends on your OS and your settings. darktable just uses the drivers you installed. Your OS is from April 2022.

I dont think docker will work. It will be inside a container and how will the OS (or dt) reach it?