Failed to open X11 display connection

I am using jetson agx orin with deepstream 7.0. when i run projects example i get this error:

0:00:00.145821669  7747 0xaaab0892c470 ERROR         nvvideodisplay display_x11.c:77:gst_nv_video_display_x11_new: failed to open X11 display connection
0:00:00.145890916  7747 0xaaab0892c470 ERROR         nvvideodisplay display.c:105:gst_nv_video_display_new: couldn't create display. GST_NV_VIDEO_WINSYS = (null)
0:00:00.145924228  7747 0xaaab0892c470 ERROR               nv3dsink gstnv3dsink.c:245:gst_nv3dsink_start:<nv3d-sink> failed to create new display
0:00:00.145937315  7747 0xaaab0892c470 WARN                basesink gstbasesink.c:5878:gst_base_sink_change_state:<nv3d-sink> error: Failed to start
Error: gst-core-error-quark: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure. (4): ../libs/gst/base/gstbasesink.c(5878): gst_base_sink_change_state (): /GstPipeline:pipeline0/GstNv3dSink:nv3d-sink:
Failed to start
Exiting app

I use the Jetson with virtual display (es.vnc). I run this example with GST_DEBUG=3 python3 deepstream_test_3.py -i /opt/nvidia/deepstream/deepstream-7.0/samples/streams/sample_720p.h264

If i change DISPLAY env in 1001 this example return this warn:

WARNING: [TRT]: The implicit batch dimension mode has been deprecated. Please create the network with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag whenever possible.
WARNING: [TRT]: Missing scale and zero-point for tensor output_bbox/bias, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor conv1/kernel, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor conv1/bias, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor bn_conv1/moving_variance, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor bn_conv1/Reshape_1/shape, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor bn_conv1/batchnorm/add/y, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor bn_conv1/gamma, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor bn_conv1/Reshape_3/shape, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor bn_conv1/beta, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor bn_conv1/Reshape_2/shape, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor bn_conv1/moving_mean, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor bn_conv1/Reshape/shape, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor block_1a_conv_1/kernel, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
WARNING: [TRT]: Missing scale and zero-point for tensor block_1a_conv_1/bias, expect fall back to non-int8 implementation for any layer consuming or producing given tensor

And crash with this error:

ferContext[UID 1]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:2136> [UID = 1]: failed to serialize cude engine to file: /opt/nvidia/deepstream/deepstream-7.0/samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b1_gpu0_int8.engine
INFO: [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1         3x544x960       
1   OUTPUT kFLOAT output_bbox/BiasAdd 16x34x60        
2   OUTPUT kFLOAT output_cov/Sigmoid 4x34x60         

nvbufsurface: Failed to create EGLImage.
0:02:06.727235878  8992 0xaaaaeb3ff440 ERROR       nvinferallocator gstnvinfer_allocator.cpp:107:gst_nvinfer_allocator_alloc: Error: Could not map EglImage from NvBufSurface for nvinfer
0:02:06.727268103  8992 0xaaaaeb3ff440 WARN              GST_BUFFER gstbuffer.c:958:gst_buffer_new_allocate: failed to allocate 88 bytes
0:02:06.727295176  8992 0xaaaaeb3ff440 WARN              bufferpool gstbufferpool.c:318:do_alloc_buffer:<bufferpool0> alloc function failed
0:02:06.727304425  8992 0xaaaaeb3ff440 WARN              bufferpool gstbufferpool.c:351:default_start:<bufferpool0> failed to allocate buffer
0:02:06.727311945  8992 0xaaaaeb3ff440 ERROR             bufferpool gstbufferpool.c:572:gst_buffer_pool_set_active:<bufferpool0> start failed
0:02:06.727325385  8992 0xaaaaeb3ff440 WARN                 nvinfer gstnvinfer.cpp:1008:gst_nvinfer_start:<primary-inference> error: Failed to set buffer pool to active
0:02:06.737512057  8992 0xaaaaeb3ff440 WARN                GST_PADS gstpad.c:1141:gst_pad_set_active:<primary-inference:sink> Failed to activate pad

**PERF:  {'stream0': 0.0} 

Error: gst-resource-error-quark: Failed to set buffer pool to active (1): /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(1008): gst_nvinfer_start (): /GstPipeline:pipeline0/GstNvInfer:primary-inference
Exiting app

Are you running the program through ssh? DeepStream does not support x11-forwarding

Try the following command line.

export `cat /proc/$(pidof "gnome-shell")/environ | tr '\0' '\n' | grep ^DISPLAY=`

After run the command and run GST_DEBUG=3 python3 deepstream_test_3.py -i file:///opt/nvidia/deepstream/deepstream-7.0/samples/streams/yoga.mp the example exit with this error

nvbufsurface: Failed to create EGLImage.
0:01:45.206528502  5219 0xaaaaf304ca40 ERROR       nvinferallocator gstnvinfer_allocator.cpp:107:gst_nvinfer_allocator_alloc: Error: Could not map EglImage from NvBufSurface for nvinfer
0:01:45.206561590  5219 0xaaaaf304ca40 WARN              GST_BUFFER gstbuffer.c:958:gst_buffer_new_allocate: failed to allocate 88 bytes
0:01:45.206591735  5219 0xaaaaf304ca40 WARN              bufferpool gstbufferpool.c:318:do_alloc_buffer:<bufferpool0> alloc function failed
0:01:45.206599767  5219 0xaaaaf304ca40 WARN              bufferpool gstbufferpool.c:351:default_start:<bufferpool0> failed to allocate buffer
0:01:45.206606999  5219 0xaaaaf304ca40 ERROR             bufferpool gstbufferpool.c:572:gst_buffer_pool_set_active:<bufferpool0> start failed
0:01:45.206619383  5219 0xaaaaf304ca40 WARN                 nvinfer gstnvinfer.cpp:1008:gst_nvinfer_start:<primary-inference> error: Failed to set buffer pool to active
0:01:45.214258880  5219 0xaaaaf304ca40 WARN                GST_PADS gstpad.c:1141:gst_pad_set_active:<primary-inference:sink> Failed to activate pad

**PERF:  {'stream0': 0.0} 

Error: gst-resource-error-quark: Failed to set buffer pool to active (1): /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(1008): gst_nvinfer_start (): /GstPipeline:pipeline0/GstNvInfer:primary-inference
Exiting app

Is your orin connected to a monitor? Try connecting to a monitor. It is possible that x11 has not started properly.

my orin is not connected to the monitor because I do not have the possibility to connect it. How can I make it work, at least see that the inference happens

Try updating Jetpack. If you are inconvenient to connect the monitor, you can use the following guidelines.

https://docs.nvidia.com/jetson/jetpack/install-setup/index.html#package-management-tool

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