Nveglglessink fails with CUDA error 219 in ds5.0

I rebooted the host and it’s still the same.

Could it be the fact that I’m using chrome-remote-desktop, and the allocated display is :20 instead of the default :0 ? If yes then I will try somehow to get access to physical monitor and test again.

seriously suspect chrome-remote-desktop, have you tried physical monitor?

Thanks!

I am also facing the same issue while using chrome-remote-desktop. Is there any way to see the output in remote desktop? I am running the sample in GCP VM Instance.

As a workaround, as described in my initial post, you can use glimagesink instead of nveglglessink. If streaming errors occur as a result of this replacement, it might be because glimagesink does not accept buffers with caps memory:NVMM, but this should be easily solved by placing nvvideoconvert just before it (in case it’s not already there).

1 Like

Thanks a lot dorin. Temporarily, I am using File Sink to write the output to a file and RTSP Output to visualize output on VLC Media Player. It works fine on chrome remote desktop.

OK I tried with physical monitor and got nveglglessink working.
Apparently it’s a complex issue, without a single component at fault, and I have identified the following mandatory conditions for working:

  • Runing xhost + on host. Although mounting the xauthority file in container works fine without xhost + for chrome-remote-desktop (or other rdp), it’s just not enough for physical desktop on ubuntu 18, and will throw “Protocol not specified” errors without it.

  • Using the GPU which has the monitor connected. In a multi-gpu setup, most likely only one is connected with HDMI to monitor. Environment variable NVIDIA_VISIBLE_DEVICES controls which gpus are visible in the container, so it must be either set to all or to the index of the gpu connected to monitor. Again, this doesn’t matter for chrome-remote-desktop, but for physical desktop it does and will generate Segmentation Fault if it doesn’t match (but it won’t throw error 219).

  • When switching the HDMI cable to another GPU, reboot is required. This also means that the monitor cannot be plugged in after reboot, and the system needs to boot up with a monitor already connected.

Also interesting is that in the case of physical monitor, if the conditions above are not met, then glimagesink will not work either but might throw different errors.

2 Likes

Hi @mchi, @Amycao, @kayccc

I do not have access to physical monitor as this is AWS. Main reason is due to SSH access. I tried with xhost + and export Display=“localhostip”:0.0
Kindly help

I don’t think there’s any way nveglglessink will work without physical monitor (at least until the next deepstream update). Your only choice is to remove the element (and replace it with glimagesink in case you attach a remote desktop).

1 Like

We do not support without physical monitor if you use nveglglessink type, you could use type 4=RTSPStreaming in config in case you running from AWS, then you can view the output by player
vlc.

Hi @Amycao, @kayccc, @mchi
Consider my pipeline
gst-launch-1.0 filesrc location=…/…/samples/streams/sample_1080p_h264.mp4 !
decodebin ! m.sink_0 nvstreammux name=m batch-size=1 width=1280
height=720 ! nvinfer config-file-path= config_infer_primary_ssd.txt !
nvvideoconvert ! nvdsosd ! nveglglessink
As you said above instead of use type 4=RTSPStreaming I want to use type 3=File using gst element instead of nveglglessink. Kindly give the step to change the same to just save the video

check this,
gst-launch-1.0 filesrc location=samples/streams/sample_1080p_h264.mp4 ! decodebin ! m.sink_0 nvstreammux name=m batch-size=1 width=1280 height=720 ! nvinfer config-file-path=samples/configs/deepstream-app/config_infer_primary.txt ! nvvideoconvert ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=/home/nvidia/script.mp4

Kindly see below. There is no error but it is notplaying or exiting. Kindly help.
sudo gst-launch-1.0 filesrc location=samples/streams/sample_1080p_h264.mp4 ! decodebin ! m.sink_0 nvstreammux name=m batch-size=1 width=1280 height=720 ! nvinfer config-file-path=samples/configs/deepstream-app/config_infer_primary.txt ! nvvideoconvert ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=./script.mp4
Setting pipeline to PAUSED …
WARNING: …/nvdsinfer/nvdsinfer_func_utils.cpp:34 [TRT]: Current optimization profile is: 0. Please ensure there are no enqueued operations pending in this context prior to switching profiles
0:00:04.290935603 2553 0x55b9efe5f640 INFO nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1577> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-5.0/samples/models/Primary_Detector/resnet10.caffemodel_b30_gpu0_int8.engine
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:685 [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:04.291007161 2553 0x55b9efe5f640 INFO nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1681> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-5.0/samples/models/Primary_Detector/resnet10.caffemodel_b30_gpu0_int8.engine
0:00:04.294570647 2553 0x55b9efe5f640 INFO nvinfer gstnvinfer_impl.cpp:311:notifyLoadModelStatus: [UID 1]: Load new model:samples/configs/deepstream-app/config_infer_primary.txt sucessfully
Pipeline is PREROLLING …
q^Chandling interrupt.
Interrupt: Stopping pipeline …
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to NULL …
^C