Issue with CSI Camera Testing on Jetson Nano - Seeking Assistance

I am facing an error while testing the CSI camera(imx219) on my Jetson Nano and would greatly appreciate your assistance in resolving it.

gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! 'video/x-raw(memory:NVMM),width=3264, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=0 ! 'video/x-raw, width=816, height=616' !  nvvidconv ! nvegltransform ! nveglglessink -e

The error message I encountered is as follows:

nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
CONSUMER: ERROR OCCURRED
ERROR on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED

I have been unable to find a solution on my own, and I’m reaching out to the community for guidance. It appears that the error is related to the DMA buffer and hardware buffer mapping. However, I’m unsure about the specific steps to take in order to troubleshoot and resolve the problem.

If any community members have experienced a similar issue or have insights on how to diagnose and fix this problem, I would greatly appreciate your assistance. Please share any relevant documentation, resources, or steps I can follow to resolve this error.

in general, these error caused by the sensor did not operated correctly.
is this camera module as Raspberry pi v2, imx219? had you execute Jetson-IO to configure the CSI connector?

BTW,
you may see-also developer guide, Applications Using V4L2 IOCTL Directly.
please refer to the sample command to use V4L2 IOCTL to verify basic camera functionality.

IMX219-200
And I attempted to configure the CSI connector using Jetson-IO, but when I execute the command

sudo /opt/nvidia/jetson-io/jetson-io.py

, the interface crashes abruptly. Additionally, I tried referring to the developer guide titled “Applications Using V4L2 IOCTL Directly,” but it only displays an error message stating “photo source file missing.”

I would greatly appreciate your assistance in resolving these problems. Please let me know if there are any solutions or suggestions you can provide. Thank you for your help.

hello 901026ben,

is it a production module (i.e. with internal eMMC)? Jetson-IO does not support with Nano eMMC modules.
let’s check whether this camera device is register to linux kernel, please gather the complete kernel logs for reference, $ dmesg > klogs.txt

Yes it is.
klogs.txt (61.5 KB)

hello 901026ben,

it’s by default two camera configuration, there’s probing error reported by one of them.
for example,

[    1.296463] imx219 7-0010: tegracam sensor driver:imx219_v2.0.6
[    1.321296] imx219 8-0010: tegracam sensor driver:imx219_v2.0.6
[    1.344545] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x10
[    1.344609] imx219 8-0010: imx219_board_setup: error during i2c read probe (-121)
[    1.344678] imx219 8-0010: board setup failed
[    1.344729] imx219: probe of 8-0010 failed with error -121

do you have only single camera device connect to camera board?
is there a video node created? i.e. $ /dev/video*

yes,

yzuim@ynano:~$ sudo ls /dev/video*
/dev/video0

hello 901026ben,

let’s check whether this single device works or not.

please check the sensor format dumps… $ v4l2-ctl -d /dev/video0 --list-formats-ext
you may refer to below, please update the support format accordingly to fetch the stream.
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

I think it works.

$ v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'RG10'
	Name        : 10-bit Bayer RGRG/GBGB
		Size: Discrete 3264x2464
			Interval: Discrete 0.048s (21.000 fps)
		Size: Discrete 3264x1848
			Interval: Discrete 0.036s (28.000 fps)
		Size: Discrete 1920x1080
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1640x1232
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1280x720
			Interval: Discrete 0.017s (60.000 fps)

but I type the code below, it doesn’t show out anything.
Do I need to change its count or what?

hello 901026ben,

may I know what kind of the failure is… please share the error logs for reference.

it just stuck, no reaction.

let’s gather kernel logs, please enable a terminal for running $ dmesg --follow to reproduce the issue.

klogs2.txt (77.2 KB)

hello 901026ben,

the error log shows…

[  464.392671] video4linux video0: frame start syncpt timeout!0
[  464.600263] video4linux video0: frame start syncpt timeout!0

it’s VI engine kept waiting for frame-start, there’s failure from sensor side not sending frames.
are you using Raspberry pi v2, imx219 camera modules?
may I also confirm which Jetpack release version you’re working with?

JetPack version:

yzuim@ynano:~$ dpkg-query --show nvidia-l4t-core
nvidia-l4t-core	32.7.4-20230608212426

And I am using IMX219-200 Camera module.

may I know the sensor vendor, or, do you have product page for reference?

it looks like the camera module from waveshare.
please refer to https://www.waveshare.com/wiki/IMX219-200_Camera for the steps to test with your camera module.

I tried following the instructions, but the same error occurred again.

yzuim@ynano:~$ DISPLAY=:0.0 nvgstcapture-1.0
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): HIGH QUALITY
  Get TNR Mode:
      gtnrm
  Set TNR Strength (-1 to 1):
      tnrs:<val> e.g., tnrs:0.5
  Get TNR Strength:
      gtnrs
  Set EE Mode:
      eem:<val> e.g., eem:1
          (0): OFF
          (1): FAST
          (2): HIGH QUALITY
  Get EE Mode:
      geem
  Set EE Strength (-1 to 1):
      ees:<val> e.g., ees:0.5
  Get EE Strength:
      gees
  Set Auto Exposure Anti-Banding (0 to 3):
      aeab:<val> e.g., aeab:2
          (0): OFF
          (1): MODE AUTO
          (2): MODE 50HZ
          (3): MODE 60HZ
  Get Auto Exposure Anti-Banding:
      gaeab
  Set Gain Range:
      gr:<val><space><val> e.g., gr:1 16
  Get Gain Range:
      ggr
  Set Exposure Time Range:
      etr:<val><space><val> e.g., etr:34000 35000
  Get Exposure Time Range:
      getr
  Set ISP Digital Gain Range:
      dgr:<val><space><val> e.g., dgr:2 152
  Get ISP Digital Gain Range:
      gdgr
  Capture: enter 'j' OR
           followed by a timer (e.g., jx5000, capture after 5 seconds) OR
           followed by multishot count (e.g., j: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 Profile = High
Encoder control-rate = 1
Encoder EnableTwopassCBR = 0

Using winsys: x11 
Opening in BLOCKING MODE 
** Message: 13:57:39.706: <main:4648> iterating capture loop ....
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 5 
   Output Stream W = 1280 H = 720 
   seconds to Run    = 0 
   Frame Rate = 120.000005 
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 on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
debug info:
Argus Error Status
nvbuf_utils: Can not get HW buffer from FD... Exiting...
CONSUMER: ERROR OCCURRED
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)
(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: 13:59:41.840: <main:4658> Capture completed
** Message: 13:59:41.840: <main:4707> 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 4 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)

output.txt (523 Bytes)