One csi camera is not working in jetson linux 36.3

Hello
I’m going to use the csi camera in the jetson linux 36.3 environment that came out on the orin nx and carrier board.
A total of two csi cameras were connected, and it was confirmed that they were connected by /dev/video0, /dev/video1.

$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 num-buffers=300 ! nv3dsink
$ gst-launch-1.0 nvarguscamerasrc sensor_id=1 num-buffers=300 ! nv3dsink

I ran the above command, and sensor_id=0 got an error, and sensor_id=1 ran well.
When I tested it for hardware defects just in case, it worked well. And it worked well when I did jetpack5 or jetpack4.
I flash with jetson linux 36.3 and sensor_id=0 doesn’t work, can you tell me why?

The following text is an error that occurs when running with sensor_id=0.

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: 3280 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: 3280 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: Running with following settings:
Camera index = 0
Camera mode = 2
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 29.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: TIMEOUT
Additional debug info:
Argus Error Status
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 Execution ended after 0:00:07.666914982
NvBufSurfaceFromFd Failed.
Setting pipeline to NULL …
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:243 (propagating)
GST_ARGUS: Cleaning up
Freeing pipeline …

Thank you.

hello hyeyum1,

let’s narrow down the issue,
please refer to developer guide, Applications Using V4L2 IOCTL Directly.
you may use V4L2 IOCTL to verify basic camera functionality.

BTW,
may I also know the camera modules you’re using?
for instance, were they… Raspberry Pi, IMX219s?

$ v4l2-compliance -d /dev/video0

Driver Info:
Driver name : tegra-video
Card type : vi-output, imx219 9-0010
Bus info : platform:tegra-capture-vi:2
Driver version : 5.15.136
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format

Looking at the results above, it seems that imx219 is correct.

I used V4L2 IOCTL to save the video, and I tried to watch the saved video.
However, the file size is fixed at 16163840, and saved videos cannot be played as empty files when running. I’m not sure if this works properly…

The following command was executed, and both video0 and video1 resulted in the same result.

$ v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=test0.mp4
$ v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=test1.mp4

hello hyeyum1,

you cannot use v4l2-ctl to record mp4 file, it’s simply fetching the stream, there’s no encoder has involved.
please try…
$ v4l2-ctl -d /dev/video<X> --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

it should output < for each success capture buffer as a frame.
please check basic camera functionality for both of your video0 and video1 camera nodes.

hello JerryChang

Video0 has the following results.

$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

<<<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<

Video1 has the following results.

$ v4l2-ctl -d /dev/video1 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

Video1 did not show anything. However, the following error occurs in /var/log/syslog.

$ tail -f /var/syslog

May 10 12:42:43 nvidia-desktop kernel: [ 8076.045525] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
May 10 12:42:43 nvidia-desktop kernel: [ 8076.045550] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
May 10 12:42:43 nvidia-desktop kernel: [ 8076.046882] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
May 10 12:42:46 nvidia-desktop kernel: [ 8078.605470] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
May 10 12:42:46 nvidia-desktop kernel: [ 8078.605499] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
May 10 12:42:46 nvidia-desktop kernel: [ 8078.606910] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
May 10 12:42:48 nvidia-desktop kernel: [ 8081.165398] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
May 10 12:42:48 nvidia-desktop kernel: [ 8081.165427] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
May 10 12:42:48 nvidia-desktop kernel: [ 8081.166724] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
May 10 12:42:51 nvidia-desktop kernel: [ 8083.725342] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
May 10 12:42:51 nvidia-desktop kernel: [ 8083.725370] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
May 10 12:42:51 nvidia-desktop kernel: [ 8083.726846] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

In this case, video0 seems to work well, shouldn’t video0 work when I run gst-launch?

hello hyeyum1,

we’ve tested and confirm IMX219 works normally on CAM0 and CAM1 slots with JP-6 GA release version.
could you please double check your release version, $ cat /etc/nv_tegra_release

hello JerryChang.

I checked the release version.

$ cat /etc/nv_tegra_release

R36 (release), REVISION: 3.0, GCID: 36106755, BOARD: generic, EABI: aarch64, DATE: Thu Apr 25 03:14:05 UTC 2024
KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

Was there anything wrong when you checked CAM0 and CAM1 working well?

hello hyeyum1,

ya, it looks like JP-6 GA public release version.
may I know which IMX219 camera module you’re working with? is it Raspberry Pi, IMX219?

yes. It is Raspberry Pi camera.

Does both ports work well when you run the two commands below with the same module I used?

$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 num-buffers=300 ! nv3dsink
and
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

hello hyeyum1,

yes, it’s the same command we’re used, and we’re able to fetch the camera stream correctly.
could you please try again with $ sudo python jetson-io.py to configure CSI connector, and please have IMX219 connected before system boot-up.

Can you tell me in detail how to configure it on jetson-io.py ?

please refer to developer guide, Running Jetson-IO.

Configure Jetson 24pin CSI Connector - Configure for compatible hardware - Camera IMX219 Dual

After connecting two CSI cameras, I configured the IMX219 dual and rebooted it.
However, neither command worked properly…

Both cameras worked well when I flash the jetpack 5 with the same configuration.
Has the upgraded jetpack 6 changed anything regarding imx219 dtb?

hello hyeyum1,

may I double confirm how you moving to JP-6 production release?
is it possible to re-download JetPack 6.0, and re-flash your target for verificaiton?

I downloaded it again from the link below and flash it again.

However, the same error as before occurs…

I flashed my carrier board by referring to Quick Start in the link below, and I didn’t touch the kernel, is it correct that I did it right?
Please tell me if you have any specific modifications in the kernel part.

https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/IN/QuickStart.html

may I confirm your board combination, for example, is it Orin NX with Orin Nano carrier board? may I also know the module SKU?

I used Orin NX with carrier board.

pppp is the module’s or board’s SKU.

For a Jetson Orin NX and Nano module:

  • 0000 for Jetson Orin NX 16GB (16 GB RAM)
  • 0001 for Jetson Orin NX 8GB (8 GB RAM)
  • 0003 and 0005 for Jetson Orin Nano 8GB (8 GB RAM)
  • 0004 for Jetson Orin Nano 4GB (4 GB RAM)

For a reference carrier board the SKU is currently 0000 for all supported boards.

If I look at the above, SKU is 0000.

So I used the following command.
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/generic/cfg/flash_t234_qspi.xml” --showlogs --network usb0 p3768-0000-p3767-0000-a0 internal

here’s an alternative way, please try install JP-6 release image by SDK Manager | NVIDIA Developer.

As far as I know, carrier board can’t flash with sdk manager, right?

it works if you’re using developer kits.