I plan to use DeepStream for running an image segmentation model on my Jetson Orin. The Orin is not connected to any display, so I SSH into it. I have a Docker container on the Orin for running other processes. I installed all the necessary libraries required for DeepStream inside this Docker container.
However, when I run a sample test case, I get the following error:
$ deepstream-app -c source1_usb_dec_infer_resnet_int8.txt
No EGL Display
nvbufsurftransform: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
nvdc: open: No such file or directory
nvdc: failed to open ‘/dev/tegra_dc_ctrl’.
Could not open DRM failed
** ERROR: main:716: Failed to set pipeline to PAUSED
Quitting
ERROR from sink_sub_bin_sink1: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Debug info: gstbasesink.c(5367): gst_base_sink_change_state (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/GstNvDrmVideoSink:sink_sub_bin_sink1:
Failed to start
App run failed
I tried various solutions online, but none of them worked. I attempted to unset DISPLAY to fix the EGL connection error, but it didn’t resolve the issue.
Did you change the type of sink config in source1_usb_def_infer_resnet_int8.txt? By default it is 2 which means display on the screen, you can change it to a file or other options.
PS, please also check $DISPLAY is set or not in the shell environment, you’ll need to unset it if there is a value and if you want to run remotely via SSH.
2.I did echo $DISPLAY and I don’t see any value, which is correct.
Here is the detailed error log
/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app$ GST_DEBUG=3 deepstream-app -c source1_usb_dec_infer_resnet_int8_trial.txt No EGL Display nvbufsurftransform: Could not get EGL display connection nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
0:00:04.849562609 4102 0xaaaae553f930 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.engine
INFO: [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:05.008280275 4102 0xaaaae553f930 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.engine nvbufsurface: eglGetDisplay failed with error 0x300c nvbufsurface: Can’t get EGL display
0:00:05.034670909 4102 0xaaaae553f930 ERROR nvinferallocator gstnvinfer_allocator.cpp:102:gst_nvinfer_allocator_alloc: Error: Could not map EglImage from NvBufSurface for nvinfer
0:00:05.034688669 4102 0xaaaae553f930 WARNGST_BUFFER gstbuffer.c:951:gst_buffer_new_allocate: failed to allocate 88 bytes
0:00:05.034709181 4102 0xaaaae553f930 WARNbufferpool gstbufferpool.c:305:do_alloc_buffer: alloc function failed
0:00:05.034714525 4102 0xaaaae553f930 WARNbufferpool gstbufferpool.c:338:default_start: failed to allocate buffer
0:00:05.034718365 4102 0xaaaae553f930 ERRORbufferpool gstbufferpool.c:559:gst_buffer_pool_set_active: start failed
0:00:05.034726845 4102 0xaaaae553f930 WARNnvinfer gstnvinfer.cpp:943:gst_nvinfer_start:<primary_gie> error: Failed to set buffer pool to active
0:00:05.036631669 4102 0xaaaae553f930 WARNGST_PADS gstpad.c:1142:gst_pad_set_active:<primary_gie:sink> Failed to activate pad ERROR: main:716: Failed to set pipeline to PAUSED Quitting ERROR from primary_gie: Failed to set buffer pool to active
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(943): gst_nvinfer_start (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie
App run failed
The above error logs are seen when I run the deepstream samples inside my Orin’s custom docker.
Deepstream runs without errors if I run it outside my docker.
Understood, it’s an oversight. I will try enabling the sink after going to my workplace.
One more question, yesterday I also tried connecting the display to my orin just for checking. The deepstream-test1-app worked when checked outside my docker container.
I used the default source and config files provided for deepstream-test1-app. The command I used is :
But when I run the same app, inside my custom docker, while the orin is connected to display, I got the similar EGL display error. Is it expected ? Docker won’t recognize display ?
To summarize,
I ssh into my orin (orin is physically not connected to any display in this case), and when I run any sample apps outside the docker container, the deepstream app runs without any issues.
But when I run it inside my docker container, it always throws errors related to EGL display and nvbuf as shown below :
When Sink type = 3 (Encode + File Save (encoder + muxer + filesink)):
/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app$ GST_DEBUG=3 deepstream-app -c test.txt
**No EGL Display **
**nvbufsurftransform: Could not get EGL display connection**
**nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR**
**nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR**
0:00:00.122765043 527 0xaaaab5659610 WARN GST_ELEMENT_FACTORY gstelementfactory.c:458:gst_element_factory_make: no such element factory "nvv4l2h264enc"!
** ERROR: <create_encode_file_bin:386>: Failed to create 'sink_sub_bin_encoder1'
** ERROR: <create_encode_file_bin:478>: create_encode_file_bin failed
** ERROR: <create_sink_bin:792>: create_sink_bin failed
** ERROR: <create_processing_instance:815>: create_processing_instance failed
** ERROR: <create_pipeline:1327>: create_pipeline failed
** ERROR: <main:697>: Failed to create pipeline
Quitting
App run failed
When Sink type =1 (Fakesink)
sudo GST_DEBUG=3 deepstream-app -c deepstream_app_config.txt
No EGL Display
nvbufsurftransform: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
Deserialize yoloLayer plugin: yolo
0:00:06.279344823 632 0xaaaaf9982660 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 1]: deserialized trt engine from :/home/developer/revanth/DeepStream-Yolo/model_b1_gpu0_fp32.engine
INFO: [Implicit Engine Info]: layers num: 5
0 INPUT kFLOAT data 3x640x640
1 OUTPUT kFLOAT num_detections 1
2 OUTPUT kFLOAT detection_boxes 8400x4
3 OUTPUT kFLOAT detection_scores 8400
4 OUTPUT kFLOAT detection_classes 8400
0:00:06.429591211 632 0xaaaaf9982660 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 1]: Use deserialized engine model: /home/developer/revanth/DeepStream-Yolo/model_b1_gpu0_fp32.engine
nvbufsurface: eglGetDisplay failed with error 0x300c
nvbufsurface: Can't get EGL display
0:00:06.455536975 632 0xaaaaf9982660 ERROR nvinferallocator gstnvinfer_allocator.cpp:102:gst_nvinfer_allocator_alloc: Error: Could not map EglImage from NvBufSurface for nvinfer
0:00:06.455555887 632 0xaaaaf9982660 WARN GST_BUFFER gstbuffer.c:951:gst_buffer_new_allocate: failed to allocate 88 bytes
0:00:06.455574863 632 0xaaaaf9982660 WARN bufferpool gstbufferpool.c:305:do_alloc_buffer:<bufferpool0> alloc function failed
0:00:06.455580111 632 0xaaaaf9982660 WARN bufferpool gstbufferpool.c:338:default_start:<bufferpool0> failed to allocate buffer
0:00:06.455584431 632 0xaaaaf9982660 ERROR bufferpool gstbufferpool.c:559:gst_buffer_pool_set_active:<bufferpool0> start failed
0:00:06.455593455 632 0xaaaaf9982660 WARN nvinfer gstnvinfer.cpp:943:gst_nvinfer_start:<primary_gie> error: Failed to set buffer pool to active
0:00:06.482067642 632 0xaaaaf9982660 WARN GST_PADS gstpad.c:1142:gst_pad_set_active:<primary_gie:sink> Failed to activate pad
** ERROR: <main:716>: Failed to set pipeline to PAUSED
Quitting
ERROR from primary_gie: Failed to set buffer pool to active
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(943): gst_nvinfer_start (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie
App run failed
So did you run xhost + on your host?
I have run the source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt on my board without connecting to a monitor. It works normally.
There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks