Bug #11702

Cannot use opencl on Cape Verde: [opencl_init] could not create command queue for device 0: -6

Added by Nick Kachulin about 1 month ago. Updated 27 days ago.

Target version:
Start date:
Due date:
% Done:


Affected Version:
other GNU/Linux
hardware architecture:


After discontinuing fglrx I was left without fast darktable for more than half a year on my 7770 Cape Verde...
The last attempt to make it working was the closest: I could install opencl blob and it is visible with clinfo but is still inoperable.
I've opened a bug @ gentoo bugzilla
but the maintainers asked me for more info I can not provide.

I do realize that most probably it's not darktable issue at all (other apps seem not to work either) but I ask somebody who can help to participate in the discussion over there to triangle the problem and possibly find a solution.

clinfo.txt Magnifier (8.03 KB) Nick Kachulin, 08/18/2017 04:34 PM

darktable-cltest.txt Magnifier (1.43 KB) Nick Kachulin, 08/18/2017 04:34 PM


#1 Updated by Ulrich Pegelow about 1 month ago

From darktable-cltest's output:

[opencl_init] could not create command queue for device 0: -6

Error code -6 relates to CL_OUT_OF_HOST_MEMORY. And that's what the docs tell us about this error during command queue creation:

CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the
OpenCL implementation on the host.

I guess it's a driver bug.

#2 Updated by Nick Kachulin about 1 month ago

Thank you Ulrich. This definitely gives a direction.

#3 Updated by Josep V. Moragues 29 days ago

I get the same error with my Radeon R7 250 (GCN 1.0) on a clean install of Ubuntu GNOME 16.04.3, and the newest AMDGPU-PRO driver (17.30)

[opencl_init] opencl related configuration options:
[opencl_init] opencl: 1
[opencl_init] opencl_library: ''
[opencl_init] opencl_memory_requirement: 512
[opencl_init] opencl_memory_headroom: 100
[opencl_init] opencl_device_priority: '*/!0,*/*/*'
[opencl_init] opencl_mandatory_timeout: 200
[opencl_init] opencl_size_roundup: 16
[opencl_init] opencl_async_pixelpipe: 0
[opencl_init] opencl_synch_cache: 0
[opencl_init] opencl_number_event_handles: 25
[opencl_init] opencl_micro_nap: 1000
[opencl_init] opencl_use_pinned_memory: 0
[opencl_init] opencl_use_cpu_devices: 0
[opencl_init] opencl_avoid_atomics: 0
[opencl_init] found opencl runtime library 'libOpenCL'
[opencl_init] opencl library 'libOpenCL' found on your system and loaded
[opencl_init] found 1 platform
[opencl_init] found 1 device
[opencl_init] device 0 `Capeverde' supports image sizes of 16384 x 16384
[opencl_init] device 0 `Capeverde' allows GPU memory allocations of up to 332MB
[opencl_init] device 0: Capeverde 
     GLOBAL_MEM_SIZE:          518MB
     MAX_WORK_GROUP_SIZE:      256
     MAX_WORK_ITEM_SIZES:      [ 256 256 256 ]
     DRIVER_VERSION:           2442.7
     DEVICE_VERSION:           OpenCL 1.2 AMD-APP (2442.7)
[opencl_init] could not create command queue for device 0: -6
[opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is OFF.

Darktable's OpenCL works fine with this card on Ubuntu GNOME 14.04 with the discontinued fglrx driver.

#4 Updated by Josep V. Moragues 28 days ago

I get a similar error using LuxMark v.3.1:

OpenCL ERROR: clCreateCommandQueue(-6)

So it seems the issue is not Darktable related, there is something wrong with OpenCL implementation on AMDGPU-PRO drivers for Cape Verde GPUs

#5 Updated by Nick Kachulin 27 days ago

Now I'm sure it is not. I opened a bug @ kernel bugzilla so it might be a solution soon... Hopefully... I'll keep this bug open, too, to keep you guys informed.

Also available in: Atom PDF