[FIXED] - GNU/Debian - NVidia OpenCL 520.x & 525.x

There is a bug staring with NVidia 520.x driver and not yet fixed in 525.x that breaks the OpenCL compiler. So, if you upgrade to this NVidia version you won’t be able to have OpenCL working in darktable. At the moment the issue is unknown…

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031080

3 Likes

Hm. I have 525.85.05 yet it appears to be working:

[colinadams@fedora ~]$ darktable -debug opencl
[dt_get_sysresource_level] switched to 2 as `large’
total mem: 32007MB
mipmap cache: 4000MB
available mem: 21880MB
singlebuff: 500MB
OpenCL tune mem: OFF
OpenCL pinned: OFF
[opencl_init] opencl related configuration options:
[opencl_init] opencl: ON
[opencl_init] opencl_scheduling_profile: ‘very fast GPU’
[opencl_init] opencl_library: ‘default path’
[opencl_init] opencl_device_priority: ‘/!0,///!0,*’
[opencl_init] opencl_mandatory_timeout: 400
[opencl_init] opencl library ‘libOpenCL.so.1’ found on your system and loaded
[opencl_init] found 1 platform
[opencl_init] found 1 device

[dt_opencl_device_init]
DEVICE: 0: ‘NVIDIA GeForce RTX 3050’
CANONICAL NAME: nvidiageforcertx3050
PLATFORM NAME & VENDOR: NVIDIA CUDA, NVIDIA Corporation
DRIVER VERSION: 525.85.05
DEVICE VERSION: OpenCL 3.0 CUDA, SM_20 SUPPORT
DEVICE_TYPE: GPU
GLOBAL MEM SIZE: 7971 MB
MAX MEM ALLOC: 1993 MB
MAX IMAGE SIZE: 32768 x 32768
MAX WORK GROUP SIZE: 1024
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 1024 1024 64 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: NO
MEMORY TUNING: NO
FORCED HEADROOM: 400
AVOID ATOMICS: NO
MICRO NAP: 250
ROUNDUP WIDTH: 16
ROUNDUP HEIGHT: 16
CHECK EVENT HANDLES: 128
PERFORMANCE: 4.213
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
KERNEL DIRECTORY: /usr/share/darktable/kernels
CL COMPILER OPTION: -cl-fast-relaxed-math
KERNEL LOADING TIME: 0.0525 sec
[opencl_init] OpenCL successfully initialized.
[opencl_init] here are the internal numbers and names of OpenCL devices available to darktable:
[opencl_init] 0 ‘NVIDIA GeForce RTX 3050’
[opencl_init] FINALLY: opencl is AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is ON.
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 0 0 0 0 0
[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 1 1 1 1
[opencl_synchronization_timeout] synchronization timeout set to 0
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 0 0 0 0 0
[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 1 1 1 1
[opencl_synchronization_timeout] synchronization timeout set to 0
1.737845 [dt_opencl_check_tuning] use 6653MB (tunemem=OFF, pinning=OFF) on device `NVIDIA GeForce RTX 3050’ id=0
[opencl_summary_statistics] device ‘NVIDIA GeForce RTX 3050’ (0): 2271 out of 2271 events were successful and 0 events lost. max event=818

1 Like

Interesting… So maybe hitting only some specific cards.

1 Like

I’ve been using 525.85.05 for a while now on Fedora 37 without issues. Maybe a debian specific?

Probably Debian specific yes. I’m exchanging with the Debian maintainer about this. Will come back here when I have more information.

That a minor issue with alternatives not being found properly, to workaround for now:

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/nvidia/current/

And yes that is GNU/Debian specific.

2 Likes

Thank you for the warning.

Debian Stable, release 11.6, Bullseye is currently on nvidia-driver (470.161.03-1) Debian -- Details of package nvidia-driver in bullseye. This should be ok.

Debian Testing, later to become Debian release 12 “Bookworm” is currently on nvidia-driver (520.56.06-2) Debian -- Details of package nvidia-driver in bookworm. This could be affected.

I am on Debian Stable, release 11.6, so I am fine. OpenCL and OpenCL + darktable work for me.

I ugly created a file in the /etc/ld.so.conf.d/ with the path of where the files reside now. Seems to work for me.

You’ll need to remove this as it will probably break something when new fixed upgrade is available.

1 Like

For the record, Andreas the maintainer of NVidia OpenCL on GNU/Debian has a fix and a new version will be pushed soon.

Hence the ugly, but indeed. i will remove it when it’s fixed.

For the record the issue is now fixed in driver version 525.89.02-1 on Debian.

1 Like

Note: while investigating Frequent crashes · Issue #13893 · darktable-org/darktable · GitHub, we have discovered that 525.85 caused some crashes with NVidia 1060 on Ubuntu 22.10 that cannot be reproduced with either 470 (on Ubuntu) or 525.89 (on Debian). This is distinct from the compiler issue: OpenCL is available, but sometimes causes crashes.

1 Like

Thanks @kofa for this important precision.