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 thenvidia-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:
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:
Ubuntu 20.04 install
Things got much better now. Find available driver versions:
Install the latest one listed + opencl:
You can also search under:
in the "Additional Drivers" tab for the latest driver.
Ubuntu 15.10 install
Test it out
Compile and run:
Here's a minimal test program:
main.c
GitHub upstream.
Notes
nvidia-current
package. It is old. Eitherapt-cache search nvidia
and get the latest one, or usesoftware-properties-gtk
"Additional Drivers" tab.I really recommend upgrading to 15.10 to get this to work: I had never managed before.
Tested on:
nvidia-driver-470
Related: https://stackoverflow.com/questions/7542808/how-to-compile-opencl-on-ubuntu/33483311#33483311
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:
And then:
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:Then everything works smoothly ;)