Error using eglstreamcube instance

IDE:jeston 36.0
JetPack6.0
core board:orin Nano4GB
board:Jetson Orin Nano Developer Kit
kernel source: Jetson Linux 36.3 | NVIDIA Developer
rootfs source: Basic Flavor Root File System Root File System — NVIDIA Jetson Linux Developer Guide 1 documentation

ys@tegra-ubuntu:/usr/src/nvidia/graphics_demos/eglstreamcube/x11$ ./eglstreamcube
X failed to open display.
Usage: eglstreamcube [options] [command] [command options]
  Listen on <socket name>:
    [-socket <socket name>]
  Window system options (not all available on all platforms):
    [-windowsize] [<xres> <yres>]                  (window size)
    [-windowoffset <xpos> <ypos>]                  (window position)
                                   *Not supported on Wayland*

  Rendering options (availability varies by platform):
    [-buffering <n>]                               (n-buffered swaps)
                                                   (Max 4)
    [-msaa <samples>]                              (multi sampling)
    [-csaa <samples>]                              (coverage sampling)
    [-vcaa <samples>]                              (coverage sampling)
    [-useprogbin <boolean>]                        (program binary loading)
    [-smart <boolean>]                             (detect termination in
                                                   cross-partition stream)
    [-eglstreamsocket <socket name>]               (socket to get EGLStream from)
    [-fifo <length>]                               (0 min, 5 max)
    [-renderahead <length>]                        (-1 min, 10 max)
                                                   (Max number of in-flight GPU
                                                   frames in mailbox mode to
                                                   throttle mailbox mode.)
    [-latency <usec>]                              (0 min, 2147483647 max)
    [-timeout <usec>]                              (0 min, 2147483647 max)
    [-frames <#>]                                  (max numnber of frames to run)
    [-ip <IP address>]                             (IP address)
    [-port <int>]                                  (port number for multiple consumers)
    [-proctype <producer or consumer>]             (Producer or Consumer)
    [-surfaceid <n>]                               (0 min, 9999 max)
    [-sec <seconds>]                               (0 forever, 3153600 max)
    [-inactivity <secs>]                           (time to render on/off)

  Note:
    Use of parameters which modify the display configuration
    is primarily intended for use when running the application
    in a standalone fashion.  When there is a separate display
    server running, their use is discouraged, as they will blindly
    change the state without regard to any other applications
    sharing the display.

How to solve this problem?

Hello @56101855,

Do you have a display connected to the board or are you trying to use it headless through ssh ?

We would recommend the following debugging procedure:

  1. Try connecting a display and see if the error persist.
  2. If you are using ssh, please make sure to run it -X for instance: ssh -X <user>@ip
  3. Try using a remote desktop headless setup.

Please keep us posted.

regards,
Andrew
Embedded Software Engineer
ContactUs: support@proventusnova.com
www.proventusnova.com

Hi,
You can run $ xrandr to check if the display output is well set.

And can try this:
Problems getting EGL Stream transferred to another process on same machine - #7 by DaneLLL

The monitor is connected successfully, and there is a command line display on the monitor.I entered the relevant instructions through the serial command line.

ys@tegra-ubuntu:/usr/src/nvidia/graphics_demos/eglstreamcube/x11$ xrandr
Can't open display
ys@tegra-ubuntu:/usr/src/nvidia/graphics_demos/eglstreamcube/x11$

The monitor is connected successfully, and there is a command line display on the monitor.I entered the relevant instructions through the serial command line.

Hi,
Please try

$ DISPLAY=:0 xrandr

or

$ DISPLAY=:1 xrandr

to confirm the index of DISPLAY is 0 or 1

Thank you for your timely help!
Here’s what happens when I run it:

Hi,
Basic flavor rootfs does not initialize X11. Please use desktop flavor rootfs.

I don’t want a desktop, if I download the version with a desktop, I don’t want a desktop display, how do I change it?

Hi,
The sample depends on X1(or Weston). If you don’t initialize X11, failing to run the sample is expected.

Is there a way to initialize only x11?

Porting the file system with desktop according to your suggestion.
Running xrandr through the serial port fails to open. By typing xrandr under the command on the development board, relevant information can be displayed normally.


This information can be displayed on the serial command line using DISPLAY=:1 xrandr.