Nveglglessink fails with CUDA error 219 in ds5.0

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