Darktable Snap package and opencl

Recently I had to reinstall Ubuntu studio 18.04 to “fix” some problems I didn’t know how to deal with. I’ve always used the Pascal de Bruijn “fairly stable” ppa to get an updated Darktable release. I happened to notice that the Software center had Darktable 2.6.2 available as a Snap package. The “fairly stable” ppa release is Darktable 2.6.1, so I tried the Snap version. Now it’s entirely possible that I may have done something wrong but when I checked to see if opencl was working , I found the “not available” message. I have all the Nvidia libraries installed same as always but no opencl with the Snap package. So I got rid of it and installed the trusty ppa and all is well again.

It’s not a big deal to me to have 2.6.1 running instead of 2.6.2, but my curiosity has the better of me here. I couldn’t find anything out there about Darktable snap and opencl, so I figured I’d see what our forum has to say here.

@kyrofa maintains the snap for darktable. Looks like OpenCL isn’t enabled for the package.

Yeah, it’s not you. I’m honestly not sure how to get opencl working in the snap. I think I need to bundle those libraries in, and I’m not sure how well it would work.

1 Like

OK. Thanks for letting me know. Ironically the ppa just updated to 2.6.2 not long after I posted this. On my system, the opencl makes a big difference, especially on the exporting time.

How do I know if I have a snap package (Linux 18.04). I checked with Software Manager and it states Source Local. I’m asking because Darktable tells me activate OpenCL support not available. Video card is a Nvidia GTX 1050. Nividia X server settings Driver version 390.116 (OpenGL?).

In a terminal type snap list darktable.

no matching snaps installed

Thanks, now I have to figure out why OpenCl doesn’t work.

I use the this ppa. It will update Darktable to 2.6.2.
I needed to install nvidia-modprobe, nvidia-opencl-dev, nvidia-libopencl1-384, nvidia-opencl-icd-384 if my memory is correct. Hope this helps.

…and i don’t know anything about snap packages. but to be able to ship opencl enabled binaries, we dynamically dlopen() all library functions manually (i.e. we don’t link against the library, which would mean we’ll have a compile time dependency). this means you should be able to just run dt on a system with libOpenCL.so and the stuff around it and it should go and pick it up.

Finally found solution to hardware (GPU) acceleration not working. Used Synaptic Package Manager to install nvidia-cuda-toolkit (not just cuda). Tried for hours to install cuda from command line, kept complaining about xserver running.

That’s great that you got your opencl working. You can try tweaking some things in your .config/darktablerc file as well. For me, by simple trial and error, I found that changing “opencl_number_event_handles” to 150 and “opencl_memory_headroom” to 400 works best for my hardware. The export times and the “working” times when applying a new module are way faster than without the opencl active.

1 Like

my guess is that this pulled in the necessary dependencies. cuda toolkit sounds overkill to me. have you tried using just nvidia-libopencl1 and nivida-opencl-icd ?