Please provide complete information as applicable to your setup.
• Hardware Platform: Jetson Orin
• DeepStream Version: 6.3
• JetPack Version 5.1.2 (r35.4.1)
• TensorRT Version: 8.5.2-1+cuda11.4
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type: Bug
Getting the following output on the deepstream_test_1.py demo (updated to use fakesink since it’s headless):
Creating Pipeline
Creating Source
Creating H264Parser
Creating Decoder
nvbufsurftransform: Could not get EGL display connection
Playing file ../../../../samples/streams/sample_720p.h264
Adding elements to Pipeline
Linking elements in the Pipeline
Starting pipeline
Opening in BLOCKING MODE
0:00:00.277767335 113117 0x28c87cc0 WARN v4l2 gstv4l2object.c:4561:gst_v4l2_object_probe_caps:<nvv4l2-decoder:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:00.277800071 113117 0x28c87cc0 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0x28401100 Failed to determine interlace mode
0:00:00.277817607 113117 0x28c87cc0 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0x28401100 Failed to determine interlace mode
0:00:00.277834600 113117 0x28c87cc0 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0x28401100 Failed to determine interlace mode
0:00:00.277850088 113117 0x28c87cc0 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0x28401100 Failed to determine interlace mode
0:00:00.285341102 113117 0x28c87cc0 WARN nvinfer gstnvinfer.cpp:679:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1174> [UID = 1]: Warning, OpenCV has been deprecated. Using NMS for clustering instead of cv::groupRectangles with topK = 20 and NMS Threshold = 0.5
0:00:03.134913375 113117 0x28c87cc0 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1988> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.3/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.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:03.297684007 113117 0x28c87cc0 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2091> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.3/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
nvbufsurface: Could not get EGL display connection
nvbufsurface: Can't get EGL display
0:00:03.305406800 113117 0x28c87cc0 ERROR nvinferallocator gstnvinfer_allocator.cpp:106:gst_nvinfer_allocator_alloc: Error: Could not map EglImage from NvBufSurface for nvinfer
0:00:03.305417649 113117 0x28c87cc0 WARN GST_BUFFER gstbuffer.c:951:gst_buffer_new_allocate: failed to allocate 88 bytes
0:00:03.305431217 113117 0x28c87cc0 WARN bufferpool gstbufferpool.c:305:do_alloc_buffer:<bufferpool0> alloc function failed
0:00:03.305438769 113117 0x28c87cc0 WARN bufferpool gstbufferpool.c:338:default_start:<bufferpool0> failed to allocate buffer
0:00:03.305449905 113117 0x28c87cc0 ERROR bufferpool gstbufferpool.c:559:gst_buffer_pool_set_active:<bufferpool0> start failed
0:00:03.305461297 113117 0x28c87cc0 WARN nvinfer gstnvinfer.cpp:994:gst_nvinfer_start:<primary-inference> error: Failed to set buffer pool to active
0:00:03.308267639 113117 0x28c87cc0 WARN GST_PADS gstpad.c:1142:gst_pad_set_active:<primary-inference:sink> Failed to activate pad
Error: gst-resource-error-quark: Failed to set buffer pool to active (1): gstnvinfer.cpp(994): gst_nvinfer_start (): /GstPipeline:pipeline0/GstNvInfer:primary-inference
Seems like it fails on NvBufSurfaceMapEglImage
in gstnvinfer_allocator.cpp; I’m not sure what the issue is.
Additionally, I’m not sure why there’s the Could not get EGL display connection
error; the systemd target is currently set to multi-user.target
and DISPLAY
is unset. I’ve tried with export DISPLAY=:0
as well but got the same warning.
• 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)
- Clone and build the deepstream bindings in GitHub - NVIDIA-AI-IOT/deepstream_python_apps: DeepStream SDK Python bindings and sample applications on the v1.1.8 tag
- patch in the following diff:
diff --git a/apps/deepstream-test1/deepstream_test_1.py b/apps/deepstream-test1/deepstream_test_1.py
index a03d326..8f99fca 100755
--- a/apps/deepstream-test1/deepstream_test_1.py
+++ b/apps/deepstream-test1/deepstream_test_1.py
@@ -172,23 +172,8 @@ def main(args):
if not nvvidconv:
sys.stderr.write(" Unable to create nvvidconv \n")
- # Create OSD to draw on the converted RGBA buffer
- nvosd = Gst.ElementFactory.make("nvdsosd", "onscreendisplay")
-
- if not nvosd:
- sys.stderr.write(" Unable to create nvosd \n")
-
# Finally render the osd output
- if is_aarch64():
- print("Creating nv3dsink \n")
- sink = Gst.ElementFactory.make("nv3dsink", "nv3d-sink")
- if not sink:
- sys.stderr.write(" Unable to create nv3dsink \n")
- else:
- print("Creating EGLSink \n")
- sink = Gst.ElementFactory.make("nveglglessink", "nvvideo-renderer")
- if not sink:
- sys.stderr.write(" Unable to create egl sink \n")
+ sink = Gst.ElementFactory.make("fakesink", "nvvideo-renderer")
print("Playing file %s " %args[1])
source.set_property('location', args[1])
@@ -207,7 +192,6 @@ def main(args):
pipeline.add(streammux)
pipeline.add(pgie)
pipeline.add(nvvidconv)
- pipeline.add(nvosd)
pipeline.add(sink)
# we link the elements together
@@ -226,8 +210,7 @@ def main(args):
srcpad.link(sinkpad)
streammux.link(pgie)
pgie.link(nvvidconv)
- nvvidconv.link(nvosd)
- nvosd.link(sink)
+ nvvidconv.link(sink)
# create an event loop and feed gstreamer bus mesages to it
loop = GLib.MainLoop()
@@ -235,22 +218,17 @@ def main(args):
bus.add_signal_watch()
bus.connect ("message", bus_call, loop)
- # Lets add probe to get informed of the meta data generated, we add probe to
- # the sink pad of the osd element, since by that time, the buffer would have
- # had got all the metadata.
- osdsinkpad = nvosd.get_static_pad("sink")
- if not osdsinkpad:
- sys.stderr.write(" Unable to get sink pad of nvosd \n")
-
- osdsinkpad.add_probe(Gst.PadProbeType.BUFFER, osd_sink_pad_buffer_probe, 0)
-
# start play back and listen to events
print("Starting pipeline \n")
pipeline.set_state(Gst.State.PLAYING)
+
try:
loop.run()
- except:
- pass
+ finally:
+ with open('/tmp/demo.dot', 'w') as outf:
+ outf.write(Gst.debug_bin_to_dot_data(
+ pipeline, Gst.DebugGraphDetails.ALL
+ ))
# cleanup
pipeline.set_state(Gst.State.NULL)
run GST_DEBUG=3 python3 deepstream_test_1.py ../../../../samples/streams/sample_720p.h264