darktable very slow in exporting images

I just moved from Ubuntu 22.04 to Fedora 40. Now exporting processed images from Darktable takes really long. On Ubuntu it was appx 20-25 seconds for 50 images and now each image takes 3 seconds. Same hardware and all export settings are exactly the same. Below is the output of darktable-cltest. Help would be appreciated!

====================================
darktable 4.6.1
Copyright (C) 2012-2024 Johannes Hanika and other contributors.

Compile options:
  Bit depth              -> 64 bit
  Debug                  -> DISABLED
  SSE2 optimizations     -> ENABLED
  OpenMP                 -> ENABLED
  OpenCL                 -> ENABLED
  Lua                    -> ENABLED  - API version 9.2.0
  Colord                 -> ENABLED
  gPhoto2                -> ENABLED
  GMIC                   -> ENABLED  - Compressed LUTs are supported
  GraphicsMagick         -> ENABLED
  ImageMagick            -> DISABLED
  libavif                -> ENABLED
  libheif                -> ENABLED
  libjxl                 -> ENABLED
  OpenJPEG               -> ENABLED
  OpenEXR                -> ENABLED
  WebP                   -> ENABLED

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

     0.0223 [dt_get_sysresource_level] switched to 1 as `default'
     0.0223   total mem:       23974MB
     0.0223   mipmap cache:    2996MB
     0.0223   available mem:   11987MB
     0.0223   singlebuff:      187MB
     0.0322 [dt_dlopencl_init] could not find default opencl runtime library 'libOpenCL'
     0.0323 [dt_dlopencl_init] could not find default opencl runtime library 'libOpenCL.so'
     0.0324 [opencl_init] opencl library 'libOpenCL.so.1' found on your system and loaded, preference 'default path'
     0.0430 [opencl_init] found 1 platform
[opencl_init] found 1 device

[dt_opencl_device_init]
   DEVICE:                   0: 'NVIDIA GeForce GTX 1060 6GB'
   PLATFORM, VENDOR & ID:    NVIDIA CUDA, NVIDIA Corporation, ID=4318
   CANONICAL NAME:           nvidiacudanvidiageforcegtx10606gb
   DRIVER VERSION:           550.90.07
   DEVICE VERSION:           OpenCL 3.0 CUDA, SM_20 SUPPORT
   DEVICE_TYPE:              GPU, dedicated mem
   GLOBAL MEM SIZE:          6064 MB
   MAX MEM ALLOC:            1516 MB
   MAX IMAGE SIZE:           16384 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
   AVOID ATOMICS:            NO
   MICRO NAP:                250
   ROUNDUP WIDTH & HEIGHT    16x16
   CHECK EVENT HANDLES:      128
   TILING ADVANTAGE:         0.000
   DEFAULT DEVICE:           NO
   KERNEL BUILD DIRECTORY:   /usr/share/darktable/kernels
   KERNEL DIRECTORY:         /home/sherebiahtisbi/.cache/darktable/cached_v3_kernels_for_NVIDIACUDANVIDIAGeForceGTX10606GB_5509007
   CL COMPILER OPTION:       -cl-fast-relaxed-math
   CL COMPILER COMMAND:      -w -cl-fast-relaxed-math  -DNVIDIA_SM_20=1 -DNVIDIA=1 -I"/usr/share/darktable/kernels"
   KERNEL LOADING TIME:       0.0181 sec
[opencl_init] OpenCL successfully initialized. internal numbers and names of available devices:
[opencl_init]		0	'NVIDIA CUDA NVIDIA GeForce GTX 1060 6GB'
     0.1415 [opencl_init] FINALLY: opencl is AVAILABLE and ENABLED.
[opencl_init] opencl_scheduling_profile: 'default'
[opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
[opencl_init] opencl_mandatory_timeout: 400
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] 		image	preview	export	thumbs	preview2
[dt_opencl_update_priorities]		0	-1	0	0	-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]		0	0	0	0	0
[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]		0	-1	0	0	-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]		0	0	0	0	0
[opencl_synchronization_timeout] synchronization timeout set to 200```

OK, then the next step is to run darktable with some flags:
darktable -d perf -d opencl

And then export an image and see which modules are executed on the GPU, which on the CPU, and what is slow.

BTW, you can make logs more readable like this:

```text
some
log
lines
```

That will appear as (all monospaced, no jumping between formatted and unformatted mode):

some
log
lines
1 Like

In rush I ignored markdown but will ensure I do going forward.

By the way when i open DT now with the command darktable -d perf -d opencl I see multiple issues

  • all my collections, tagging is gone.
  • When I try to add RAW images to library in the file dialog it does not show any RAW files, lists only Jpgs.
  • Drag and drop CR3 to ligttable says “error loading file…”

That really should not happen. Do you normally launch darkable using an icon? If so, does it have custom parameters, e.g. for the library?
Are there perhaps multiple versions installed? Native package or self-compiled, snap, flatpak?

I usually launch it using icon. I am not at the desk right now but best to my recollection I installed it from Flatpak but need to double check.

The version in flatpak requires a different command to run. So, I suspect you have both a flatpak and a ‘native’ version. The flatpak may not have the Nvidia drivers (they have to be installed in the flatpak separately).

Anyway, we’ll know more once you can figure out what the launcher icon does.

I just took a wild guess on what to do next and built the dependecies again with :
sudo dnf builddep darktable

I am not sure what did it do but upon launching darktable normally using icon i saw OpenCL related messages for few seconds. I have all my collections/tags and everything seems to be working fine now.