Nvarguscamerasrc Fails to Stream Camera

Hello,

I’m working on integrating e-con’s e-CAM80_CUONX camera with a Jetson Orin NX mounted to ConnectTech’s Hadron-DM carrier board. I am using JetPack 6.0 (L4T 36.3.0). I’ve successfully loaded the camera driver into the kernel, and am now trying to capture the video stream using GStreamer (v1.20.3). e-con provides a GStreamer pipeline that they have tested on a Jetson Orin NX dev board, but fails for me. I have stripped it down to its simplest form:

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! "video/x-raw(memory:NVMM), width=(int)1944, height=(int)1096, format=(string)NV12" ! fakesink

Here is the pipeline’s output:

$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! "video/x-raw(memory:NVMM), width=(int)1944, height=(int)1096, format=(string)NV12" ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 36.999999 fps Duration = 27027028 ; Analog Gain range min 1.000000, max 31.622776; Exposure Range min 450000, max 200000000;

GST_ARGUS: 3840 x 2160 FR = 44.000001 fps Duration = 22727272 ; Analog Gain range min 1.000000, max 31.622776; Exposure Range min 450000, max 200000000;

GST_ARGUS: 1944 x 1096 FR = 70.000001 fps Duration = 14285714 ; Analog Gain range min 1.000000, max 31.622776; Exposure Range min 450000, max 200000000;

GST_ARGUS: 1296 x 732 FR = 103.999996 fps Duration = 9615385 ; Analog Gain range min 1.000000, max 31.622776; Exposure Range min 450000, max 200000000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 2 
   Output Stream W = 1944 H = 1096 
   seconds to Run    = 0 
   Frame Rate = 70.000001 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:732 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:243 (propagating)
Redistribute latency...
Got EOS from element "pipeline0".
Execution ended after 0:00:04.016791983
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
GST_ARGUS: Done Success
Freeing pipeline ...

Here is the corresponding nvargus-daemon output:

$ sudo sudo journalctl -b -f -u nvargus-daemon
Dec 31 17:00:33 fc00564 systemd[1]: Started Argus daemon.
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: === NVIDIA Libargus Camera Service (0.99.33)=== Listening for connections...=== gst-launch-1.0[1785]: Connection established (FFFF925EB840)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: NvPclHwGetModuleList: No module data found
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: NvPclHwGetModuleList: No module data found
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: ---- imager: Found override file [/var/nvidia/nvcam/settings/camera_overrides.isp]. ----
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: (NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: (NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: (NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 111)
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: NvPclStartPlatformDrivers: Failed to start module drivers
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: NvPclStateControllerOpen: Failed ImagerGUID 1. (error 0xA000E)
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: NvPclOpen: PCL Open Failed. Error: 0xf
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 725)
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 453)
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 347)
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 519)
Nov 13 11:17:00 fc00564 nvargus-daemon[873]: ---- imager: Found override file [/var/nvidia/nvcam/settings/camera_overrides.isp]. ----
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: CAM: serial no file already exists, skips storing again=== gst-launch-1.0[1785]: CameraProvider initialized (0xffff8ca58d50)CAM: serial no file already exists, skips storing againSCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 0, capture sequence ID = 0 draining session frameStart events 3
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 527)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error InvalidState: Sensor GUID 0 is in error state. Skipping requests, capture sequence ID = 1 continue draining session frameStart events 2
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 541)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error InvalidState: Sensor GUID 0 is in error state. Skipping requests, capture sequence ID = 2 continue draining session frameStart events 1
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 541)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error InvalidState: Sensor 0 already in same state
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/CaptureServiceDeviceSensor.cpp, function setErrorState(), line 100)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 0, capture sequence ID = 0 draining session frameEnd events 3
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 644)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error InvalidState: Sensor 0 already in same state
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/CaptureServiceDeviceSensor.cpp, function setErrorState(), line 100)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 0, capture sequence ID = 1 draining session frameEnd events 2
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 644)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: PowerServiceCore:handleRequests: timePassed = 2535
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error InvalidState: Sensor 0 already in same state
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/CaptureServiceDeviceSensor.cpp, function setErrorState(), line 100)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 0, capture sequence ID = 2 draining session frameEnd events 1
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 644)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error Timeout: Sending critical error event for Session 0
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/api/Session.cpp, function sendErrorEvent(), line 1039)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error InvalidState: Sensor GUID 0 is in error state. Skipping requests, capture sequence ID = 3 continue draining session frameStart events 1
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 541)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: Module_id 30 Severity 2 : (fusa) Error: Timeout  propagating from:/capture/src/fusaViHandler.cpp 820
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error BadParameter: CC has already been disposed (in src/components/CaptureContainerManager.cpp, function dispose(), line 161)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error InvalidState: Sensor 0 already in same state
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/CaptureServiceDeviceSensor.cpp, function setErrorState(), line 100)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 0, capture sequence ID = 3 draining session frameEnd events 1
Nov 13 11:17:04 fc00564 nvargus-daemon[873]:  (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 644)
Nov 13 11:17:04 fc00564 nvargus-daemon[873]: SCF: Error BadParameter: CC has already been disposed (in src/components/CaptureContainerManager.cpp, function dispose(), line 161)
Nov 13 11:17:05 fc00564 nvargus-daemon[873]: PowerServiceCore:handleRequests: timePassed = 809

The errors that stick out to me from each log are nvbuf_utils: dmabuf_fd -1 mapped entry NOT found and SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 0, capture sequence ID = 0 draining session frameStart events 3, respectively.

For what it’s worth, I believe that the the driver is working correctly. I have run the v4l2-compliance test application against the driver, and it reports no errors. I have also captured the camera stream to a file using v4l2-ctl:

$ v4l2-ctl --set-fmt-video=width=1944,height=1096 --stream-mmap --set-ctrl=sensor_mode=0 --stream-count=10 -d /dev/video0
<<<<<<< 5.00 fps
<<<

The camera outputs data in either Bayer GB10 or GB12, so I can’t verify the driver’s functionality using GStreamer’s v4l2src, nor can I view the video generated by v4l2-ctl without post-processing it. To complicate matters further, the Hadron-DM does not support monitors.
Dmesg shows that the camera driver loads into the kernel without any errors, and the driver itself reports that it successfully starts and stops streaming when commanded. Here is a relevant snippet of the dmesg log:

[   13.405222] e-con_cam 9-0042: Probing for sensor eimx415
[   13.405247] Reset GPIO: 309
[   13.405252] Boot GPIO: 308
[   13.450339] tegra234-aon c000000.aon: Adding to iommu group 50
[   13.453568]  c000000.aon:hsp: probed
[   13.460104] tegra234-aon c000000.aon: init done
[   13.515849] thermal-trip-event cpu-throttle-alert: cooling device registered.
[   13.522235] thermal-trip-event gpu-throttle-alert: cooling device registered.
[   13.524330] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=3 as /devices/platform/bus@0/3510000.hda/sound/card0/input1
[   13.524566] gic 2a41000.interrupt-controller: GIC IRQ controller registered
[   13.524726] tegra-aconnect bus@0:aconnect@2900000: Tegra ACONNECT bus registered
[   13.524892] thermal-trip-event cv0-throttle-alert: cooling device registered.
[   13.527243] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=7 as /devices/platform/bus@0/3510000.hda/sound/card0/input2
[   13.532165] thermal-trip-event cv1-throttle-alert: cooling device registered.
[   13.536245] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=8 as /devices/platform/bus@0/3510000.hda/sound/card0/input3
[   13.536373] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=9 as /devices/platform/bus@0/3510000.hda/sound/card0/input4
[   13.537523] thermal-trip-event cv2-throttle-alert: cooling device registered.
[   13.538095] thermal-trip-event soc0-throttle-alert: cooling device registered.
[   13.553308] thermal-trip-event soc1-throttle-alert: cooling device registered.
[   13.556613] thermal-trip-event soc2-throttle-alert: cooling device registered.
[   13.597815] thermal-trip-event hot-surface-alert: cooling device registered.
[   13.600573] e-con_cam 9-0042: Camera Device detected
[   13.728199] e-con_cam 9-0042: Same firmware in MCU & text file - (12e-CAM80XXXX02110c7f645fXXXXXXX). Skipping FW Update...
[   13.731100] e-con_cam 9-0042: Setting Max Mipi clock configuration : 2000MHz
[   13.758176] r8168 0008:01:00.0: Adding to iommu group 24
[   13.759113] r8168 Gigabit Ethernet driver 8.051.02.10m_pll-NAPI loaded
[   13.759294] r8168 0008:01:00.0: enabling device (0000 -> 0003)
[   13.779718] e-con_cam 9-0042: Num of Controls - 9
[   13.823961] e-con_cam 9-0042: cam_init 1890MCU CMD ID CAM INIT Success !! 
[   13.837308] e-con_cam 9-0042: tegracam sensor driver:eimx415_v2.0.6
[   13.837318] e-con_cam 9-0042: cam_probe : Use_sensor_mode_id = 1
[   13.846539] r8168: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[   13.848807] e-con_cam 9-0042: cam_fill_string_ctrl[554] Set!
[   13.852783] r8168  Copyright (C) 2022 Realtek NIC software team <nicfae@realtek.com> 
                This program comes with ABSOLUTELY NO WARRANTY; for details, please see <http://www.gnu.org/licenses/>. 
                This is free software, and you are welcome to redistribute it under certain conditions; see <http://www.gnu.org/licenses/>. 
[   13.858824] tegra-camrtc-capture-vi tegra-capture-vi: subdev e-con_cam 9-0042 bound
[   13.888928] e-con_cam 9-0042: Detected eimx415 sensor
[   13.922186] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
[   13.923554] nvvrs-pseq-rtc nvvrs-pseq-rtc: setting system clock to 1970-01-01T00:00:31 UTC (31)
[   14.003278] eth0: 0xffff80000b1dd000, 48:b0:2d:fb:af:72, IRQ 246
[   14.021739] tegra-adma 2930000.dma-controller: Tegra210 ADMA driver registered 32 channels
[   14.131379] tegra210-admaif 290f000.admaif: Adding to iommu group 51
[   14.926390] pstore: Using crash dump compression: deflate
[   14.926621] printk: console [ramoops-1]: printing thread started
[   14.926648] printk: console [ramoops-1] enabled
[   14.926651] pstore: Registered ramoops as persistent store backend
[   14.926652] ramoops: using 0x200000@0x2725f0000, ecc: 0
[   15.012538] IRQ225: set affinity failed(-22).
[   15.012578] IRQ246: set affinity failed(-22).
[   15.012729] psci: CPU4 killed (polled 0 ms)
[   15.121198] IRQ225: set affinity failed(-22).
[   15.121303] IRQ246: set affinity failed(-22).
[   15.121734] psci: CPU5 killed (polled 0 ms)
[   16.321874] nvgpu: 17000000.gpu                  gk20a_scale_init:541  [INFO]  enabled scaling for GPU

[   16.418622] zram: Added device: zram0
[   16.419426] zram: Added device: zram1
[   16.421428] zram: Added device: zram2
[   16.425465] zram: Added device: zram3
[   16.458080] zram0: detected capacity change from 0 to 1950816
[   16.467751] Adding 975404k swap on /dev/zram0.  Priority:5 extents:1 across:975404k SS
[   16.472623] zram1: detected capacity change from 0 to 1950816
[   16.480698] Adding 975404k swap on /dev/zram1.  Priority:5 extents:1 across:975404k SS
[   16.487537] zram2: detected capacity change from 0 to 1950816
[   16.498339] Adding 975404k swap on /dev/zram2.  Priority:5 extents:1 across:975404k SS
[   16.502001] zram3: detected capacity change from 0 to 1950816
[   16.519772] Adding 975404k swap on /dev/zram3.  Priority:5 extents:1 across:975404k SS
[   16.900740] nvidia-modeset: Loading NVIDIA UNIX Open Kernel Mode Setting Driver for aarch64  540.3.0  Release Build  (buildbrain@mobile-u64-6367-d8000)  Mon May  6 10:21:06 PDT 2024
[   17.104297] r8168: eth0: link up
[   17.104543] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   17.163652] NVRM rpcRmApiControl_dce: NVRM_RPC_DCE: Failed RM ctrl call cmd:0x731341 result 0xffff:
[   19.295411] rfkill: input handler disabled
[  110.513500] e-con_cam 9-0042:  cam_stream_config 757ISP GET CMD Status Succesfull !! 
[  110.822363] e-con_cam 9-0042:  cam_stream_on 1224MCU Stream On Success !! 
[  113.388738] e-con_cam 9-0042:  cam_stream_off 1296 MCU Get CMD Stream off Success !!

The camera shows up as a device at /dev/video0. Between the existence of /dev/video0, v4l2-ctl and v4l2-compliance both indicating that the driver is working, and a clean dmesg, I am inclined to believe that the issue is not due to the driver, but perhaps I am missing something.

I’ve read many forum posts related to the errors I’ve seen in the above logs, but have yet to find a solution that works for me. I’ve just about exhausted my search of potential causes and solutions. Some help would be greatly appreciated.

Looks like can’t get frame from the sensor.
Please consult with E-CON for the driver integration.

Thanks

(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 527)

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