Nvargus-daemon / gstreamer errors: libEGL / MESA

I am receiving libEGL / MESA errors when trying to start nvargus-daemon or gstreamer (using a very simple pipeline for testing purposes). I have a CSI camera (IMX219) hooked up to the nano, which I have verified works. Below are the commands and errors:

nvargus-daemon
libEGL warning: DRI2: failed to authenticate
libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

nvbuf_utils: Could not get EGL display connection
=== NVIDIA Libargus Camera Service (0.97.3)=== Listening for connections...
gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink
libEGL warning: DRI2: failed to authenticate
libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

nvbuf_utils: Could not get EGL display connection
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
=== gst-launch-1.0[810]: Connection established (7F816461D0)libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

SCF: Error InsufficientMemory: Unable to initialize EGL (in src/services/gl/GLService.cpp, function initialize(), line 144)
SCF: Error InsufficientMemory:  (propagating from src/services/gl/GLService.cpp, function startService(), line 46)
SCF: Error InsufficientMemory:  (propagating from src/components/ServiceHost.cpp, function startServices(), line 138)
SCF: Error InsufficientMemory:  (propagating from src/api/CameraDriver.cpp, function initialize(), line 168)
SCF: Error InvalidState: Services are already stopped (in src/components/ServiceHost.cpp, function stopServicesInternal(), line 188)
SCF: Error InsufficientMemory:  (propagating from src/api/CameraDriver.cpp, function getCameraDriver(), line 109)
(Argus) Error InsufficientMemory:  (propagating from src/api/GlobalProcessState.cpp, function createCameraProvider(), line 204)
=== gst-launch-1.0[810]: CameraProvider initialized (0x7f78355710)Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:557 No cameras available
Got EOS from element "pipeline0".
Execution ended after 0:00:00.067878926
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
=== gst-launch-1.0[810]: CameraProvider destroyed (0x7f78355710)(Argus) Error EndOfFile: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 266)
(Argus) Error EndOfFile: Receive worker failure, notifying 1 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 340)
(Argus) Error InvalidState: Argus client is exiting with 1 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)
(Argus) Error EndOfFile: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 368)
(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 87)
[1]+  Segmentation fault      (core dumped) nvargus-daemon

I’m at a loss of what to do. I am using the dev kit and have a HDMI monitor hooked up on :1, below is the output of xrandr and glxinfo -B. Any ideas?

xrandr:

Screen 0: minimum 8 x 8, current 1280 x 800, maximum 16384 x 16384
HDMI-0 connected primary 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x800      59.91*+
   1920x1080     60.00    59.95
   1280x1024     60.00
   1280x960      60.00
   1280x720      60.00    59.94
   1152x864      75.00
   1024x768      85.00    75.03    70.07    60.01
   800x600       85.06    75.00    72.19    60.32    56.25
   720x480       59.94
   640x480       85.01    75.00    72.81    59.94    59.94
DP-0 disconnected (normal left inverted right x axis y axis)

glxinfo -B

name of display: :1
display: :1  screen: 0
direct rendering: Yes
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA Tegra X1 (nvgpu)/integrated
OpenGL core profile version string: 4.6.0 NVIDIA 32.4.2
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 32.4.2
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 32.4.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Need to run the nvargus-daemon by sudo

@ShaneCCC I should have mentioned, all commands are being run as root when the errors are occurring

Any customize things? which release?

@ShaneCCC I’m using Jetpack 4.3 in a docker container, which is basically a bare ubuntu build with L4T 32.3.1 config/drivers/gst apps installed in root) and other deb packages (CUDA, cuDNN, OpenCV and CudaRT) installed from the Nvidia SDK.

Have a reference to below topic for camera running on docker.

This appears to relate to a different error message, and I am receiving the errors regardless of whether the DISPLAY variable is set. It seems the key is in the DRI2: failed to authenticate message. Do you know what could cause this?

I have no idea for that, but I can run the camera after below step.

sudo systemctl daemon-reload

sudo systemctl restart docker

sudo docker run --net=host --runtime nvidia --rm --ipc=host -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v /tmp/argus_socket:/tmp/argus_socket --cap-add SYS_PTRACE -e DISPLAY=$DISPLAY -it nvcr.io/nvidia/l4t-base:r32.3.1

export DISPLAY=:

xhost +

sudo docker run --net=host --runtime nvidia --rm --ipc=host -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v /tmp/argus_socket:/tmp/argus_socket --cap-add SYS_PTRACE -e DISPLAY=$DISPLAY -it nvcr.io/nvidia/l4t-base:r32.2.1

I was able to solve this. In case anyone else runs into this same issue, it was because I did not have the tegra-egl libraries loaded in my container. All that was needed was to add echo "/usr/lib/aarch64-linux-gnu/tegra-egl" > /etc/ld.so.conf.d/nvidia-tegra-egl.conf && ldconfig to my Dockerfile and I was all set.

1 Like