we need to use NvBufSurfaceMapEglImage() function, but we found it can’t work at headless device(for example below demo is executed on thor device via ssh, without a connected physical display(headless))
below is an example, we initialize egl according to argus demo, and then use NvBufSurfaceMapEglImage() fuction.
if we don’t set “export DISPLAY=:0”, it will return error like below ./nvbuf_headless_demo [Demo] NvBufSurface created. [EGL] display_initialize() success. nvbufsurface: Failed to create EGLImage. [Demo] NvBufSurfaceMapEglImage failed
if we set “export DISPLAY=:0”, it work normally. [Demo] NvBufSurface created. [EGL] display_initialize() success. [Demo] NvBufSurfaceMapEglImage success [Demo] Done.
I think if set “export DISPLAY=:0”, it will use xorg,is there any method that not use xorg, still can use NvBufSurfaceMapEglImage() function with headless device?
because we found sometimes xorg will crash, if xorg crash, we can’t initialize the egl successfully even though we set “export DISPLAY=:0”
we need to use egl+NvBufSurfaceImport to fulfil zero-copy function at inter-process, but xorg is not stable.
below is the demo compile method g++ nvbuf_headless_demo.cpp -o nvbuf_headless_demo -I/usr/src/jetson_multimedia_api/include -L/usr/lib/aarch64-linux-gnu/nvidia -lEGL -lnvbufsurface
Hi,
We don’t hit the issue on AGX Thor developer kit:
$ ssh nvidia@10.19.115.108
nvidia@10.19.115.108's password:
Welcome to Ubuntu 24.04.3 LTS (GNU/Linux 6.8.12-tegra aarch64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
To restore this content, you can run the 'unminimize' command.
Expanded Security Maintenance for Applications is not enabled.
51 updates can be applied immediately.
31 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
Last login: Mon Nov 10 07:06:58 2025 from 172.29.101.87
nvidia@tegra-ubuntu:~$ ./nvbuf_headless_demo
[Demo] NvBufSurface created.
[EGL] display_initialize() success.
[Demo] NvBufSurfaceMapEglImage success
[Demo] Done.
nvidia@tegra-ubuntu:~$
so the currrent problem is when garbage output issue happen, Will it affect the initialization of egl?
i will open a new topic about the garbage output