Nveglglessink fails with CUDA error 219 in ds5.0

  • Docker image tag 5.0-dp-20.04-samples
  • Hardware nvidia-smi:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.82       Driver Version: 440.82       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1660    Off  | 00000000:1E:00.0 Off |                  N/A |
| 29%   32C    P8     9W / 120W |    160MiB /  5944MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

The initial problem is that I’m not able to run any of the visual sample apps in deepstream 5, although I had no such problems in deepstream 4 using exactly the same setup except for different docker image. Upon further debugging and pipeline simplification, I found nveglglessink to be the culprit:

  • gst-launch-1.0 uridecodebin uri=$URI ! nvvideoconvert ! nveglglessink - gives error (cuGraphicsGLRegisterBuffer failed with error(219) gst_eglglessink_cuda_init texture = 1, window appears but it’s all black)

  • gst-launch-1.0 uridecodebin uri=$URI ! nvvideoconvert ! glimagesink - works fine (with additional ubuntu package gstreamer1.0-gl).

1 Like

Did you run “xhost +” before launching the docker?

This is required as mentioned in DeepStream | NVIDIA NGC

The error has nothing to do with xhost (I tried it, makes no difference), because I have the following volume mounts:

- /tmp/.X11-unix:/tmp/.X11-unix
- ~/.Xauthority:/root/.Xauthority:ro

And of course, glimagesink works in the same conditions.

Edit: using Xauthority file also requires container network to be in host mode otherwise the hostname signature is not valid, but anyhow, this is beyond the point of the nvidia issue.

please check if you run into the same issue as cuGraphicsGLRegisterBuffer failed with error(219) gst_eglglessink_cuda_init texture = 1

Yes, I run into exactly that issue and I posted in that thread first, but @Amycao said it’s a different issue and that I should start different thread.

Oh…sorry, will check and get back.

The error number 219 means:

CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = 219
This indicates an error with OpenGL or DirectX context.

so, as Amy asked, did you install OpenGL? Could you share the output of

$ dpkg -l | grep -i opengl

  • Ubuntu 18 host:
ii  libepoxy0:amd64                            1.4.3-1                                          amd64        OpenGL function pointer management library
ii  libgl1-mesa-dri:amd64                      19.2.8-0ubuntu0~18.04.3                          amd64        free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-dri:i386                       19.2.8-0ubuntu0~18.04.3                          i386         free implementation of the OpenGL API -- DRI modules
ii  libglu1-mesa:amd64                         9.0.0-2.1build1                                  amd64        Mesa OpenGL utility library (GLU)
ii  libglx-mesa0:amd64                         19.2.8-0ubuntu0~18.04.3                          amd64        free implementation of the OpenGL API -- GLX vendor library
ii  libglx-mesa0:i386                          19.2.8-0ubuntu0~18.04.3                          i386         free implementation of the OpenGL API -- GLX vendor library
ii  libgtkglext1:amd64                         1.2.0-8                                          amd64        OpenGL Extension to GTK+ (shared libraries)
ii  libnvidia-cfg1-440:amd64                   440.82-0ubuntu0~0.18.04.1                        amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-fbc1-440:amd64                   440.82-0ubuntu0~0.18.04.1                        amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-440:i386                    440.82-0ubuntu0~0.18.04.1                        i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-440:amd64                     440.82-0ubuntu0~0.18.04.1                        amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-440:i386                      440.82-0ubuntu0~0.18.04.1                        i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-440:amd64                   440.82-0ubuntu0~0.18.04.1                        amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ifr1-440:i386                    440.82-0ubuntu0~0.18.04.1                        i386         NVIDIA OpenGL-based Inband Frame Readback runtime library
  • nvcr.io/nvidia/deepstream:5.0-dp-20.04-samples
ii  libgl1-mesa-dri:amd64                19.0.8-0ubuntu0~18.04.3            amd64        free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-dri:i386                 19.0.8-0ubuntu0~18.04.3            i386         free implementation of the OpenGL API -- DRI modules
ii  libglx-mesa0:amd64                   19.0.8-0ubuntu0~18.04.3            amd64        free implementation of the OpenGL API -- GLX vendor library
ii  libglx-mesa0:i386                    19.0.8-0ubuntu0~18.04.3            i386         free implementation of the OpenGL API -- GLX vendor library

I am doing everything in docker container, so I don’t think that the host libraries are relevant, but I shared just for reference. One thing we can notice is that the nvidia opengl libs are missing inside the container… which means that the official samples docker image might be incorrectly packaged.

Could you install OpenGL from https://developer.nvidia.com/opengl-driver and try again ?

Thanks!

I have run into the same problem using DS 5.0, deepstream-app with any display I get error 219.

I have the following opengl:

ii  freeglut3:amd64                                              2.8.1-3                                          amd64        OpenGL Utility Toolkit
ii  freeglut3-dev:amd64                                          2.8.1-3                                          amd64        OpenGL Utility Toolkit development files
ii  libepoxy0:amd64                                              1.4.3-1                                          amd64        OpenGL function pointer management library
ii  libgl1-mesa-dev:amd64                                        19.2.8-0ubuntu0~18.04.3                          amd64        free implementation of the OpenGL API -- GLX development files
ii  libgl1-mesa-dri:amd64                                        19.2.8-0ubuntu0~18.04.3                          amd64        free implementation of the OpenGL API -- DRI modules
ii  libgles2-mesa-dev:amd64                                      19.2.8-0ubuntu0~18.04.3                          amd64        free implementation of the OpenGL|ES 2.x API -- development files
ii  libglu1-mesa:amd64                                           9.0.0-2.1build1                                  amd64        Mesa OpenGL utility library (GLU)
ii  libglu1-mesa-dev:amd64                                       9.0.0-2.1build1                                  amd64        Mesa OpenGL utility library -- development files
ii  libglx-mesa0:amd64                                           19.2.8-0ubuntu0~18.04.3                          amd64        free implementation of the OpenGL API -- GLX vendor library
ii  libnvidia-cfg1-440:amd64                                     440.33.01-0ubuntu1                               amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-fbc1-440:amd64                                     440.33.01-0ubuntu1                               amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-440:amd64                                       440.33.01-0ubuntu1                               amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-440:amd64                                     440.33.01-0ubuntu1                               amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libopengl0:amd64                                             1.0.0-2ubuntu2.3                                 amd64        Vendor neutral GL dispatch library -- OpenGL support

I have NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 10.2. When you say install OpenGL, what do you mean? When i click that link the Latest Long Lived Branch Version: [440.82] is the same driver as the original poster

Thanks, @gabe_ddi!
Could you share me the output of command :

$ glxinfo | grep OpenGL

if there is not glxinfo, install by “sudo apt install mesa-utils”

1 Like
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro P4000/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 440.33.01
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 440.33.01
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 440.33.01
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

Output from glxinfo | grep OpenGL

Hi @gabe_ddi
Do all you shared above get from DS5.0 docker? And, you run into the same issue in docker, right?

This is running on host OS, no docker involved. Installed DS5.0 fresh and followed getting started instructions.

do you mind upgrading to the latest driver 440.82 - Linux x64 (AMD64/EM64T) Display Driver | 440.82 | Linux 64-bit | NVIDIA and check again this issue?

Will do that now and report back soon

Is there a proper way to update driver easily? I get errors in install and do I need to reinstall CUDA and TensorRT after?

you could see log /var/log/nvidia-installer.log for details to check where goes wrong.
You do not need to reinstall cuda and TRT.

Just restarted my PC and now getting no errors FYI for anyone getting this problem

Thanks for update! is this error also gone?