Some basic problems with nvarguscamerasrc plugin for gstreamer

Hi there,

Trying to debug basic issues with the nvarguscamerasrc that seems to refuse to work with our AR1335 and IMX565 cameras.

Running on a jAXi on a custom carrier board.

The cameras seems to work when using the sample camera_recording program from /usr/src/jetson_multimedia_api/samples/10_camera_recording/

$ /usr/src/jetson_multimedia_api/samples/10_camera_recording/camera_recording -r 4208x3120 -t H265 -d 2 -f /dev/null
Set governor to performance before enabling profiler
PRODUCER: Creating output stream
[ 8904.185176] nvmap_alloc_handle: PID 11104: camera_recordin: WARNING: All NvMap Allocations must have a tag to identify the subsystem allocating memory.Please pass the tag to the API call NvRmMemHanldeAllocAttr() or relevant. 
PRODUCER: Launching consumer thread
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 8 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 8 
892744264
842091865
create video encoder return true
NVMEDIA: H265 : Profile : 1 
PRODUCER: Starting repeat capture requests.
CONSUMER: Got EOS, exiting...
CONSUMER: Done.
PRODUCER: Done -- exiting.
************************************
Total Profiling Time = 0 sec
************************************

This is the simplest test I could almost get running, except for nvbuf_utils errors:

$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=3 timeout=2 ! 'video/x-raw(memory:NVMM),format=(string)NV12,framerate=(fraction)24/1' ! nvvidconv ! 'video/x-raw,format=(string)NV12' ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
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: 4208 x 3120 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 3840 x 2160 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 1920 x 1080 FR = 77.999999 fps Duration = 12820513 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 4208 x 3120 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 3840 x 2160 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 1920 x 1080 FR = 77.999999 fps Duration = 12820513 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 3 
   Output Stream W = 4208 H = 3120 
   seconds to Run    = 2 
   Frame Rate = 28.000001 
GST_ARGUS: Setup Complete, Starting captures for 2 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
CONSUMER: ERROR OCCURRED
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
Additional debug info:
Argus Error Status
Execution ended after 0:00:00.638147328
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
GST_ARGUS: Cleaning up
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
Setting pipeline to NULL ...
Freeing pipeline ...
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Argus client is exiting with 3 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)

These are the logs for nvargus-daemon (which needs restarting in order to reproduce the problem… seems to get stuck after first run).

[ 4076.800220] nvargus-daemon[9813]: === NVIDIA Libargus Camera Service (0.98.3)=== Listening for connections...=== gst-launch-1.0[9855]: Connection established (7F7B7051D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
[ 4076.823382] nvargus-daemon[9813]: OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module2
[ 4076.855144] nvargus-daemon[9813]: OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module4
[ 4076.878702] nvargus-daemon[9813]: NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
[ 4076.878702] nvargus-daemon[9813]: NvPclHwGetModuleList: No module data found
[ 4076.878702] nvargus-daemon[9813]: NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
[ 4076.878702] nvargus-daemon[9813]: NvPclHwGetModuleList: No module data found
[ 4076.879863] nvargus-daemon[9813]: NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
[ 4076.879863] nvargus-daemon[9813]: NvPclHwGetModuleList: No module data found
[ 4077.058887] nvargus-daemon[9813]: OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
[ 4077.058887] nvargus-daemon[9813]: ---- imager: No override file found. ----
[ 4077.143836] nvargus-daemon[9813]: (NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
[ 4077.144514] nvargus-daemon[9813]: (NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
[ 4077.144897] nvargus-daemon[9813]: (NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 107)
[ 4077.145306] nvargus-daemon[9813]: NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
[ 4077.145619] nvargus-daemon[9813]: NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
[ 4077.145952] nvargus-daemon[9813]: NvPclStartPlatformDrivers: Failed to start module drivers
[ 4077.146380] nvargus-daemon[9813]: NvPclStateControllerOpen: Failed ImagerGUID 0. (error 0xA000E)
[ 4077.146677] nvargus-daemon[9813]: NvPclOpen: PCL Open Failed. Error: 0xf
[ 4077.147021] nvargus-daemon[9813]: SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 593)
[ 4077.147332] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
[ 4077.147576] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 305)
[ 4077.147818] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 471)
[ 4077.148384] nvargus-daemon[9813]: Acquiring SCF Camera device source via index 0 has failed. ---- imager: No override file found. ----
[ 4077.229660] nvargus-daemon[9813]: (NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
[ 4077.230133] nvargus-daemon[9813]: (NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
[ 4077.230447] nvargus-daemon[9813]: (NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 107)
[ 4077.230879] nvargus-daemon[9813]: NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
[ 4077.231180] nvargus-daemon[9813]: NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
[ 4077.231479] nvargus-daemon[9813]: NvPclStartPlatformDrivers: Failed to start module drivers
[ 4077.231811] nvargus-daemon[9813]: NvPclStateControllerOpen: Failed ImagerGUID 2. (error 0xA000E)
[ 4077.232201] nvargus-daemon[9813]: NvPclOpen: PCL Open Failed. Error: 0xf
[ 4077.232516] nvargus-daemon[9813]: SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 593)
[ 4077.232829] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
[ 4077.233070] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 305)
[ 4077.233302] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 471)
[ 4077.233723] nvargus-daemon[9813]: Acquiring SCF Camera device source via index 1 has failed. ---- imager: No override file found. ----
[ 4077.512161] nvargus-daemon[9813]: LSC: LSC surface is not based on full res!
[ 4077.532404] nvargus-daemon[9813]: E/ libnvphs:socket: Error[2]: socket connection /var/lib/nvphs/nvphsd.ctl to PHS failed: No such file or directory
[ 4077.532800] nvargus-daemon[9813]: D/ libnvphs:socket: Warning: connecting to Power Hinting Service failed. Is PHS running?
[ 4077.533103] nvargus-daemon[9813]: === gst-launch-1.0[9855]: CameraProvider initialized (0x7f749a2d00)SCF: Error BadValue: NvPHSSendThroughputHints (in src/common/CameraPowerHint.cpp, function sendCameraPowerHint(), line 56)
[ 4077.533375] nvargus-daemon[9813]: E/ libnvphs:socket: Error[2]: socket connection /var/lib/nvphs/nvphsd.ctl to PHS failed: No such file or directory
[ 4077.533579] nvargus-daemon[9813]: D/ libnvphs:socket: Warning: connecting to Power Hinting Service failed. Is PHS running?
[ 4077.533816] nvargus-daemon[9813]: E/ libnvphs: Error: NvPHSSendThroughputHints[usecase=camera, hint=MinCPU, value=4294967295, timeout_ms=1000]: queue_or_send() failed
[ 4077.558561] nvargus-daemon[9813]: LSC: LSC surface is not based on full res!
[ 4077.946928] kernel: [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[ 4078.160408] nvargus-daemon[9813]: (NvCapture) Error BadParameter: Invalid NvCsi pixelBitDepth: 0x8 (in /dvs/git/dirty/git-master_linux/camera/capture/nvcapture/capture.c, function NvCaptureCsiGetDataType(), line 2212)
[ 4078.161822] nvargus-daemon[9813]: (NvCapture) Error BadParameter: Unsupported source color format 1709208a10 (in /dvs/git/dirty/git-master_linux/camera/capture/nvcapture/capture_t19x.c, function NvCaptureConfigSetSourceFormatT19x(), line 181)
[ 4078.162114] nvargus-daemon[9813]: (NvCapture) Error BadParameter:  (propagating from /dvs/git/dirty/git-master_linux/camera/capture/nvcapture/capture.c, function NvCaptureRequestSetAttribute(), line 1770)
[ 4078.162359] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/services/capture/NvCaptureViCsiHw.cpp, function startCaptureInternal(), line 649)
[ 4078.162656] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/services/capture/CaptureRecord.cpp, function doCSItoMemCapture(), line 532)
[ 4078.162937] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/services/capture/CaptureRecord.cpp, function issueCapture(), line 469)
[ 4078.163237] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/services/capture/CaptureServiceDevice.cpp, function issueCaptures(), line 1295)
[ 4078.163496] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/services/capture/CaptureServiceDevice.cpp, function issueCaptures(), line 1126)
[ 4078.163865] nvargus-daemon[9813]: SCF: Error BadParameter:  (propagating from src/common/Utils.cpp, function workerThread(), line 116)
[ 4078.164181] nvargus-daemon[9813]: SCF: Error BadParameter: Worker thread CaptureScheduler frameStart failed (in src/common/Utils.cpp, function workerThread(), line 133)
[ 4078.264328] nvargus-daemon[9813]: SCF: Error Timeout:  (propagating from src/api/Buffer.cpp, function waitForUnlock(), line 643)
[ 4078.264328] nvargus-daemon[9813]: SCF: Error Timeout:  (propagating from src/components/CaptureContainerImpl.cpp, function returnBuffer(), line 363)
[ 4086.758497] nvargus-daemon[9813]: SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)
[ 4086.766325] nvargus-daemon[9813]: Error: Camera HwEvents wait, this may indicate a hardware timeout occured,abort current/incoming cc
[ 4138.531295] nvargus-daemon[9813]: SCF: Error InvalidState: 1 buffers still pending during EGLStreamProducer destruction (propagating from src/services/gl/EGLStreamProducer.cpp, function freeBuffers(), line 309)
[ 4138.532537] nvargus-daemon[9813]: SCF: Error InvalidState:  (propagating from src/services/gl/EGLStreamProducer.cpp, function ~EGLStreamProducer(), line 50)
[ 4143.541443] nvargus-daemon[9813]: waitForIdleLocked remaining request 102
[ 4143.541443] nvargus-daemon[9813]: SCF: Error Timeout: waitForIdle() timed out (in src/api/Session.cpp, function waitForIdleLocked(), line 927)
[ 4143.541443] nvargus-daemon[9813]: (Argus) Error Timeout:  (propagating from src/api/CaptureSessionImpl.cpp, function destroy(), line 169)

As usual, gst-launch does not give many hints about parameters that need to be specified, etc… e.g. I needed to specify the framerate to avoid a complain about exceeding framerate, etc.

Any ideas of what could be wrong?

Let me know if some DT or any other information is needed.

P.S.
Some version info.

$ sudo apt list gstreamer1.0-tools gstreamer1.0-alsa   gstreamer1.0-plugins-base gstreamer1.0-plugins-good   gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
[sudo] password for sen: 
Listing... Done
gstreamer1.0-alsa/now 1.14.5-0ubuntu1~18.04.3 arm64 [installed,local]
gstreamer1.0-libav/now 1.14.5-0ubuntu1~18.04.1 arm64 [installed,local]
gstreamer1.0-plugins-bad/now 1.14.5-0ubuntu1~18.04.1 arm64 [installed,local]
gstreamer1.0-plugins-base/now 1.14.5-0ubuntu1~18.04.3 arm64 [installed,local]
gstreamer1.0-plugins-good/now 1.14.5-0ubuntu1~18.04.3 arm64 [installed,local]
gstreamer1.0-plugins-ugly/now 1.14.5-0ubuntu1~18.04.1 arm64 [installed,local]
gstreamer1.0-tools/now 1.14.5-0ubuntu1~18.04.2 arm64 [installed,local]

Boost the clocks to try.

sudo nvpmodel -m 0
sudo jetson_clocks
sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

Seems to make no difference…

$ sudo jetson_clocks --show
SOC family:tegra194  Machine:Jetson-AGXi
Online CPUs: 0-7
cpu0: Online=1 Governor=schedutil MinFreq=1190400 MaxFreq=1190400 CurrentFreq=1190400 IdleStates: C1=0 c6=0 
cpu1: Online=1 Governor=schedutil MinFreq=1190400 MaxFreq=1190400 CurrentFreq=1190400 IdleStates: C1=0 c6=0 
cpu2: Online=1 Governor=schedutil MinFreq=1190400 MaxFreq=1190400 CurrentFreq=1190400 IdleStates: C1=0 c6=0 
cpu3: Online=1 Governor=schedutil MinFreq=1190400 MaxFreq=1190400 CurrentFreq=1190400 IdleStates: C1=0 c6=0 
cpu4: Online=1 Governor=schedutil MinFreq=1190400 MaxFreq=1190400 CurrentFreq=1190400 IdleStates: C1=0 c6=0 
cpu5: Online=1 Governor=schedutil MinFreq=1190400 MaxFreq=1190400 CurrentFreq=1190400 IdleStates: C1=0 c6=0 
cpu6: Online=1 Governor=schedutil MinFreq=1190400 MaxFreq=1190400 CurrentFreq=1190400 IdleStates: C1=0 c6=0 
cpu7: Online=1 Governor=schedutil MinFreq=1190400 MaxFreq=1190400 CurrentFreq=1190400 IdleStates: C1=0 c6=0 
GPU MinFreq=905250000 MaxFreq=905250000 CurrentFreq=905250000
EMC MinFreq=204000000 MaxFreq=1600000000 CurrentFreq=1600000000 FreqOverride=1
Can't access Fan!
NV Power Mode: MODE_40W_ALL
$ echo 1 | sudo tee /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
1
$ echo 1 | sudo tee /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
1
$ echo 1 | sudo tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
1
$ echo 1 | sudo tee /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
1
$ sudo cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate | sudo tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
819200000
$ sudo cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | sudo tee /sys/kernel/debug/bpmp/debug/clk/isp/rate
1011200000
$ sudo cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | sudo tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
400000000
$ sudo cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | sudo tee /sys/kernel/debug/bpmp/debug/clk/emc/rate
2133000000
$ sudo modprobe ar1335
$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=3 timeout=2 ! 'video/x-raw(memory:NVMM),format=(string)NV12,framerate=(fraction)24/1' ! nvvidconv ! 'video/x-raw,format=(string)NV12' ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
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: 4208 x 3120 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 3840 x 2160 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 1920 x 1080 FR = 77.999999 fps Duration = 12820513 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 4208 x 3120 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 3840 x 2160 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 1920 x 1080 FR = 77.999999 fps Duration = 12820513 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 3 
   Output Stream W = 4208 H = 3120 
   seconds to Run    = 2 
   Frame Rate = 28.000001 
GST_ARGUS: Setup Complete, Starting captures for 2 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
CONSUMER: ERROR OCCURRED
Additional debug info:
Argus Error Status
Execution ended after 0:00:00.734162912
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
GST_ARGUS: Cleaning up
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
Setting pipeline to NULL ...
Freeing pipeline ...
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Argus client is exiting with 3 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)

N.B. The same thing happens with nvgstcapture.

$ nvgstcapture --color-format=1 --camsrc=1 --mode=2 --video-enc=2 --cap-dev-node=0 --sensor-mode=3 --framerate=24 --timeout=2 --file-name=gsttest
Encoder null, cannot set bitrate!
Encoder Profile = High
Supported resolutions in case of ARGUS Camera
  (2) : 640x480
  (3) : 1280x720
  (4) : 1920x1080
  (5) : 2104x1560
  (6) : 2592x1944
  (7) : 2616x1472
  (8) : 3840x2160
  (9) : 3896x2192
  (10): 4208x3120
  (11): 5632x3168
  (12): 5632x4224

Runtime ARGUS Camera Commands:

  Help : 'h'
  Quit : 'q'
  Set Capture Mode:
      mo:<val>
          (1): image
          (2): video
  Get Capture Mode:
      gmo
  Set sensor orientation:
      so:<val>
          (0): none
          (1): Rotate counter-clockwise 90 degrees
          (2): Rotate 180 degrees
          (3): Rotate clockwise 90 degrees
  Get sensor orientation:
      gso
  Set sensor mode:
      smo:<val> e.g., smo:1
  Get sensor mode:
      gsmo
  Set Whitebalance Mode:
      wb:<val>
          (0): off
          (1): auto
          (2): incandescent
          (3): fluorescent
          (4): warm-fluorescent
          (5): daylight
          (6): cloudy-daylight
          (7): twilight
          (8): shade
          (9): manual
  Get Whitebalance Mode:
      gwb
  Set Saturation (0 to 2):
      st:<val> e.g., st:1.25
  Get Saturation:
      gst
  Set Exposure Compensation (-2 to 2):
      ec:<val> e.g., ec:-2
  Get Exposure Compensation:
      gec
  Set Auto Whitebalance Lock:
      awbl:<val> e.g., awbl:0
  Get Auto Whitebalance Lock:
      awbl
  Set Auto Exposure Lock:
      ael:<val> e.g., ael:0
  Get Auto Exposure Lock:
      gael
  Set TNR Mode:
      tnrm:<val> e.g., tnrm:1
          (0): OFF
          (1): FAST
          (2): 6, capture 6 images)
           timer/multihot values are optional, capture defaults to single shot with timer=0s
  Start Recording : enter '1'
  Stop Recording  : enter '0'
  Video snapshot  : enter '2' (While recording video)
  Get Preview Resolution:
      gpcr
  Get Image Capture Resolution:
      gicr
  Get Video Capture Resolution:
      gvcr


Runtime encoder configuration options:

  Set Encoding Bit-rate(in bytes):
      br:<val> e.g., br:4000000
  Get Encoding Bit-rate(in bytes):
      gbr
  Set Encoding Profile(only for H.264):
      ep:<val> e.g., ep:1
          (0): Baseline
          (1): Main
          (2): High
  Get Encoding Profile(only for H.264):
      gep
  Force IDR Frame on video Encoder(only for H.264):
      Enter 'f' 


bitrate = 4000000
Encoder control-rate = 1
Encoder EnableTwopassCBR = 0
Opening in BLOCKING MODE 
** Message: 10:04:35.810: <main:4674> iterating capture loop ....
NvMMLiteOpen : Block : BlockType = 8 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 8 
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 4208 x 3120 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 3840 x 2160 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 1920 x 1080 FR = 77.999999 fps Duration = 12820513 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 4208 x 3120 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 3840 x 2160 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: 1920 x 1080 FR = 77.999999 fps Duration = 12820513 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 3 
   Output Stream W = 4208 H = 3120 
   seconds to Run    = 2 
   Frame Rate = 28.000001 
GST_ARGUS: Setup Complete, Starting captures for 2 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
ERROR on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
CONSUMER: ERROR OCCURRED
debug info:
Argus Error Status
GST_ARGUS: Cleaning up
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
** Message: 10:06:36.828: <main:4684> Capture completed
** Message: 10:06:36.828: <main:4733> Camera application will now exit
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Argus client is exiting with 3 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)

This problem could be sensor initialized take much time to streaming cause the timeout. Maybe try to reduce the sensor initialize time to try.

Add “event-wait=5000000000 acquire-wait=6000000000” to try.

gst-launch-1.0 -v -e nvarguscamerasrc event-wait=5000000000 acquire-wait=6000000000 ! 'video/x-raw(memory:NVMM)' ! nvvidconv ! fakesink sync=0

I get
WARNING: erroneous pipeline: no property "event-wait" in element "nvarguscamerasrc0"

If I get rid of the first property, then I get:
WARNING: erroneous pipeline: no property "acquire-wait" in element "nvarguscamerasrc0"

$ gst-inspect-1.0 nvarguscamerasrc
Factory Details:
  Rank                     primary (256)
  Long-name                NvArgusCameraSrc
  Klass                    Video/Capture
  Description              nVidia ARGUS Camera Source
  Author                   Viranjan Pagar <vpagar@nvidia.com>, Amit Pandya <apan
dya@nvidia.com>

Plugin Details:
  Name                     nvarguscamerasrc
  Description              nVidia ARGUS Source Component
  Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvargu
scamerasrc.so
  Version                  1.0.0
  License                  Proprietary
  Source module            nvarguscamerasrc
  Binary package           NvARGUSCameraSrc
  Origin URL               http://nvidia.com/

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBaseSrc
                         +----GstNvArgusCameraSrc

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw(memory:NVMM)
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
                 format: { (string)NV12, (string)P010_10LE }
              framerate: [ 0/1, 2147483647/1 ]

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
  SRC: 'src'
    Pad Template: 'src'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "nvarguscamerasrc0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  blocksize           : Size in bytes to read per buffer (-1 = default)
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 4294967295 Default: 4096 
  num-buffers         : Number of buffers to output before sending EOS (-1 = unlimited)
                        flags: readable, writable
                        Integer. Range: -1 - 2147483647 Default: -1 
  typefind            : Run typefind before negotiating (deprecated, non-functional)
                        flags: readable, writable, deprecated
                        Boolean. Default: false
  do-timestamp        : Apply current stream time to buffers
                        flags: readable, writable
                        Boolean. Default: true
  silent              : Produce verbose output ?
                        flags: readable, writable
                        Boolean. Default: true
  timeout             : timeout to capture in seconds (Either specify timeout or num-buffers, not both)
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 2147483647 Default: 0 
  wbmode              : White balance affects the color temperature of the photo
                        flags: readable, writable
                        Enum "GstNvArgusCamWBMode" Default: 1, "auto"
                           (0): off              - GST_NVCAM_WB_MODE_OFF
                           (1): auto             - GST_NVCAM_WB_MODE_AUTO
                           (2): incandescent     - GST_NVCAM_WB_MODE_INCANDESCENT
                           (3): fluorescent      - GST_NVCAM_WB_MODE_FLUORESCENT
                           (4): warm-fluorescent - GST_NVCAM_WB_MODE_WARM_FLUORESCENT
                           (5): daylight         - GST_NVCAM_WB_MODE_DAYLIGHT
                           (6): cloudy-daylight  - GST_NVCAM_WB_MODE_CLOUDY_DAYLIGHT
                           (7): twilight         - GST_NVCAM_WB_MODE_TWILIGHT
                           (8): shade            - GST_NVCAM_WB_MODE_SHADE
                           (9): manual           - GST_NVCAM_WB_MODE_MANUAL
  saturation          : Property to adjust saturation value
                        flags: readable, writable
                        Float. Range:               0 -               2 Default:               1 
  sensor-id           : Set the id of camera sensor to use. Default 0.
                        flags: readable, writable
                        Integer. Range: 0 - 255 Default: 0 
  sensor-mode         : Set the camera sensor mode to use. Default -1 (Select the best match)
                        flags: readable, writable
                        Integer. Range: -1 - 255 Default: -1 
  total-sensor-modes  : Query the number of sensor modes available. Default 0
                        flags: readable
                        Integer. Range: 0 - 255 Default: 0 
  exposuretimerange   : Property to adjust exposure time range in nanoseconds
                        Use string with values of Exposure Time Range (low, high)
                        in that order, to set the property.
                        eg: exposuretimerange="34000 358733000"
                        flags: readable, writable
                        String. Default: null
  gainrange           : Property to adjust gain range
                        Use string with values of Gain Time Range (low, high)
                        in that order, to set the property.
                        eg: gainrange="1 16"
                        flags: readable, writable
                        String. Default: null
  ispdigitalgainrange : Property to adjust digital gain range
                        Use string with values of ISP Digital Gain Range (low, high)
                        in that order, to set the property.
                        eg: ispdigitalgainrange="1 8"
                        flags: readable, writable
                        String. Default: null
  tnr-strength        : property to adjust temporal noise reduction strength
                        flags: readable, writable
                        Float. Range:              -1 -               1 Default:              -1 
  tnr-mode            : property to select temporal noise reduction mode
                        flags: readable, writable
                        Enum "GstNvArgusCamTNRMode" Default: 1, "NoiseReduction_Fast"
                           (0): NoiseReduction_Off - GST_NVCAM_NR_OFF
                           (1): NoiseReduction_Fast - GST_NVCAM_NR_FAST
                           (2): NoiseReduction_HighQuality - GST_NVCAM_NR_HIGHQUALITY
  ee-mode             : property to select edge enhnacement mode
                        flags: readable, writable
                        Enum "GstNvArgusCamEEMode" Default: 1, "EdgeEnhancement_Fast"
                           (0): EdgeEnhancement_Off - GST_NVCAM_EE_OFF
                           (1): EdgeEnhancement_Fast - GST_NVCAM_EE_FAST
                           (2): EdgeEnhancement_HighQuality - GST_NVCAM_EE_HIGHQUALITY
  ee-strength         : property to adjust edge enhancement strength
                        flags: readable, writable
                        Float. Range:              -1 -               1 Default:              -1 
  aeantibanding       : property to set the auto exposure antibanding mode
                        flags: readable, writable
                        Enum "GstNvArgusCamAeAntiBandingMode" Default: 1, "AeAntibandingMode_Auto"
                           (0): AeAntibandingMode_Off - GST_NVCAM_AEANTIBANDING_OFF
                           (1): AeAntibandingMode_Auto - GST_NVCAM_AEANTIBANDING_AUTO
                           (2): AeAntibandingMode_50HZ - GST_NVCAM_AEANTIBANDING_50HZ
                           (3): AeAntibandingMode_60HZ - GST_NVCAM_AEANTIBANDING_60HZ
  exposurecompensation: property to adjust exposure compensation
                        flags: readable, writable
                        Float. Range:              -2 -               2 Default:               0 
  aelock              : set or unset the auto exposure lock
                        flags: readable, writable
                        Boolean. Default: false
  aeregion            : Property to set region of interest for auto exposure
                        with values of ROI coordinates (left, top, right, bottom)
                        and weight (float number) in that order, to set the property
                        use for example: aeregion="0 0 256 256 1"
                        flags: readable, writable
                        String. Default: null
  awblock             : set or unset the auto white balance lock
                        flags: readable, writable
                        Boolean. Default: false
  bufapi-version      : set to use new Buffer API
                        flags: readable, writable
                        Boolean. Default: false

What’s your BSP?
I just confirm JP5.1.2 have implement it.

Thanks

My BSP is 32.7.1

I’ve also tried updating these to 32.7.4, but those properties are still not present.

nvidia-l4t-camera
nvidia-l4t-cuda
nvidia-l4t-multimedia-utils
nvidia-l4t-gstreamer
nvidia-l4t-multimedia
nvidia-l4t-init
nvidia-l4t-3d-core
nvidia-l4t-x11
nvidia-l4t-wayland
nvidia-l4t-libvulkan
nvidia-l4t-firmware

The problem to upgrade to BSP 35.2.x is that they do not seem to support the sensor AR1335.

Hello David,

You can change the timeout value in the code source for the previous JP:

diff --git a/gstnvarguscamerasrc.cpp b/gstnvarguscamerasrc.cpp
index 34e2e6a..27d5659 100644
--- a/gstnvarguscamerasrc.cpp
+++ b/gstnvarguscamerasrc.cpp
@@ -80,8 +80,8 @@
 
 #define GST_NVARGUS_MEMORY_TYPE "nvarguscam"
 static const int DEFAULT_FPS        = 30;
-static const uint64_t WAIT_FOR_EVENT_TIMEOUT  = 3000000000;
-static const uint64_t ACQUIRE_FRAME_TIMEOUT   = 5000000000;
+static const uint64_t WAIT_FOR_EVENT_TIMEOUT  = 5000000000;
+static const uint64_t ACQUIRE_FRAME_TIMEOUT  =  50000000000;
 
 #ifdef __cplusplus
 extern "C"
1 Like

That’s great!

What repo are the sources in? I was under the impresion that they were not available at all.

Found some unofficial repo on the internet and changing the timeouts in the code as suggested makes things work.

Would be good to have the rifght repo and tag to clone though…

Download from the download center.

https://developer.nvidia.com/embedded/l4t/r32_release_v7.1/sources/t186/public_sources.tbz2

Right, it was in the sources tarball… totally missed that.

Thanks.

Also, you can see the sources in each Linux for Tegra Release: https://developer.nvidia.com/embedded/linux-tegra-r3261,

See section 32.6.1 Driver Details and select the sources for your Xavier ( L4T Driver Package (BSP) Sources)

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