Nvarguscamerasrc jetpack-4.3, No cameras available, nvbuf_utils: Could not get EGL display connection, requirements

Hello,
I have perfectly working Bayer sensors on a Jetpack-4.3 installation on a custom headless board, and I can acquire images without problem with v4l2-ctl

v4l2-ctl --stream-mmap=3 --stream-count=256

or with gst-launch-1.0 v4l2src

gst-launch-1.0 v4l2src ! fakesink

but the simplest nvarguscamerasrc pipeline refuses to start

nvidia@cam5-jp43:~$ gst-launch-1.0 nvarguscamerasrc ! fakesink
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 ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:532 No cameras available
Got EOS from element "pipeline0".
Execution ended after 0:00:00.081320843
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
(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

What are the requirements (in the kernel, in the DT, in userspace) to make that simple chain work ?

You need to check the device tree context of the tegra-camera-platform. All of the information must be correct. like the devname/proc-device-tree

Here is my tegra-camera-platform node. Do you see something wrong or missing ? (the proc-device-tree entries are correct)

tegra-camera-platform {
  compatible = "nvidia, tegra-camera-platform";
  num_csi_lanes = <8>;
  min_bits_per_pixel = <12>;
  max_lane_speed = <1500000>;
  vi_peak_byte_per_pixel = <2>;
  vi_bw_margin_pct = <25>;
  isp_peak_byte_per_pixel = <5>;
  isp_bw_margin_pct = <25>;

  modules {
   module0 {
    badge = "imx264_right_2178";
    position = "rear";
    orientation = "0";
    drivernode0 {
      pcl_id = "v4l2_sensor";
      devname = "imx264 spi0.0";
      proc-device-tree = "/proc/device-tree/spi@3210000/imx264@0";
    };
   };
   module1 {
    badge = "imx264_left_2174";
    position = "front";
    orientation = "0";
    drivernode0 {
     pcl_id = "v4l2_sensor";
     devname = "imx264 spi3.0";
     proc-device-tree = "/proc/device-tree/spi@3240000/imx264@0";
    };
   };
  };
 };

Could you check the kernel message for imx264 on which SPI bus. Enable the dev_dbg() should be able see the real driver name.

devname = “imx264 spi3.0”;

Those are the real driver name’s, as can be seen with ‘v4l2-ctl -D’

nvidia@cam5-jp43:~$ v4l2-ctl -D
Driver Info (not using libv4l2):
        Driver name   : tegra-video
        Card type     : vi-output, imx264 spi3.0
        Bus info      : platform:15700000.vi:0
        Driver version: 4.9.140
        Capabilities  : 0x84200001
                Video Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format
nvidia@cam5-jp43:~$ v4l2-ctl -D -d 1
Driver Info (not using libv4l2):
        Driver name   : tegra-video
        Card type     : vi-output, imx264 spi0.0
        Bus info      : platform:15700000.vi:2
        Driver version: 4.9.140
        Capabilities  : 0x84200001
                Video Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format
nvidia@cam5-jp43:~$

Get more log from below command.

sudo su
kill the process of nvargus-daemon
export enableCamPclLogs=5
export enableCamScfLogs=5
/usr/sbin/nvargus-daemon
/usr/sbin/nvcamera-daemon

launch camera from another console

Here you are :

nvidia@cam5-jp43:~$ sudo su
[sudo] password for nvidia:
root@cam5-jp43:/home/nvidia# export enableCamPclLogs=5
root@cam5-jp43:/home/nvidia# export enableCamScfLogs=5
root@cam5-jp43:/home/nvidia# /usr/sbin/nvargus-daemon
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
=== NVIDIA Libargus Camera Service (0.97.3)=== Listening for connections...=== gst-launch-1.0[31215]: Connection established (7FA8CBE1D0)Thread 1 getting next capture
Thread 1 is waiting
Thread 2 getting next capture
Thread 2 is waiting
Thread 3 getting next capture
Thread 3 is waiting
Thread 4 getting next capture
Thread 4 is waiting
Thread 5 getting next capture
Thread 5 is waiting
Thread 6 getting next capture
Thread 6 is waiting
Thread 7 getting next capture
Thread 7 is waiting
Thread 8 getting next capture
Thread 8 is waiting
Thread 9 getting next capture
Thread 9 is waiting
Thread 10 getting next capture
Thread 10 is waiting
Thread 11 getting next capture
Thread 11 is waiting
Thread 12 getting next capture
Thread 12 is waiting
Starting services...
Worker thread IspHw statsComplete start
Worker thread IspHw frameComplete start
Worker thread CaptureScheduler checkFramePending start
Worker thread CaptureScheduler frameStart start
Worker thread V4L2CaptureScheduler checkCaptureComplete start
Worker thread V4L2CaptureScheduler issueCaptures start
SCF: Error NotSupported: EGL_EXT_client_extensions not supported (in src/services/gl/GLService.cpp, function initialize(), line 110)
SCF: Error NotSupported:  (propagating from src/services/gl/GLService.cpp, function startService(), line 46)
SCF: Error NotSupported:  (propagating from src/components/ServiceHost.cpp, function startServices(), line 138)
Stopping services...
Worker thread CaptureScheduler frameStart stop
Worker thread CaptureScheduler checkFramePending stop
Worker thread IspHw statsComplete stop
Worker thread IspHw frameComplete stop
Worker thread V4L2CaptureScheduler issueCaptures stop
Worker thread V4L2CaptureScheduler checkCaptureComplete stop
NvPclShutdown: ++++++++++++++++++++++
NvPclShutdown: ----------------------
SCF: Error InvalidState: Service not running (in src/services/gl/GLService.cpp, function stopService(), line 55)
SCF: Error InvalidState:  (propagating from src/components/ServiceHost.cpp, function stopServicesInternal(), line 203)
Services are stopped
SCF: Error NotSupported:  (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)
FiberScheduler: shutting down; 0 fibers still in map

FiberScheduler: thread 8 exiting
FiberScheduler: thread 5 exiting
FiberScheduler: thread 9 exiting
FiberScheduler: thread 6 exiting
FiberScheduler: thread 10 exiting
FiberScheduler: thread 2 exiting
FiberScheduler: thread 7 exiting
FiberScheduler: thread 3 exiting
FiberScheduler: thread 11 exiting
FiberScheduler: thread 12 exiting
FiberScheduler: thread 1 exiting
FiberScheduler: thread 4 exiting
FiberScheduler: thread 12 has been joined
FiberScheduler: thread 11 has been joined
FiberScheduler: thread 9 has been joined
FiberScheduler: thread 8 has been joined
FiberScheduler: thread 7 has been joined
FiberScheduler: thread 5 has been joined
FiberScheduler: thread 6 has been joined
FiberScheduler: thread 4 has been joined
FiberScheduler: thread 3 has been joined
FiberScheduler: thread 2 has been joined
FiberScheduler: thread 10 has been joined
FiberScheduler: thread 1 has been joined
SCF: Error NotSupported:  (propagating from src/api/CameraDriver.cpp, function getCameraDriver(), line 109)
(Argus) Error NotSupported:  (propagating from src/api/GlobalProcessState.cpp, function createCameraProvider(), line 204)
=== gst-launch-1.0[31215]: CameraProvider initialized (0x7fa403fe60)=== gst-launch-1.0[31215]: CameraProvider destroyed (0x7fa403fe60)
Segmentation fault (core dumped)
root@cam5-jp43:/home/nvidia
nvidia@cam5-jp43:~$ gst-launch-1.0 nvarguscamerasrc ! fakesink
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 ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:532 No cameras available
Got EOS from element "pipeline0".
Execution ended after 0:00:00.026902735
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
(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)
nvidia@cam5-jp43:~$

Have export DISPLAY=:0 at the gst-launch-1.0 console.

It’s a headless board :), but I’ll try.

Same result :

nvidia@cam5-jp43:~$ export DISPLAY=:0
nvidia@cam5-jp43:~$ gst-launch-1.0 nvarguscamerasrc ! fakesink
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 ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
(Argus) Error FileOperationFailed: Connecting to nvargus-daemon failed: Connection refused (in src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 201)
(Argus) Error FileOperationFailed: Cannot create camera provider (in src/rpc/socket/client/SocketClientDispatch.cpp, function createCameraProvider(), line 102)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:526 Failed to create CameraProvider
Got EOS from element "pipeline0".
Execution ended after 0:00:00.000939123
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
nvidia@cam5-jp43:~

Could you run the gst-launch-1.0 directe from the TX2 console instead of ssh?

Of course :)

nvidia@cam5-jp43:~$ tty
/dev/ttyS0
nvidia@cam5-jp43:~$ export DISPLAY=:0
nvidia@cam5-jp43:~$ gst-launch-1.0 nvarguscamerasrc ! fakesink
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 ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:532 No cameras available
Got EOS from element "pipeline0".
Execution ended after 0:00:00.029198770
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
(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)
nvidia@cam5-jp43:~$

Is EGL mandatoy for argus, and are some nodes mandatory for EGL in DT even if we have no display ?

So, your device didn’t have HDMI interface?
Could you attached the boot kernel message.

Here it is argus-dmesg.log (107.8 KB)

What’s message for below command.

export DISPLAY=:0
xinit &

nvidia@cam5-jp43:~$ export DISPLAY=:0
nvidia@cam5-jp43:~$ xinit &
[1] 11592
nvidia@cam5-jp43:~$

X.Org X Server 1.19.6
Release Date: 2017-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-148-generic aarch64 Ubuntu
Current Operating System: Linux cam5-jp43 4.9.140-topdir-g6b7ebe9-dirty #483 SMP PREEMPT Mon Apr 6 22:27:53 CEST 2020 aarch64
Kernel command line: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000@0x275840000 sdhci_tegra.en_boot_part_access=1 quiet
Build Date: 03 June 2019  08:11:53AM
xorg-server 2:1.19.6-1ubuntu4.3 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.34.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr  7 09:47:04 2020
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

[1]+  Exit 1                  xinit
nvidia@cam5-jp43:~$

Find attached Xorg.0.log (7.3 KB)

Looks like your device not load the nvdisplay.
Did you modify device tree to remove any display or modify the “status = disable” ?

Yes status is disabled :

nvidia@cam5-jp43:~$ find /proc/device-tree/host1x/nvdisplay@152*/status | xargs strings
disabled
disabled
disabled
nvidia@cam5-jp43:~$

There are three of them. Which one should I enable ?

nvidia@cam5-jp43:~$ find /proc/device-tree/ -name nvdisplay\*
/proc/device-tree/plugin-manager/fragement@6/override@7/_overlay_/nvdisplay@15210000
/proc/device-tree/plugin-manager/fragement@6/override@7/_overlay_/nvdisplay@15220000
/proc/device-tree/plugin-manager/fragement@6/override@7/_overlay_/nvdisplay@15200000
/proc/device-tree/plugin-manager/fragment-e3320-dp/override@0/_overlay_/nvdisplay@15220000
/proc/device-tree/host1x/nvdisplay@15210000
/proc/device-tree/host1x/nvdisplay@15220000
/proc/device-tree/host1x/nvdisplay@15200000
nvidia@cam5-jp43:~$

Please have set nvdisplay@15210000 to okay to try.

Hi ShaneCCC,

I hoped it would be solved, but :

nvidia@cam5-jp43:~$ find /proc/device-tree/host1x/nvdisplay@152*/status | xargs strings
disabled
okay
disabled
nvidia@cam5-jp43:~$ export DISPLAY=:0
nvidia@cam5-jp43:~$ xinit


X.Org X Server 1.19.6
Release Date: 2017-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-148-generic aarch64 Ubuntu
Current Operating System: Linux cam5-jp43 4.9.140-topdir-g6b7ebe9-dirty #483 SMP PREEMPT Mon Apr 6 22:27:53 CEST 2020 aarch64
Kernel command line: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000@0x275840000 sdhci_tegra.en_boot_part_access=1 quiet
Build Date: 03 June 2019  08:11:53AM
xorg-server 2:1.19.6-1ubuntu4.3 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.34.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr  7 11:57:01 2020
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
nvidia@cam5-jp43:~$ nvidia@cam5-jp43:~$ gst-launch-1.0 nvarguscamerasrc ! fakesink
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 ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:532 No cameras available
Got EOS from element "pipeline0".
Execution ended after 0:00:00.099414706
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
(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)
nvidia@cam5-jp43:~$

I have looked at ‘dmesg’, and found this :

[    1.117710] tegradc 15210000.nvdisplay: mandatory prop:nvidia,dc-connector not defined
[    1.117757] tegradc: probe of 15210000.nvdisplay failed with error -22

but the other nvdisplay entries have that property :

nvidia@cam5-jp43:~$ find /proc/device-tree/host1x/nvdisplay@152* -name nvidia,dc-connector
/proc/device-tree/host1x/nvdisplay@15200000/nvidia,dc-connector
/proc/device-tree/host1x/nvdisplay@15220000/nvidia,dc-connector
nvidia@cam5-jp43:~$

I will try nvdisplay@15200000

That fails again, but now differently :

nvidia@cam5-jp43:~$ dmesg | grep nvdisplay
[    0.423643] platform 15200000.nvdisplay: calling of_iommu_configure
[    0.423769] iommu: Adding device 15200000.nvdisplay to group 32
[    0.423775] of_property_read_bool(/host1x/nvdisplay@15200000, iommu_sodev_map) -> 0
[    1.118532] tegradc 15200000.nvdisplay: disp0 connected to head0->/host1x/dsi
[    1.118539] tegradc 15200000.nvdisplay: tegra_dc_parse_panel_ops: could not find panel for /host1x/dsi
[    1.118560] tegradc 15200000.nvdisplay: err:-19 parsing panel_ops
nvidia@cam5-jp43:~$

I will look at that now

Hi,

custom headless board

It seems you don’t have a display at all.
Please note that there are 3 nvdisplay on TX2 and each one is corresponding to different display heads. They are required for EGL usecase.