Nvarguscamerasrc InsufficientMemory: Unable to initialize EGL

Hello I’m developing application on Orin NX16GB. I can get video stream using nvargus.

  • hardware: Orion NX 16 Gb
  • custom board: reComputer J4012
  • L4T R36.4.0
  • JP 6.1

I connected IMX219 to the dev kit. The /dev/video0 was detected.
The following command also look like is working.

v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=25 -d /dev/video0
<<<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<

I was able to get raw snapshot using v4l2-ctl.

But when I run gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! fakesink I got this output:

gst-launch-1.0  nvarguscamerasrc sensor-id=0 ! fakesink
nvbufsurftransform: Could not get EGL display connection
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:794 No cameras available
Redistribute latency...
Got EOS from element "pipeline0".
Execution ended after 0:00:00.006527967
Setting pipeline to NULL ...
Freeing pipeline ...
(Argus) Error EndOfFile: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 277)
(Argus) Error EndOfFile: Receive worker failure, notifying 1 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 350)
(Argus) Error InvalidState: Argus client is exiting with 1 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 366)
(Argus) Error EndOfFile: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 379)
(Argus) Error EndOfFile: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error EndOfFile:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)

No report in dmesg.

journalctl -u nvargus-daemon reports following:

Mär 14 16:34:31 Iris nvargus-daemon[36695]: === NVIDIA Libargus Camera Service (0.99.33)=== Listening for connections...=== gst-launch-1.0[42194]: Connection established (FFFF8FA6B840)libEGL warning: egl: f>
Mär 14 16:34:31 Iris nvargus-daemon[36695]: libEGL warning: egl: failed to create dri2 screen
Mär 14 16:34:31 Iris nvargus-daemon[36695]: SCF: Error InsufficientMemory: Unable to initialize EGL (in src/services/gl/GLService.cpp, function initialize(), line 144)
Mär 14 16:34:31 Iris nvargus-daemon[36695]: SCF: Error InsufficientMemory:  (propagating from src/services/gl/GLService.cpp, function startService(), line 46)
Mär 14 16:34:31 Iris nvargus-daemon[36695]: SCF: Error InsufficientMemory:  (propagating from src/components/ServiceHost.cpp, function startServices(), line 142)
Mär 14 16:34:31 Iris nvargus-daemon[36695]: SCF: Error InsufficientMemory:  (propagating from src/api/CameraDriver.cpp, function initialize(), line 181)
Mär 14 16:34:31 Iris nvargus-daemon[36695]: SCF: Error InvalidState: Services are already stopped (in src/components/ServiceHost.cpp, function stopServicesInternal(), line 193)
Mär 14 16:34:31 Iris nvargus-daemon[36695]: SCF: Error InsufficientMemory:  (propagating from src/api/CameraDriver.cpp, function getCameraDriver(), line 120)
Mär 14 16:34:31 Iris nvargus-daemon[36695]: (Argus) Error InsufficientMemory:  (propagating from src/api/GlobalProcessState.cpp, function createCameraProvider(), line 210)
Mär 14 16:34:31 Iris nvargus-daemon[36695]: === gst-launch-1.0[42194]: CameraProvider initialized (0xffff880d2470)=== gst-launch-1.0[42194]: CameraProvider destroyed (0xffff880d2470)
Mär 14 16:34:31 Iris systemd[1]: nvargus-daemon.service: Main process exited, code=killed, status=11/SEGV
Mär 14 16:34:31 Iris systemd[1]: nvargus-daemon.service: Failed with result 'signal'.
Mär 14 16:34:31 Iris systemd[1]: nvargus-daemon.service: Scheduled restart job, restart counter is at 9.
Mär 14 16:34:31 Iris systemd[1]: Stopped Argus daemon.
Mär 14 16:34:31 Iris systemd[1]: Started Argus daemon.

It look like the problem is libEGL warning: egl: failed to create dri2 screen which I’m not sure what does it mean, but I’m trying to send data to fake sink, so anyway I’m not sure why I see such error.
Also my system is headless so there is no screen, which is even more strange why I see such error.

Additional context

Output of gst-inspect-1.0 v4l2src

Factory Details:
  Rank                     primary (256)
  Long-name                Video (video4linux2) Source
  Klass                    Source/Video
  Description              Reads frames from a Video4Linux2 device
  Author                   Edgard Lima <edgard.lima@gmail.com>, Stefan Kost <ensonic@users.sf.net>

Plugin Details:
  Name                     video4linux2
  Description              elements for Video 4 Linux
  Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstvideo4linux2.so
  Version                  1.20.3
  License                  LGPL
  Source module            gst-plugins-good
  Source release date      2022-06-15
  Binary package           GStreamer Good Plugins (Ubuntu)
  Origin URL               https://launchpad.net/distros/ubuntu/+source/gst-plugins-good1.0

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBaseSrc
                         +----GstPushSrc
                               +----GstV4l2Src

Implemented Interfaces:
  GstURIHandler
  GstTuner
  GstColorBalance
  GstVideoOrientation

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      image/jpeg
      video/mpeg
            mpegversion: 4
           systemstream: false
      video/mpeg
            mpegversion: { (int)1, (int)2 }
      video/mpegts
           systemstream: true
      video/x-bayer
                 format: { (string)bggr, (string)gbrg, (string)grbg, (string)rggb }
                  width: [ 1, 32768 ]

Do you have connect HDMI display to the Orin NX?
You may reference to below document for headless setup.

Do you start the X first?

export DISPLAY=:0
xinit&

gst-launch-1.0 nvarguscamerasrc ...

Follow the document to flash your device with headless setup to load correct component.

Thanks

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