Thinkpad X1 Gen8 not able to activate OpenCL

Hi, I bought a second hand Thinkpad X1 Gen8 for when I’m on the go and installed OpenSuse Tumbleweed.

I would like to enable OpenCL for darktable; I don’t expect great performance but I would like to use it on the go for culling and fast editing; I installed intel-opencl and intel-opencl-driver as well as opencl-headers but still not able to activate OpenCL.

Tried with LibRustCL as well but still no luck.

AFAIK the Driver for the GPU (Intel UHD Cometlake G2) should be in the kernel (i915).

If you have the same/similar laptop and want to share you setup, you are really welcome.

clinfo ?

Maybe opcencl-mesa works for (old) Intel too?

Cannot provide the clinfo now, as I’m reinstalling the OS for other things (encryption) but it doesn’t show any opencl driver. I’ll provide later.

I have a workstation with AMD GPU and usually after installing the opencl package, everything is working just right after.

There have been some threads I think, perhaps this one may hold some helpful information

I’m starting with a new and clean setup, and these are all the things I’ve installed related to the GPU Driver.

Installed Mesa packages:

➜  ~ sudo zypper pa -i | grep Mesa
i  | Packman                                | Mesa                                          | 25.2.4-1699.2.pm.1                      | x86_64
i  | openSUSE-Tumbleweed-Oss                | Mesa-demo-egl                                 | 9.0.0-6.1                               | x86_64
i  | openSUSE-Tumbleweed-Oss                | Mesa-demo-x                                   | 9.0.0-6.1                               | x86_64
i  | Packman                                | Mesa-dri                                      | 25.2.4-1699.2.pm.13                     | x86_64
i  | Packman                                | Mesa-libEGL1                                  | 25.2.4-1699.2.pm.1                      | x86_64
i  | Packman                                | Mesa-libGL1                                   | 25.2.4-1699.2.pm.1                      | x86_64
i  | Packman                                | Mesa-libva                                    | 25.2.4-1699.2.pm.13                     | x86_64
i  | Packman                                | Mesa-vulkan-device-select                     | 25.2.4-1699.2.pm.13                     | x86_64

Installed intel packages:

➜  ~ sudo zypper pa -i | grep intel
i+ | openSUSE-Tumbleweed-Oss                | intel-opencl                                  | 25.18.33578.6-2.1                       | x86_64
i  | openSUSE-Tumbleweed-Oss                | libdrm_intel1                                 | 2.4.127-1.1                             | x86_64
➜  ~ 

OpenCL packages:

➜  ~ sudo zypper pa -i | grep opencl
i+ | openSUSE-Tumbleweed-Oss                | intel-opencl                                  | 25.18.33578.6-2.1                       | x86_64
i  | openSUSE-Tumbleweed-Oss                | libopencl-clang15                             | 2.11.7-1.2                              | x86_64
i+ | openSUSE-Tumbleweed-Oss                | opencl-headers                                | 2024.10.24-1.3                          | noarch

libOpenCL:

➜  ~ sudo zypper pa -i | grep libOpen   
i  | openSUSE-Tumbleweed-Oss                | libOpenCL1                                    | 2.3.4-1.1                               | x86_64
i  | openSUSE-Tumbleweed-Oss                | libOpenEXR-3_4-33                             | 3.4.1-1.1                               | x86_64
i  | openSUSE-Tumbleweed-Oss                | libOpenEXR-3_4-33-x86-64-v3                   | 3.4.1-1.1                               | x86_64
i  | openSUSE-Tumbleweed-Oss                | libOpenEXRCore-3_4-33                         | 3.4.1-1.1                               | x86_64
i  | openSUSE-Tumbleweed-Oss                | libOpenEXRCore-3_4-33-x86-64-v3               | 3.4.1-1.1                               | x86_64
➜  ~ inxi -G
Graphics:
  Device-1: Intel CometLake-U GT2 [UHD Graphics] driver: i915 v: kernel
  Device-2: IMC Networks Integrated Camera driver: uvcvideo type: USB
  Display: x11 server: X.Org v: 21.1.15 with: Xwayland v: 24.1.8 driver: X:
    loaded: modesetting unloaded: vesa dri: iris gpu: i915
    resolution: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: iris,swrast platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 25.2.4
    renderer: Mesa Intel UHD Graphics (CML GT2)
  API: Vulkan v: 1.4.328 drivers: llvmpipe surfaces: N/A
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor wl: wayland-info
    x11: xdpyinfo, xprop, xrandr
➜  ~ 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.4
  ICD loader Profile                              OpenCL 3.0
➜  ~ lspci -k | grep -A 2 -i "VGA"
00:02.0 VGA compatible controller: Intel Corporation CometLake-U GT2 [UHD Graphics] (rev 02)
        Subsystem: Lenovo Device 22be
        Kernel driver in use: i915

and my user is on the following groups:

➜  ~ groups
fabio video render wheel

thanks, I already checked the thread but it didn’t help, I’ll re-read maybe I missed something.

1 Like

Hm, I haven’t properly read your OP, you wrote that you are using Intel UHD and I was referring to Intel Iris XE. So perhaps the information in this thread doesn’t match perfectly with the requirements of your integrated GPU :thinking:

What’s the output of darktable-cltest ?

➜  ~ darktable-cltest
darktable 5.2.1
Copyright (C) 2012-2025 Johannes Hanika and other contributors.

Compile options:
  Bit depth              -> 64 bit
  Exiv2                  -> 0.28.3
  Lensfun                -> 0.3.4
  Debug                  -> DISABLED
  SSE2 optimizations     -> ENABLED
  OpenMP                 -> ENABLED
  OpenCL                 -> ENABLED
  Lua                    -> ENABLED  - API version 9.5.0
  Colord                 -> ENABLED
  gPhoto2                -> ENABLED
  OSMGpsMap              -> ENABLED  - map view is available
  GMIC                   -> ENABLED  - Compressed LUTs are supported
  GraphicsMagick         -> DISABLED
  ImageMagick            -> DISABLED
  libavif                -> ENABLED
  libheif                -> ENABLED
  libjxl                 -> ENABLED
  LibRaw                 -> ENABLED  - Version 0.21.4-Release
  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.6870 [opencl_init] opencl disabled via darktable preferences
     0.6872 [opencl_init] opencl library 'libOpenCL' found on your system and loaded, preference 'default path'
     0.6990 [opencl_init] 0 platforms detected, error: Unknown OpenCL error
     0.6990 [opencl_init] FINALLY: opencl PREFERENCE=OFF is NOT AVAILABLE and NOT ENABLED.

but I cannot enable in the preferences.
And according to the screenshot I need “ocl-icd” but I’m looking for it and don’t understand how to install in opensuse tumbleweed.

@darix knows.

1 Like

Your hardware is so old that intel phased out the driver for it from the normal package already.

give this package try

thanks @darix,

I owe you a beer, now it works!

Actually using this repo because the one you provide is missing some dependencies.

But thanks a lot, this was the last step to setup my laptop. I cannot imagine that a 2020 laptop – from 5y ago – is considered old :frowning:
It’s still a great laptop, very light portable and with a great battery life :slight_smile:

Ok it works, thanks again. :slight_smile:

A couple of tests to satisfy my nerdy side and confirm it works.

I use this command as a reference:

darktable-cli setubal.orf setubal.orf.xmp test.jpg --core -d perf -d opencl

Thinkpad X1 Gen8 without OpenCL:

56.2569 [dev_process_export] pixel pipeline processing took 54.537 secs (411.079 CPU)

Thinkpad X1 Gen8 with OpenCL:

21.3700 [dev_process_export] pixel pipeline processing took 19.647 secs (23.586 CPU)

~25 sec of difference, and It’s a good difference!

My AMD workstation with a GPU AMD RX 6700 XT 12Gb with openCL enabled :laughing:

2.7645 [dev_process_export] pixel pipeline processing took 1.184 secs (2.413 CPU)

You want to thank my coworker Patrik Jakobsson. He did all the work.

2 Likes

thanks Patrik! :blush:

1 Like

@darix @boredphoto :muscle:

2 Likes