Repository navigation
Description
(Original title: Unable to enable OpenCL in CachyOS, despite being installed)
Is there an existing issue for this?
- I checked and did not find my issue in the already reported ones
Describe the bug
I'm on CachyOS, using Darktable 5.6.0
I have an AMD GPU (9070 XT) that is clearly recognized by my OS & used in other programs. I thought it was working in Darktable at some point, but I noticed a performance hit recently. This prompted me to check the settings, inside which the “GPU Acceleration” section is grayed out, showing it's “not available”
Running darktable -d opencl from the command line shows a compiler error (shown in the logfile section). Per the documentation, this appears to fall under a "generic compiler error", and I was directed here.
The OpenCL installation came with the OS distro (chatting in a different forum separately just in case it's an OS issue). I have not modified OpenCL on my machine from the stock version that comes with CachyOS.
How can I enable GPU acceleration on my machine? It's noticeably slower without it.
Steps to reproduce
- Launch Darktable 5.6.0
- Open preferences
- Go to the "processing" tab
- Under "OpenCL GPU acceleration", attempt to check the box by "activate OpenCL support"
Expected behavior
Darktable should recognize my existing OpenCL installation and allow enabling GPU acceleration
Logfile | Screenshot | Screencast
❯ darktable -d opencl
darktable 5.6.0
Copyright (C) 2012-2026 Johannes Hanika and other contributors.
Compile options:
Bit depth -> 64 bit
Exiv2 -> 0.28.8
Lensfun -> 0.3.4
Debug -> DISABLED
SSE2 optimizations -> ENABLED
OpenMP -> ENABLED
OpenCL -> ENABLED
Lua -> ENABLED - API version 9.7.0
Colord -> ENABLED
gPhoto2 -> ENABLED - Camera tethering is available
OSMGpsMap -> ENABLED - Map view is available
GMIC -> ENABLED - Compressed LUTs are supported
GraphicsMagick -> ENABLED
ImageMagick -> DISABLED
libavif -> ENABLED
libheif -> ENABLED
libjxl -> ENABLED
LibRaw -> ENABLED - Version 0.22.0-Release
OpenJPEG -> ENABLED
OpenEXR -> ENABLED
WebP -> ENABLED
AI -> ENABLED
See https://www.darktable.org/resources/ for detailed documentation.
See https://github.com/darktable-org/darktable/issues/new/choose to report bugs.
[dt starting] as : darktable -d opencl
Gtk-Message: 19:09:15.814: Failed to load module "appmenu-gtk-module"
[opencl_init] opencl disabled via darktable preferences
[opencl_init] opencl library 'libOpenCL' found on your system and loaded, preference 'default path'
[opencl_init] found 1 platform
[opencl_init] found 1 device
DEVICE: 0: 'AMD Radeon RX 9070 XT (radeonsi, gfx1201, ACO, DRM 3.64, 7.1.4-1-cachyos)'
CONF KEY: cldevice_v6_rusticlamdradeonrx9070xt
PLATFORM, VENDOR & ID: rusticl, Mesa:Mesa/X.org, ID=4098
CANONICAL NAME: rusticlamdradeonrx9070xt
DRIVER VERSION: 26.1.5-arch3.1
DEVICE VERSION: OpenCL 3.0 API=300
DEVICE_TYPE: GPU, dedicated mem
GLOBAL MEM SIZE: 16384 MB
MAX IMAGE ALLOC: 2048 MB
MAX IMAGE SIZE: 65536 x 65536
MAX CONSTANT BUFFER: 65536 KB
LOCAL MEM SIZE: 64 KB
ADDRESS ALIGN: 512 B
COMPUTE UNITS: 64
MAX WORK GROUP SIZE: 1024 (64)
MAX WORK ITEM DIMENSIONS: 3 [ 1024 1024 1024 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TILING: NO
SUPPORTED ATOMICS: INT32
EVENTS HANDLED: YES
OPENCL FAST MODE: NO
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: /usr/share/darktable/kernels
KERNEL DIRECTORY: /home/seg/.cache/darktable/cached_v6_kernels_for_rusticlAMDRadeonRX9070XT_2615arch31
CL COMPILER COMMAND: -w -DAMD=1 -I"/usr/share/darktable/kernels"
[opencl_build_program] could not build program: CL_BUILD_PROGRAM_FAILURE
[dt_opencl_device_init] failed to compile program `basic.cl'
[opencl_init] no suitable devices found.
[opencl_init] FINALLY: opencl PREFERENCE=NO is NOT AVAILABLE and NOT ENABLED
Commit
No response
Where did you obtain darktable from?
darktable.org / GitHub release
darktable version
5.6.0
What OS are you using?
Linux
What is the version of your OS?
CachyOS
Describe your system
Arch Linux via CachyOS with AMD GPU - a 9070 XT. Wholly up-to-date as of the time this ticket is being posted.
❯ fastfetch
.-------------------------: seg@lilith
.+=========================. ----------
:++===++==================- :++- OS: CachyOS x86_64
:*++====+++++=============- .==: Host: X570 AORUS ELITE WIFI (-CF)
-*+++=====+***++==========: Kernel: Linux 7.1.4-1-cachyos
=*++++========------------: Uptime: 3 hours, 15 mins
=*+++++=====- ... Packages: 1522 (pacman)
.+*+++++=-===: .=+++=: Shell: fish 4.8.1
:++++=====-==: -*****+ Display (Sceptre Y27): 2560x1440 @ 1.15x in 27", 165 Hz [External] *
:++========-=. .=+**+. Display (Sceptre Y27): 2560x1440 @ 1.15x in 27", 165 Hz [External]
.+==========-. . DE: KDE Plasma 6.7.3
:+++++++====- .--==-. WM: KWin (Wayland)
:++==========. :+++++++: WM Theme: Layan
.-===========. =*****+*+ Theme: Breeze (Layan) [Qt], Breeze-Dark [GTK2], Breeze [GTK3]
.-===========: .+*****+: Icons: Tela [Qt], Tela [GTK2/3/4]
-=======++++:::::::::::::::::::::::::-: .---: Font: Noto Sans (10pt) [Qt], Noto Sans (10pt) [GTK2/3/4]
:======++++====+++******************=. Cursor: Layan-white (24px)
:=====+++==========++++++++++++++*- Terminal: konsole 26.4.3
.====++==============++++++++++*- CPU: AMD Ryzen 7 5800X (16) @ 4.85 GHz
.===+==================+++++++: GPU: AMD Radeon RX 9070 XT [Discrete]
.-=======================+++: Memory: 6.16 GiB / 31.26 GiB (20%)
.......................... Swap: 6.45 MiB / 31.26 GiB (0%)
Disk (/): 593.05 GiB / 929.51 GiB (64%) - btrfs
Local IP (enp5s0): 131.241.136.160/24
Locale: en_US.UTF-8
Are you using OpenCL GPU in darktable?
None
If yes, what is the GPU card and driver?
No response
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
No response
Activity
gi-man commentedon Jul 28, 2026
This looks like a driver issue. You are in 26.1.5, which is fairly recent. We might need to ping Karol.
Jedek-Selera commentedon Jul 29, 2026
Hi, I also have a 9070 XT and run Slackware64-current. After upgrading to Mesa 26.1.5, OpenCL (Rusticl) stopped working in darktable 5.6.0. I also tried mesa-26.2.0_rc2, but darktable still doesn't detect OpenCL. Additionally, I tested kernels 6.18.40 and 7.1.5, but it makes no difference. When I downgrade back to 26.1.4, Rusticl works fine again. Curiously, running clinfo on all of these Mesa versions shows that OpenCL is present and available.
karolherbst commentedon Jul 29, 2026
Huh, so 26.1.5 regressed things?
karolherbst commentedon Jul 29, 2026
What libclc version is installed? Because the llvm-22 one is broken
Jedek-Selera commentedon Jul 29, 2026
libclc-22.1.8
karolherbst commentedon Jul 29, 2026
yeah, that's broken, needs llvm/llvm-project#207264, which upstream won't merge, because llvm-22 is EoL, so every distribution has to patch now.
Or download the binaries from https://gitlab.freedesktop.org/karolherbst/mesa-libclc/-/releases And use them instead. There is no override, so would have to overwrite the package files.
Jedek-Selera commentedon Jul 29, 2026
Thanks, Karol. I will forward this to Patrick Volkerding so he can merge the patch into -current.
gi-man commentedon Jul 29, 2026
I think we should change the title of this issue to: AMD Rusticl OpenCL won't compile with llvm22 (upstream issue) or some similar wording.
[-]Unable to enable OpenCL in CachyOS, despite being installed[/-][+]AMD Rusticl OpenCL won't compile with llvm22 (upstream issue)[/+]karolherbst commentedon Jul 30, 2026
Fyi, Arch picked the patch. Not sure if that also will fix cachyos tho. But Arch should be fine. I've also pinged Fedora maintainers to backport it.
segeeslice commentedon Jul 30, 2026
@karolherbst to clarify: there is something the CachyOS maintainers need to do here to get this working, not something that is fixed in the Darktable code?
Do they need to upgrade to llvm23, for OpenCL to work?
karolherbst commentedon Jul 30, 2026
please don't update to llvm23
For this to be fixed, this PR needs to be added to the libclc build: llvm/llvm-project#207264
gi-man commentedon Jul 30, 2026
It issue is at the llvm22 code and it will need to be patched there and not on dt. llvm23 is not released yet.
segeeslice commentedon Aug 1, 2026
The issue is fixed in CachyOS! Thanks for the help & insight - feel free to modify / close the ticket as necessary
8 remaining items
karolherbst commentedon Aug 8, 2026
Yeah... looks like there is still a bug lurking somewhere. I'll dig into it. You can workaround that by deleting
~/.cache/mesa_shader_cache/once. You shouldn't have to delete it afterwards.karolherbst commentedon Aug 8, 2026
Okay.. rusticl would try to load, parse and compile libclc again if the
mtimeof the installed file is different... sadly, with the rpm from the scratch build it's not, guess I'll change that to check for the actual content instead.karolherbst commentedon Aug 9, 2026
Mesa MR fixing this: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43597
jenshannoschwalm commentedon Aug 9, 2026
Confirming, dt rusticl works fine now after doing so.
jenshannoschwalm commentedon Aug 11, 2026
@karolherbst just saw we will soon have atomic floats :-) thanks multiple lots!
karolherbst commentedon Aug 11, 2026
not on AMD, but uhm.. should be trivial to hook up... are you interested more in add/sub or max/min or just having them at all?
jenshannoschwalm commentedon Aug 11, 2026
What we are missing in current code is the float atomic add(). see the workaround in
data/kernels/common.hkarolherbst commentedon Aug 11, 2026
okay, I see. Yeah I think that should be fairly trivial to add to all drivers
github-actions commentedon Oct 11, 2026
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.
Ruanjoma commentedon Dec 1, 2026
The patch #21662 (comment) fixed it for me on two notebooks
a) Fedora 44 Lenovo with [AMD/ATI] Rembrandt [Radeon 660M / 680M] ,
libclc.x86_64 22.1.8-1.fc44
b) Fedora 45 with Intel Corporation WhiskeyLake-U GT2 [UHD Graphics 620] (rev 02),
libclc.x86_64/ libclc-spirv.x86_64 23.1.6-1 + libclc22.x86_64/libclc22-spirv.x86_64 22.1.8-3
jenshannoschwalm commentedon Dec 1, 2026
What patch exactly?
Ruanjoma commentedon Dec 1, 2026
The two binary files for libclc22 from Karol Herbst