OpenCL support Bug/Issue for Darktable on Nvidia Optimus

Hi guys,

I am using Leap 42.1 on a notebook with Nvidia Optimus (Clevo W230SS) and have one issue (and an annoying workaround) when trying to use “darktable” with OpenCL support. Bumblebee is working fine otherwise.

First, as a normal user, this fails:
**
> optirun darktable -d opencl**


[opencl_init] found opencl runtime library ‘libOpenCL’[opencl_init] opencl library ‘libOpenCL’ found on your system and loaded
[opencl_init] could not get platforms: -1001
[opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is OFF.
[pixelpipe_process] [thumbnail] using device -1

So the OpenCL library works fine, but it cannot find the device? (“optirun glxspheres” runs fine. My user is also in the video and bumblebee groups)

Out of curiosity and despair I tried to run the command above as root and voila: OpenCL support works out of the box and images are rendered on the GPU.
Plus, if I execute this command now again as normal user, everything is working as well, but only until next reboot.

I would guess that it is related to creating some device files with the right permissions and so on and so forth. Has anyone come across some permanet workaround for this?

Hi
There is not a systemd service file that needs to be enabled and run?
As root user;


systemctl list-unit-files

If not what is the actual command you run, we can create a systemd service file to run on boot…

Seems similar to a problem I had to enable OpenCL on LibreOffice: see https://bugzilla.novell.com/show_bug.cgi?id=879767 for details.
You need to install nvidia-compute-352.63-113.1.x86_64.rpm then pick the 50-nvidia.conf file attached to the above bugreport and:


sudo cp 50-nvidia.conf /etc/modprobe.d/

Reboot and, if the problem is the same, enjoy OpenCL :wink: