Could not get platform -1001 error when initializing darktable

I’m using darktable 3.0. I remember I was able to run darktable with opencl before but had recently noticed some processing on my image was getting really slow. So I went to core option in preference and found my opencl options were all greyed out. I tried to run darktable -d opencl on terminal and I got this error:
0.172579 [opencl_init] found opencl runtime library ‘libOpenCL’
0.172613 [opencl_init] opencl library ‘libOpenCL’ found on your system and loaded
0.174444 [opencl_init] could not get platforms: -1001
0.174456 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.174459 [opencl_init] initial status of opencl enabled flag is OFF.
My machine is running Ubuntu 19.10 with nVidia driver 390 installed. My GPU is nVidia quadro K1100M.
Does anyone know how to fix this? I’ve tried looking for the solution on the internet but it seems that most of these issues are being with AMD GPUs, so I’m starting this topic here.
Thanks for any help! :slightly_smiling_face:

Looking for exact problem you’re facint it seems that this should help:

Thank you @johnny-bit. It works! But I find out the command should be
sudo apt install nvidia-modprobe
rather than sudo apt-get install nvidia-<version number> nvidia-<version number>-uvm nvidia-opencl-dev nvidia-modprobe

@t.saris, I get this sometimes when video driver has not woken up correctly after suspend/standby. A reboot can do wonders.

@martin.scharnke Oddly I forgot to try that yesterday lol :sweat_smile:.

Without reboot the following sequence here also helps to re-start opencl:

sudo modprobe -r nvidia_uvm && sudo modprobe nvidia_uvm

1 Like