Hi,
Please make sure you run below first before you run sample with sink type nveglglessink
export DISPLAY=:0 or 1
xrandr // to check if display exported successfully
No protocol specified
Can't open display :0 (or 1)
and not working for running
deepstream-test1-app /opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.h264
No protocol specified
nvbuf_utils: Could not get EGL display connection
No protocol specified
No EGL Display
Also, I found that it originally can run the following example app, before setting export DISPLAY=:0 or 1
But after setting that, this app cannot run either, got error as follows
No protocol specified
nvbuf_utils: Could not get EGL display connection
No protocol specified
No EGL Display
nvbufsurftransform: Could not get EGL display connection
Before the setting it would work.
Any comments on this?
Do you have real display (e.g. HDMI TV) connected on NX?
If there is HDMI connected, as Amy said above
export DISPLAY=:0 or 1
xrandr // to check if display exported successfully
Run docker with “xhost +” and “-e DISPLAY=$DISPLAY” so that docker can use the display
$ xhost +
$ sudo docker run -it --rm --net=host --runtime nvidia --device=/dev/video0:/dev/video0 -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-5.1 -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/deepstream-l4t:5.1-21.02-samples
If there isn’t HDMI connected,
Run docker without “-e DISPLAY=$DISPLAY” and “xhost +”
$ sudo docker run -it --rm --net=host --runtime nvidia --device=/dev/video0:/dev/video0 -w /opt/nvidia/deepstream/deepstream-5.1 -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/deepstream-l4t:5.1-21.02-samples
for sample - deepstream-test1-app which by default render the output to display, need below change to output to fakesink
yes, since you have HDMI connected, you need to find out a valid “DISPLAY” outside of docker by
export DISPLAY=:0 or 1
xrandr // to check if display exported successfully
but as you said above, neither “DISPLAY=:0” or “DISPLAY=:1” work for you, it’s weird. You could try Amy’s suggestion - login the UBuntu desktop.
=====================================
If there is HDMI connected, as Amy said above
1. export DISPLAY=:0 or 1
xrandr // to check if display exported successfully
2. Run docker with “xhost +” and “-e DISPLAY=$DISPLAY” so that docker can use the display
$ xhost +
$ sudo docker run -it --rm --net=host --runtime nvidia --device=/dev/video0:/dev/video0 -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-5.1 -v /tmp/.X11-unix/:/tmp/.X11-unix [nvcr.io/nvidia/deepstream-l4t:5.1-21.02-samples](http://nvcr.io/nvidia/deepstream-l4t:5.1-21.02-samples)