ERROR: <main:675>: Could not open X Display

Please provide complete information as applicable to your setup.

**• Hardware Platform GPU
**• DeepStream Version 6.0
**• TensorRT Version 8.2

Hi I wanted to test the ObjectDetection_fasterRCNN and followed all the readme instructions. I used this command to start the deepstream app:
$ deepstream-app -c deepstream_app_config_fasterRCNN.txt

It shows following error:

INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 5
0 INPUT kFLOAT data 3x375x500
1 INPUT kFLOAT im_info 1x1x3
2 OUTPUT kFLOAT rois 1x300x4
3 OUTPUT kFLOAT bbox_pred 300x84x1x1
4 OUTPUT kFLOAT cls_prob 300x21x1x1

0:00:02.582413182 130 0x560a49f4a030 INFO nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2004> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.0/sources/objectDetector_FasterRCNN/VGG16_faster_rcnn_final.caffemodel_b1_gpu0_fp32.engine
0:00:02.589208112 130 0x560a49f4a030 INFO nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus:<primary_gie> [UID 1]: Load new model:/opt/nvidia/deepstream/deepstream-6.0/sources/objectDetector_FasterRCNN/config_infer_primary_fasterRCNN.txt sucessfully
** ERROR: main:675: Could not open X Display
Quitting
App run failed

in another discussion it is said that not to use sudo, well I am not using sudo to run deepstream app. How to fix this? any help?

Please provide which GPU you are using?

NVIDIA GeForce RTX 3070 Laptop GPU

You can run from desktop directly, or you can run from remote terminal by exporting display,
export DISPLAY=:0 or 1 // xrandr to check display environment exported or not.

now this new error occurs:

root@0ec7d6ae51a9:/opt/nvidia/deepstream/deepstream-6.0/sources/project/deepstre
am_fasterRCNN# export DISPLAY=:1
root@0ec7d6ae51a9:/opt/nvidia/deepstream/deepstream-6.0/sources/project/deepstre
am_fasterRCNN# deepstream-app -c deepstream_app_config_fasterRCNN.txt
Warn: ‘threshold’ parameter has been deprecated. Use ‘pre-cluster-threshold’ instead.
** ERROR: main:658: Failed to set pipeline to PAUSED
Quitting
App run failed

How about result xrandr after export DISPLAY=:1?

I don’t understand the xrandr you’ve said. after running export DISPLAY=:1 I didn’t get any output. would you explain more how to do it?

Just type xrandr in your terminal, if display environment exported success, you will see display information by xrandr.

$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 2400, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
eDP-1-1 connected primary 3840x2400+0+0 (normal left inverted right x axis y axis) 344mm x 215mm
3840x2400 60.00*+
3840x2160 59.97
3200x1800 59.96 59.94
2880x1620 59.96 59.97
2560x1600 59.99 59.97
2560x1440 59.99 59.96 59.95
2048x1536 60.00
1920x1440 60.00
1856x1392 60.01
1792x1344 60.01
2048x1152 59.99 59.98 59.90 59.91
1920x1200 59.88 59.95
1920x1080 60.01 59.97 59.96 59.93
1600x1200 60.00
1680x1050 59.95 59.88
1600x1024 60.17
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1440x900 59.89
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1360x768 59.80 59.96
1280x800 59.99 59.97 59.81 59.91
1152x864 60.00
1280x720 60.00 59.99 59.86 59.74
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
960x540 59.96 59.99 59.63 59.82
800x600 60.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
800x512 60.17
700x525 59.98
800x450 59.95 59.82
640x512 60.02
720x450 59.89
700x450 59.96 59.88
640x480 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
680x384 59.80 59.96
640x400 59.88 59.98
576x432 60.06
640x360 59.86 59.83 59.84 59.32
512x384 60.00
512x288 60.00 59.92
480x270 59.63 59.82
400x300 60.32 56.34
432x243 59.92 59.57
320x240 60.05
360x202 59.51 59.13
320x180 59.84 59.32
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-3 disconnected (normal left inverted right x axis y axis)
DP-1-4 disconnected (normal left inverted right x axis y axis)

this is the output of xrandr I’ve got

Try to clean the cache by rm ~/.cache/gstreamer-1.0/ -rf
if still error, try add GST_DEBUG=5 in the app command, run again to get more debug log.

cleaned the cache as you mentioned but the problem still occurs, could not open x display. I tried to launch with gstream
gst-launch-1.0 filesrc location=…/…/samples/streams/sample_1080p_h264.mp4 !
decodebin ! m.sink_0 nvstreammux name=m batch-size=1 width=1920
height=1080 ! nvinfer config-file-path= config_infer_primary_fasterRCNN.txt !
nvvideoconvert ! nvdsosd ! nveglglessink sync=0

it showed the following error in the image:

how to add GST_DEBUG=5 to get more debug as you mentioned? would you explain more?

The result mentioned in comment 17 got in container or from host?
GST_DEBUG=5 app

from the container

Did you run xhost + before run docker.

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

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