Hi all,
Recently I’ve been having some performance issues with darktable (a RAW image processor).
Up until about a week ago it utilized OpenCL for certain operations just as it should on my Intel UHD 630 iGPU.
Whether or not it made any appreciable difference compared to normal CPU rendering I don’t know for sure but I liked having it as an option.
Unfortunately as of late darktable kept eating up all of my system’s memory (16GB DDR4) and would often crash as a result.
Not being able to resolve the issue, I just used zypper to remove darktable altogether and deleted all of it’s related configuration files in ~/.config and /usr/share and reinstalled it.
Still doesn’t run as smoothly as I’d like it to, but we’ll attribute that to this computer not being particularly modern.
At least darktable didn’t crash anymore, however when launching it from a console with debugging enabled I noticed that it wasn’t using OpenCL for GPU rendering anymore.
me@Tumbleweed:~> darktable -d opencl
darktable 5.0.0
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.4.0
Colord → ENABLED
gPhoto2 → ENABLED
GMIC → ENABLED - Compressed LUTs are supported
GraphicsMagick → DISABLED
ImageMagick → DISABLED
libavif → ENABLED
libheif → ENABLED
libjxl → ENABLED
LibRaw → ENABLED - Version 0.21.2-Release
OpenJPEG → ENABLED
OpenEXR → ENABLED
WebP → ENABLEDSee resources | darktable for detailed documentation.
See Sign in to GitHub · GitHub to report bugs.0.0001 [dt starting]
darktable -d opencl
0,1714 [dt_get_sysresource_level] switched to 1 as `default’
0,1714 total mem: 15735MB
0,1714 mipmap cache: 1966MB
0,1714 available mem: 7867MB
0,1714 singlebuff: 122MB
0.1909 [opencl_init] opencl disabled via darktable preferences
0.1912 [opencl_init] opencl library ‘libOpenCL’ found on your system and loaded, preference ‘default path’
0.2006 [opencl_init] 0 platforms detected, error: Unknown OpenCL error
0.2006 [opencl_init] FINALLY: opencl PREFERENCE=OFF is NOT AVAILABLE and NOT ENABLED.
In “Compile options” it shows “OpenCL → ENABLED” yet further down we see “[opencl_init] opencl disabled via darktable preferences” which is odd because the option to enable OpenCL is grayed out in darktable’s settings.
Next I ran clinfo to verify OpenCL was correctly installed, and as it turned out, it wasn’t anymore.
Output of clinfo:
Number of platforms 0
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.3.1
ICD loader Profile OpenCL 3.0
It seems unlikely this had anything to do with reinstalling darktable and I didn’t touch any OpenCL related files. However if I remember correctly in between this and noticing the lack of OpenCL usage, the Intel graphics drivers got updated, so maybe that threw a wrench in the works?
I used YaST Software manager to reinstall the Intel graphics drivers (i915) and anything related to OpenCL that I could find, rebooted and tried again. Same result.
After searching the internet for a couple of hours a few things seemed amiss.
There should be a directory ‘/etc/OpenCL/vendors/’ with two files in it: ‘libigdrcl.so’ and ‘intel.icd’ or ‘intel64.icd’ depending on which website to believe.
None of these were there so I manually created the directory. I found the file ‘libigdrcl.so’ in /usr/lib64/intel-opencl/ and the file ‘intel.icd’ in /usr/share/OpenCL/vendors/ and copied both to the newly created directory.
“cat /etc/OpenCL/vendors/intel.icd” reveals that this file points to ‘/usr/lib64/intel-opencl/libigdrcl.so’ so I’m not sure ‘libigdrcl.so’ is required in ‘/etc/OpenCL/vendors’, some website suggested it and I suppose it doesn’t hurt.
Also it seems two environment variables are required which weren’t present in /etc/environment – also suggested by some website, I don’t remember which one. In fact the file ‘/etc/environment’ itself did not exist so I created that as well and added the following: ‘OCL_ICD_VENDORS=/etc/OpenCL/vendors/’
‘OCL_ICD_FILENAMES=/usr/lib64/intel-opencl/libigdrcl.so’
Not entirely sure that’s the correct way of doing it but the command ‘env | grep OCL_ICD’ now shows:
OCL_ICD_VENDORS=/etc/OpenCL/vendors/
OCL_ICD_FILENAMES=/usr/lib64/intel-opencl/libigdrcl.so
Rebooted again, but still no luck.
Further searching the internet hasn’t yielded anything conclusive, so I hope somebody here might have an idea as to what’s gone wrong.
I’ll do some more searching myself and let you guys chew on this.
Maybe the recent graphics driver doesn’t match with the installed version of OpenCL, or perhaps I’ve unwittingly borked something.
Even after having used Linux for a few years I’m still very much a novice with it comes to all things under the hood, so that’s not entirely unthinkable…
Some additional info:
inxi -xxx -G
Graphics:
Device-1: Intel CoffeeLake-S GT2 [UHD Graphics 630] vendor: Micro-Star MSI
driver: i915 v: kernel arch: Gen-9.5 ports: active: HDMI-A-1,HDMI-A-2
empty: DP-1,DP-2,HDMI-A-3 bus-ID: 00:02.0 chip-ID: 8086:3e92
class-ID: 0300
Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
compositor: kwin_wayland driver: X: loaded: modesetting unloaded: vesa
alternate: fbdev,intel dri: iris gpu: i915 d-rect: 3840x1080 display-ID: 0
Monitor-1: HDMI-A-1 pos: primary,left model: Denon DENON-AVR
serial: 16843009 res: mode: 1920x1080 hz: 100 scale: 100% (1) dpi: 61
size: 1600x900mm (62.99x35.43") diag: 1836mm (72.3") modes: max: 4096x2160
min: 720x400
Monitor-2: HDMI-A-2 pos: right model: LG (GoldStar) IPS FULLHD
serial: 611NTMX8L163 res: mode: 1920x1080 hz: 60 scale: 100% (1) dpi: 102
size: 480x270mm (18.9x10.63") diag: 551mm (21.7") modes: max: 1920x1080
min: 720x400
API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
device: 1 drv: swrast gbm: drv: iris surfaceless: drv: iris wayland:
drv: iris x11: drv: iris
API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.3.4 glx-v: 1.4
direct-render: yes renderer: Mesa Intel UHD Graphics 630 (CFL GT2)
device-ID: 8086:3e92 display-ID: :1.0
API: Vulkan v: 1.4.304 layers: 5 surfaces: xcb,xlib,wayland device: 0
type: integrated-gpu driver: N/A device-ID: 8086:3e92
Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo de: kscreen-console,
kscreen-doctor, xfce4-display-settings gpu: gputop, intel_gpu_top, lsgpu
wl: wayland-info x11: xdpyinfo, xprop, xrandr
vainfo
Trying display: wayland
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.4.4 ()
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointFEI
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
inxi -b
System:
Host: Tumbleweed Kernel: 6.13.0-1-default arch: x86_64 bits: 64
Desktop: KDE Plasma v: 6.2.5 Distro: openSUSE Tumbleweed 20250130
Machine:
Type: Desktop Mobo: Micro-Star model: Z370-A PRO (MS-7B48) v: 1.0
serial: <superuser required> UEFI: American Megatrends v: 2.D3
date: 11/18/2021
CPU:
Info: 6-core Intel Core i5-8400 [MCP] speed (MHz): avg: 800
min/max: 800/4000
Graphics:
Device-1: Intel CoffeeLake-S GT2 [UHD Graphics 630] driver: i915 v: kernel
Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
compositor: kwin_wayland driver: X: loaded: modesetting unloaded: vesa
dri: iris gpu: i915 resolution: 1: 1920x1080~100Hz 2: 1920x1080~60Hz
API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.3.4
renderer: Mesa Intel UHD Graphics 630 (CFL GT2)
Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo de: kscreen-console,
kscreen-doctor, xfce4-display-settings gpu: gputop, intel_gpu_top, lsgpu
wl: wayland-info x11: xdpyinfo, xprop, xrandr
Network:
Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
driver: r8169
Drives:
Local Storage: total: 5.33 TiB used: 3.6 TiB (67.5%)
Info:
Memory: total: 16 GiB note: est. available: 15.37 GiB used: 6.12 GiB (39.8%)
Processes: 298 Uptime: 2h 16m Shell: Bash inxi: 3.3.37