Prblem with Gstreamer nveglglessink output (Could not get EGL display)

Hello!

JetPack 4.5.1. When trying to run the Gstreamer pipeline with nveglglessink output, the image does not display:

gst-launch-1.0 --gst-debug-level=3 videotestsrc ! video/x-raw,width=640,height=480 ! videoconvert ! nveglglessink -e

Error log:

Using winsys: x11 
0:00:00.203409843  7788   0x5583e76e00 ERROR            egladaption gstegladaptation_egl.c:155:gst_egl_adaptation_init_display:<eglglessink0> Could not get EGL display connection
0:00:00.203464166  7788   0x5583e76e00 ERROR            egladaption gstegladaptation_egl.c:196:gst_egl_adaptation_init_display:<eglglessink0> Couldn't setup window/surface from handle
0:00:00.203490521  7788   0x5583e76e00 ERROR          nveglglessink gsteglglessink.c:566:egl_init:<eglglessink0> Couldn't init EGL display
0:00:00.203512500  7788   0x5583e76e00 ERROR          nveglglessink gsteglglessink.c:592:egl_init:<eglglessink0> Failed to perform EGL init

The xvimagesink method works good:

gst-launch-1.0 --gst-debug-level=3 videotestsrc ! video/x-raw,width=640,height=480 ! videoconvert ! xvimagesink

The nvoverlaysink method works, but with the same error in the log:

gst-launch-1.0 --gst-debug-level=3 videotestsrc ! video/x-raw,width=640,height=480 ! videoconvert ! nvoverlaysink

nvbuf_utils: 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.066278693  9091   0x557cbfcf00 WARN                     omx gstomx.c:2826:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/cnvs/.config:/etc/xdg/xdg-unity:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)

What I tried to do:

  1. export DISPLAY=:0 (export DISPLAY=:1, unset DISPLAY)
  2. Disabled SSH X11Forwarding in /etc/ssh/sshd_config
  3. Disabled X11VNC server (run Gstreamer using the keyboard)
  4. Added a section in /etc/X11/xorg.conf
Section "Screen"
Identifier "Screen0"
Monitor    "Monitor0"
    SubSection "Display"
    Viewport   0 0
    Modes "1024x600"
    Depth   24 
    Virtual 1024 600
EndSubSection
EndSection

String from var/log/Xorg.0.log:

[ 19.152] (II) NVIDIA(0): Setting mode "HDMI-0: nvidia-auto-select @1024x600 +0+0 {ViewPortIn=1024x600, ViewPortOut=1024x600+0+0}"

  1. How can I fix this problem?
  2. Which works faster on Jetson Nano - nveglglessink or xvimagesink?

Hi,
Please try

$ export DISPLAY=:0
$ gst-launch-1.0 --gst-debug-level=3 videotestsrc ! video/x-raw,width=640,height=480 ! nvvidconv ! nvegltransform ! nveglglessink -e

or

$ export DISPLAY=:0
$ gst-launch-1.0 --gst-debug-level=3 videotestsrc ! video/x-raw,width=640,height=480 ! nvvidconv ! 'video/x-raw(memory:NVMM)' ! nv3dsink -e

If you need window-based sink on Jetson platforms, we suggest use nveglglessink or nv3dsink.

Thanks for the answer! I tried these pipelines, unfortunately the problem persists. Maybe I need to reinstall Gstreamer?

nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
Setting pipeline to PAUSED ...

Using winsys: x11 
0:00:00.076741976  9559   0x55c1e5bad0 ERROR            egladaption gstegladaptation_egl.c:155:gst_egl_adaptation_init_display:<eglglessink0> Could not get EGL display connection
0:00:00.076785987  9559   0x55c1e5bad0 ERROR            egladaption gstegladaptation_egl.c:196:gst_egl_adaptation_init_display:<eglglessink0> Couldn't setup window/surface from handle
0:00:00.076808019  9559   0x55c1e5bad0 ERROR          nveglglessink gsteglglessink.c:566:egl_init:<eglglessink0> Couldn't init EGL display
0:00:00.076827550  9559   0x55c1e5bad0 ERROR          nveglglessink gsteglglessink.c:592:egl_init:<eglglessink0> Failed to perform EGL init

Hi,
Please check if cleaning cache helps:
gst-inspect is not work properly in DS4.0 - #4 by DaneLLL

The command are supposed to work on default release. If you are able to boot and see Ubuntu desktop, should not see the error.