Opencl support Darktable

Hi.
I have the same distro and roughly similar hardware.
OpenCL was supported by the earlier version but the recent stable version (3.2.1) does no longer support it. Below lines suggest that some libraries are missing. I did not remove them! Any help?


[bulent@bulent-pc ~]$ darktable-cltest
0.024075 [opencl_init] opencl related configuration options:
0.024083 [opencl_init]
0.024085 [opencl_init] opencl: 1
0.024086 [opencl_init] opencl_scheduling_profile: ‘default’
0.024088 [opencl_init] opencl_library: ‘’
0.024090 [opencl_init] opencl_memory_requirement: 768
0.024091 [opencl_init] opencl_memory_headroom: 200
0.024093 [opencl_init] opencl_device_priority: ‘/!0,//
0.024095 [opencl_init] opencl_mandatory_timeout: 200
0.024097 [opencl_init] opencl_size_roundup: 16
0.024098 [opencl_init] opencl_async_pixelpipe: 0
0.024100 [opencl_init] opencl_synch_cache: false
0.024101 [opencl_init] opencl_number_event_handles: 200
0.024103 [opencl_init] opencl_micro_nap: 500
0.024104 [opencl_init] opencl_use_pinned_memory: 0
0.024106 [opencl_init] opencl_use_cpu_devices: 0
0.024107 [opencl_init] opencl_avoid_atomics: 0
0.024108 [opencl_init]
0.024200 [opencl_init] could not find opencl runtime library ‘libOpenCL’
0.024246 [opencl_init] could not find opencl runtime library ‘libOpenCL.so’
0.024300 [opencl_init] could not find opencl runtime library ‘libOpenCL.so.1’
0.024303 [opencl_init] no working opencl library found. Continue with opencl disabled
0.024305 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.024306 [opencl_init] initial status of opencl enabled flag is OFF.

I have just found a clue! It may have to do something with a licensing issue: You may want to avoid Linux Kernel 5.9 if you want fully supported NVIDIA drivers | GamingOnLinux

Are you really using kernel 5.9???

Well, NO!
I am still on 4.19.152-1.
So, there must be something else, I suppose.

Normally, a missing libOpenCL indicates that you/someone forgot to install ocl-icd

1 Like

I’m on Arch and I updated to kernel 5.9 yesterday. My git version of darktable crashes with a seg fault when I select darkroom. The stable version in pacman still seems to work, but neither detect opencl anymore.

1 Like

Thanks, Peter.
Fortunately, my darktable works like charm for all my purposes even without OpenCL.
I can just wait a little for a solution to surface.

Agree. Here’s my package list, I hope you can spot what’s wrong in your setup:

kofa@eagle:~/darktable$ dpkg -l|grep -E -i '(nvidia)|(icd)|(opencl)'|grep '^ii'
ii  clinfo                                                      2.2.18.04.06-1                              amd64        Query OpenCL system information
ii  libmono-system-web-dynamicdata4.0-cil                       6.8.0.105+dfsg-2                            all          Mono System.Web.DynamicData library (for CLI 4.0)
ii  libnvidia-cfg1-450:amd64                                    450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-450                                        450.80.02-0ubuntu0.20.04.2                  all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-450:amd64                                 450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA libcompute package
ii  libnvidia-compute-450:i386                                  450.80.02-0ubuntu0.20.04.2                  i386         NVIDIA libcompute package
ii  libnvidia-decode-450:amd64                                  450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-450:i386                                   450.80.02-0ubuntu0.20.04.2                  i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-450:amd64                                  450.80.02-0ubuntu0.20.04.2                  amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-450:i386                                   450.80.02-0ubuntu0.20.04.2                  i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-450:amd64                                   450.80.02-0ubuntu0.20.04.2                  amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-450:amd64                                    450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-450:i386                                     450.80.02-0ubuntu0.20.04.2                  i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-450:amd64                                      450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-450:i386                                       450.80.02-0ubuntu0.20.04.2                  i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-450:amd64                                    450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ifr1-450:i386                                     450.80.02-0ubuntu0.20.04.2                  i386         NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  nvidia-compute-utils-450                                    450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA compute utilities
ii  nvidia-dkms-450                                             450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA DKMS package
ii  nvidia-driver-430                                           440.100-0ubuntu0.20.04.1                    amd64        Transitional package for nvidia-driver-440
ii  nvidia-driver-440                                           450.80.02-0ubuntu0.20.04.2                  amd64        Transitional package for nvidia-driver-450
ii  nvidia-driver-450                                           450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-450                                    450.80.02-0ubuntu0.20.04.2                  amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-450                                    450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA kernel source package
ii  nvidia-opencl-dev:amd64                                     10.1.243-3                                  amd64        NVIDIA OpenCL development files
ii  nvidia-prime                                                0.8.14                                      all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                                             440.82-0ubuntu0.20.04.1                     amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-450                                            450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA driver support binaries
ii  ocl-icd-libopencl1:amd64                                    2.2.11-1ubuntu1                             amd64        Generic OpenCL ICD Loader
ii  ocl-icd-libopencl1:i386                                     2.2.11-1ubuntu1                             i386         Generic OpenCL ICD Loader
ii  ocl-icd-opencl-dev:amd64                                    2.2.11-1ubuntu1                             amd64        OpenCL development files
ii  opencl-c-headers                                            2.2~2019.08.06-g0d5f18c-1                   all          OpenCL (Open Computing Language) C header files
ii  screen-resolution-extra                                     0.18build1                                  all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-450                               450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA binary Xorg driver

Because the nVidia driver has not been updated to work with kernel 5.9, yet. It should be fixed in 2-3 weeks.

Thanks, yes that seems to be the problem. Dilemma, wait two weeks or downgrade, which is a lot of work as well… :slight_smile:

ocl-icd 2.2.12-4 seems to be installed already.

The only error message I get after running darktable-cltest is this:
“could not get platforms: -1001”.

Still searching…

By the way, I am happy with the performance even without OpenCL.

@bc_the-path
I have Manjaro on two partitions; one Gnome, one KDE.
The other day (on Manjaro/KDE kernel 5.8.16-2), darktable
started to complain about openCL. But it worked just fine
on Manjaro/Gnome kernel 5.8.16-2.

I started to investigate – and got it working by downgrading
proprietary driver video-nvidia-455xx to video-nvidia 450xx.

My GFX is a GTX-1660 Ti (a.k.a TU116).

Have fun!
Claes in Lund, Sweden

1 Like

My video card is GeForce GTx 1050 Ti.
Nvidia Driver version is 430.64.
I guess that is related to my kernel’s age (4.19.152-1) since I am on an earlier LongTermSupport release.
Since it has now become certain that the issue is related to the drivers, I will just wait them to be updated.

Best wishes from Turkey,

Can’t you just install an older kernel package? For example, my Ubuntu 20.04 has packages for kernel 5.0, 5.3, 5.4 and 5.8 (and also 5.6 OEM), if I’m not mistaken.

Different distros have different policies on how many kernels they package. In Arch, there is the linux-lts package if you need to downgrade (which along nvidia-lts are the recommended way to handle the openCL problems until the fix in November).

3 Likes

In Arch Linux, openCL is again working for me with nvidia driver 455.38. Other people on reddit are saying it is not fixed for them, though. But if it works for me, I can’t understand why it wouldn’t work, generally.

I have updated my Manjaro Linux (Rolling Release, Long Term Support) today. The update includes the recent Nvidia driver for my hardware and the libraries related to openCL.
Below are the outputs of test commands (the last one does not seem to tell much about the nature of the problem, except for the “opencl_library” line):

[bulent@bulent-pc ~]$ darktable-cmstest
darktable-cmstest version 3.2.1
this executable was built with colord support enabled
darktable itself was built with colord support enabled

primary CRTC is at CRTC 0
CRTC for screen 0 CRTC 1 has no mode or no output, skipping
CRTC for screen 0 CRTC 2 has no mode or no output, skipping
CRTC for screen 0 CRTC 3 has no mode or no output, skipping

DVI-D-0 the X atom and colord returned the same profile
X atom: _ICC_PROFILE (1492 bytes)
description: DELL 2209WA
colord: “/var/lib/colord/icc/edid-4e5f32af7c2c9b0aea4e77b987788fbb.icc”
description: DELL 2209WA

Your system seems to be correctly configured

[bulent@bulent-pc ~]$ darktable-cmstest
darktable-cmstest version 3.2.1
this executable was built with colord support enabled
darktable itself was built with colord support enabled

primary CRTC is at CRTC 0
CRTC for screen 0 CRTC 1 has no mode or no output, skipping
CRTC for screen 0 CRTC 2 has no mode or no output, skipping
CRTC for screen 0 CRTC 3 has no mode or no output, skipping

DVI-D-0 the X atom and colord returned the same profile
X atom: _ICC_PROFILE (1492 bytes)
description: DELL 2209WA
colord: “/var/lib/colord/icc/edid-4e5f32af7c2c9b0aea4e77b987788fbb.icc”
description: DELL 2209WA

Your system seems to be correctly configured

[bulent@bulent-pc ~]$ darktable-cltest
0.023719 [opencl_init] opencl related configuration options:
0.023727 [opencl_init]
0.023729 [opencl_init] opencl: 1
0.023731 [opencl_init] opencl_scheduling_profile: ‘default’
0.023733 [opencl_init] opencl_library: ‘’
0.023735 [opencl_init] opencl_memory_requirement: 768
0.023737 [opencl_init] opencl_memory_headroom: 200
0.023739 [opencl_init] opencl_device_priority: ‘/!0,//
0.023741 [opencl_init] opencl_mandatory_timeout: 200
0.023744 [opencl_init] opencl_size_roundup: 16
0.023746 [opencl_init] opencl_async_pixelpipe: 0
0.023747 [opencl_init] opencl_synch_cache: false
0.023749 [opencl_init] opencl_number_event_handles: 200
0.023751 [opencl_init] opencl_micro_nap: 500
0.023753 [opencl_init] opencl_use_pinned_memory: 0
0.023755 [opencl_init] opencl_use_cpu_devices: 0
0.023780 [opencl_init] opencl_avoid_atomics: 0
0.023781 [opencl_init]
0.023903 [opencl_init] found opencl runtime library ‘libOpenCL’
0.023915 [opencl_init] opencl library ‘libOpenCL’ found on your system and loaded
0.023922 [opencl_init] could not get platforms: -1001
0.023925 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.023926 [opencl_init] initial status of opencl enabled flag is OFF.


Strangely, I was able to use darktable “with” openCL support about a month or so ago.

Any ideas?

@bc_the-path
Step 1: Dump of your Manjaro settings/Hardware config/mhwd?

Oh, thanks Claes!
I have just finished updating my kernel version to 5.4 and Nvidia driver version to 455.38. Then, I re-installed opencl… (with the help of my son) The problem, whatever it was, is gone.
Now, everything is fine and darktable runs smoothly and saves an ordinary image file in no time!

Thanks very much for paying attention.

2 Likes

OK. that’s the LTS variety of the kernel.
Nvidia 455.38 is modern.

Be grateful to your son.
Good to have them in cases such as this.

1 Like