# Problem accessing nVidia GPU with OpenCL after kernel/driver upgrade

**URL:** <https://forum.endeavouros.com/t/problem-accessing-nvidia-gpu-with-opencl-after-kernel-driver-upgrade/32836>\
**Category:** Kernel, boot, graphics & hardware\
**Created:** [October 15, 2022, 3:09pm UTC](https://forum.endeavouros.com/t/problem-accessing-nvidia-gpu-with-opencl-after-kernel-driver-upgrade/32836 "2022-10-15T15:09:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avonidas](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@Avonidas](https://forum.endeavouros.com/u/Avonidas)\
**Post date:** [October 15, 2022, 3:09pm UTC](https://forum.endeavouros.com/t/problem-accessing-nvidia-gpu-with-opencl-after-kernel-driver-upgrade/32836/1 "2022-10-15T15:09:42Z")

</div>

I have a problem when trying to run OpenCL code on my nVidia GPU after upgrading the NVIDIA proprietary driver to v. 520.56.06. I have a hybrid system:

```auto
inxi -G
Graphics:
  Device-1: Intel HD Graphics 530 driver: i915 v: kernel
  Device-2: NVIDIA GM107M [GeForce GTX 960M] driver: nvidia v: 520.56.06
  Device-3: Sunplus Innovation Integrated_Webcam_HD type: USB
    driver: uvcvideo
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3 driver: X:
    loaded: intel,nvidia unloaded: modesetting dri: i965 gpu: i915
    resolution: 1920x1080~60Hz
  OpenGL: renderer: Mesa Intel HD Graphics 530 (SKL GT2) v: 4.6 Mesa 22.2.1

```

(no Optimus installed, I use prime-run to run apps on the GeForce GPU). I have opencl-nvidia installed, it seems to be detected ok:

```auto
$ clinfo --list
Platform #0: Clover
Platform #1: NVIDIA CUDA
 `-- Device #0: NVIDIA GeForce GTX 960M

```

But I cannot access it when I try to run opencl-examples, e.g.:

```auto
$ git clone https://github.com/rsnemmen/OpenCL-examples.git
$ cd OpenCL-examples
$ cd add_numbers
$ make
$ ./add_numbers
Couldn't access any devices: File exists
$ prime-run ./add_numbers
Couldn't access any devices: File exists

```

I suspect I’m supposed to set some environment variables, but I don’t know which.  
I’m testing this because the mandelbulber2 app with opencl support,  
[https://aur.archlinux.org/packages/mandelbulber2-opencl-git](https://aur.archlinux.org/packages/mandelbulber2-opencl-git)  
is broken ever since the nvidia driver upgrade. I am trying to figure out if this is a broken driver issue, or simply a matter of setting up the environment properly.

Otherwise, the driver/GPU seems to be functioning properly, e.g. I can run CuPy kernels on the GPU.
