cuGraphicsGLRegisterBuffer failed with error(219) gst_eglglessink_cuda_init texture = 1

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): GPU - RTX 3070
• DeepStream Version: 6.0
• JetPack Version (valid for Jetson only)
• TensorRT Version: 8.0.1
• NVIDIA GPU Driver Version (valid for GPU only): 11.4
• Issue Type( questions, new requirements, bugs): questions
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing): See below
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Fresh install of Ubuntu 18.04, followed quick start instructions. Trying to run the sample apps for Deepstream 6.0, but keep getting this error. Same error occurs in Docker and when run on host. Looked at similar issues on message boards but none resolved this.

r@r-Alienware-x17-R1:~$ xhost +
access control disabled, clients can connect from any host
r@r-Alienware-x17-R1:~$ docker run --gpus ‘“‘device=0’”’ -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-6.0 nvcr.io/nvidia/deepstream:6.0-devel
root@71b318920266:/opt/nvidia/deepstream/deepstream-6.0# deepstream-app -c /opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/source30_1080p_dec_infer-resnet_tiled_display_int8.txt

(gst-plugin-scanner:12): GStreamer-WARNING **: 19:52:45.980: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so’: librivermax.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:12): GStreamer-WARNING **: 19:52:46.015: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so’: libtritonserver.so: cannot open shared object file: No such file or directory
libEGL warning: DRI2: failed to authenticate
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1484 Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/…/…/models/Primary_Detector/resnet10.caffemodel_b30_gpu0_int8.engine open error
0:00:00.687849237 11 0x7f7984002260 WARN nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1889> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/…/…/models/Primary_Detector/resnet10.caffemodel_b30_gpu0_int8.engine failed
0:00:00.687892415 11 0x7f7984002260 WARN nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1996> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/…/…/models/Primary_Detector/resnet10.caffemodel_b30_gpu0_int8.engine failed, try rebuild
0:00:00.687898849 11 0x7f7984002260 INFO nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1914> [UID = 1]: Trying to create engine from model files
WARNING: [TRT]: Detected invalid timing cache, setup a local cache instead
0:00:20.060385034 11 0x7f7984002260 INFO nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1947> [UID = 1]: serialize cuda engine to file: /opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/resnet10.caffemodel_b30_gpu0_int8.engine successfully
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT input_1 3x368x640
1 OUTPUT kFLOAT conv2d_bbox 16x23x40
2 OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40

0:00:20.064602066 11 0x7f7984002260 INFO nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus:<primary_gie> [UID 1]: Load new model:/opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/config_infer_primary.txt sucessfully

Runtime commands:
h: Print this help
q: Quit

p: Pause
r: Resume

NOTE: To expand a source in the 2D tiled display and view object details, left-click on the source.
To go back to the tiled display, right-click anywhere on the window.

**PERF: FPS 0 (Avg) FPS 1 (Avg) FPS 2 (Avg) FPS 3 (Avg) FPS 4 (Avg) FPS 5 (Avg) FPS 6 (Avg) FPS 7 (Avg) FPS 8 (Avg) FPS 9 (Avg) FPS 10 (Avg) FPS 11 (Avg) FPS 12 (Avg) FPS 13 (Avg) FPS 14 (Avg) FPS 15 (Avg) FPS 16 (Avg) FPS 17 (Avg) FPS 18 (Avg) FPS 19 (Avg) FPS 20 (Avg) FPS 21 (Avg) FPS 22 (Avg) FPS 23 (Avg) FPS 24 (Avg) FPS 25 (Avg) FPS 26 (Avg) FPS 27 (Avg) FPS 28 (Avg) FPS 29 (Avg)
**PERF: 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00)
** INFO: <bus_callback:194>: Pipeline ready

cuGraphicsGLRegisterBuffer failed with error(219) gst_eglglessink_cuda_init texture = 1
0:00:20.474932511 11 0x55a9414899e0 WARN nvinfer gstnvinfer.cpp:2288:gst_nvinfer_output_loop:<primary_gie> error: Internal data stream error.
0:00:20.474943839 11 0x55a9414899e0 WARN nvinfer gstnvinfer.cpp:2288:gst_nvinfer_output_loop:<primary_gie> error: streaming stopped, reason not-negotiated (-4)
ERROR from primary_gie: Internal data stream error.
Debug info: gstnvinfer.cpp(2288): gst_nvinfer_output_loop (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie:
streaming stopped, reason not-negotiated (-4)
Quitting
ERROR from sink_bin_queue: Internal data stream error.
Debug info: gstqueue.c(988): gst_queue_handle_sink_event (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstQueue:sink_bin_queue:
streaming stopped, reason not-negotiated (-4)
ERROR from qtdemux27: Internal data stream error.
Debug info: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin27/GstURIDecodeBin:src_elem/GstDecodeBin:decodebin27/GstQTDemux:qtdemux27:
streaming stopped, reason not-negotiated (-4)
ERROR from qtdemux4: Internal data stream error.
Debug info: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin5/GstURIDecodeBin:src_elem/GstDecodeBin:decodebin5/GstQTDemux:qtdemux4:
streaming stopped, reason not-negotiated (-4)
App run failed
root@71b318920266:/opt/nvidia/deepstream/deepstream-6.0#

r@r-Alienware-x17-R1:~$ nvidia-smi
Mon Jan 10 13:54:28 2022
±----------------------------------------------------------------------------+
| NVIDIA-SMI 470.82.01 Driver Version: 470.82.01 CUDA Version: 11.4 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce … On | 00000000:01:00.0 Off | N/A |
| N/A 42C P8 21W / N/A | 0MiB / 7982MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
±----------------------------------------------------------------------------+

cudaErrorInvalidGraphicsContext = 219

This indicates an error with the OpenGL or DirectX context.

Did you install nvidia driver with nvidia opengl components and update X config file to use nvidia X drivers?

Hi, I explicitly followed the quick start instructions (Quickstart Guide — DeepStream 6.1.1 Release documentation), and I don’t see anything in there similar to what you described - so probably not. Could describe the detailed steps involved for these two things? I tried to google them, but there is a lot of old clutter out there that doesn’t seem very relevant or is outdated…

Did you install nvidia driver with nvidia opengl components and update X config file to use nvidia X drivers?

You will met these prompts options in case you install the driver with run file. i recalled on user using Geforce 3060, used the run file to install the driver, so i guess you may use this method. that’s why i suggest the above.

Ok, so I have tried a few different ways of running that runfile (NVIDIA-Linux-x86_64-470.94.run), but keep getting this error: ERROR: Unable to load the ‘nvidia-drm’ kernel module.

I was following the instructions in Q1 of: Linux Troubleshooting — Omniverse Launcher documentation

I’ve tried with Yes/No for DKMS prompt, and Yes/No for the 32-bit support prompt, still hit this issue. Any ideas on what else needs to be done?
nvidia-installer.log (1.3 KB)

I think I got it figured out now. In case anyone has similar issues, here is the rough outline of what I did:
Reinstalled Ubuntu 18.04 - did not select the proprietary drivers box.
Opened console mode by hitting CTRL-ALT-F3 after rebooting at the login screen
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gcc make build-essential libc6:i386 libglvnd-dev pkg-config
Ran the 470.94 run file
Disabled nouveau by creating file /etc/mod/prob.d/blacklist-nvidia-nouveau.conf with contents:
blacklist nouveau
options nouveau modeset=0

sudo update-initramfs -u
rebooted

sudo apt-get install nvidia-prime
sudo prime-select nvidia
rebooted
*Still had trouble, at this point I went into the BIOS and disabled “Enable Hybrid Graphics /Advanced Optimus (when available)” - This might be specific to my Alienware

Everything worked at this point. Then I let Ubuntu apply its update, lost the desktop after that. Ran the run file again and everything was happy.

Hopefully that sums up everything that was done, its possible I missed a step somewhere in there (I’m sure some of of it wasn’t necessary, but oh well - hopefully someone can gain from my pain on this)…

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.