./ZED_Depth_Viewer Segmentation fault (Address not mapped to objec

My desktop symptom was similar, and fix was similar to your verification and Myzhar’s tip:
prime-select nvidia
reboot

I have the same error.
nvidia-smi 515.65.01
nvcc --version 11.7
prime-select query nvidia
zed sdk 3.7.6
ubuntu 20.04

You can find the full solution here:

I tried this but still not working. prime-select query shows nvidia but the when i do $glxinfo | grep OpenGL, it still shows vendor string Intel
image

I solved the problem by doing this.

  1. create a file prime-run and copy the contents

#!/bin/bash
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
exec “$@”

  1. copy prime-run to /bin

sudo cp prime-run /bin

  1. make it executable

chmod +x prime-run

  1. Now if you do
    prime-run glxinfo | grep “OpenGL renderer”
    it should show NVIDIA

  2. Reboot the computer

  3. Now run
    prime-run ZED_Depth_Viewer

It is working but every time I have to do prime-run. Is there any workaround? prime-select still shows nvidia

Can you test if this solution works for you?

I guess there is something that forces your PC to use Intel GPU, maybe a power manager or something similar.

This worked for me. Thanks!

1 Like

I had met the same problem. The terminal information as below:

As above discussion, I had tried the follow commads in my notebook:

  1. sudo prime-select nvidia
  2. reboot

But the problem was not solved. The configure of my notebook is :

  1. ubuntu 20.04.6
  2. nvidia-520.56.06
  3. cuda-11.8

Can anyone give me some advises? Thanks!

Hi @zhoupan9109
this seems a different problem not concerning OpenGL.

Please open a new thread and add information about the ZED SDK version that you are using.