Proprietary drivers 331.89 do not give me OpenCL. (tried both tested/updates) for a while I had version 304.123 that worked - except I wanted the current drivers, and now are unable to downgrade.

Anyway - I could downgrade by workaround, but I wish 331.89 worked.

I used "darktable -d opencl" as test alos added symbolic link to darktable, but that does not help with 331.89


I too was confounded by this perplexing problem until I found a series of forum posts bout Virtual Lighttable in which the participants do some debugging. It turns out that the NVIDIA drivers need a custom modprobe rule that is not installed by default with either nvidia-331 or the the opencl drivers. These rules are provided in the nvidia-modprobe package.

Here is a list of all of the packages you will need to get OpenCL working on Ubuntu 14.10 with NVIDIA drivers:

sudo apt-get install nvidia-331 nvidia-331-uvm nvidia-opencl-dev nvidia-modprobe

EDIT: In case anyone encounters a similar problem on Ubuntu 15.04 and the NVIDIA 346.59 drivers, the command to fix the issue is nearly identical:

sudo apt-get install nvidia-346 nvidia-346-uvm nvidia-opencl-dev nvidia-modprobe
| improve this answer | |
  • On Linux mint I encounter this error when running the deviceQuery CUDA test program: optirun --bridge primus ./deviceQuery ./deviceQuery Starting... CUDA Device Query (Runtime API) version (CUDART static linking) cudaGetDeviceCount returned 38 -> no CUDA-capable device is detected Result = FAIL – user3728501 Oct 4 '15 at 9:59

Ubuntu 15.10

sudo apt-get install nvidia-352 nvidia-352-dev nvidia-prime nvidia-modprobe nvidia-opencl-dev
sudo ln -s /usr/include/nvidia-352/GL /usr/local/include
sudo ln -s /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 /usr/local/lib/libOpenCL.so

Then compile with:

gcc -o main main.c -lOpenCL

And use the header as:

#include <CL/cl.h>


I really recommend upgrading to 15.10 to get this to work: I had never managed before.

Tested on:

  • Lenovo ThinkPad T430 with NVIDIA NVS 5400M
  • Lenovo ThinkPad W540 with NVIDIA Quadro K1100M
| improve this answer | |

For Ubuntu 14.04 nvidia-modprobe messed up my system. But I realized that the nvidia-331-uvm is not activated from the start (god knows why). So let's activate it:

$ sudo modprobe nvidia-331-uvm
$ sudo mknod -m 666 /dev/nvidia-uvm c 249 0

And then:

$ sudo clinfo

Then you'll be able to use opencl even as a non-root user. Why it's like this is explained in the Virtual Lighttable mailing list.

Thus, I finally added the next lines in my /etc/rc.local file:

# begin opencl config
modprobe nvidia-331-uvm
mknod -m 666 /dev/nvidia-uvm c 249 0
# end opencl config 

Then everything works smoothly ;)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.