Camera does not work as expected with Orin Nano

Dear Sir,

I am testing the CSI camera functions on Orin Nano with Xavier NX carrier board P3518, the used camera is IMX477 compatible.

I setup the CSI camera to “Camera IMX477 Dual” by using utility jetson-io.py (menu “Configure Jetson 24pin CSI Connector” → “Configure for compatible hardware”), reboot the Orin Nano, and then, test the CSI camera with utility nvgstcapture.

When the IMX477 compatible camera is attached to interface CAM0 on the Xavier NX carrier board, the camera works as expected with nvgstcapture, the video is shown in the window as expected.

But when the IMX477 compatible camera is attached to interface CAM1 on the Xavier NX carrier board, the device /dev/video0 could be found, nvgstcapture starts normally, a black window is shown, there is no video output in the window, and the following error message is shown on the terminal which nvgstcapture starting:

nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)

May I learn from you what could be possible reason about the error message, and the way to resolve this issue?

Best Regards,

hello chengang1,

may I also know which camera configuration you’re used in Jetson-IO to enable IMX477.
for example, did you enable 2-lane or 4-lane config?

The CSI camera is configured as:

I presume it is 2-lane config.

hello chengang1,

we’ve also checked locally, it confirmed IMX477 working on CAM0 and CAM1 with Orin-Nano + P3509 devkit.
could you please double check the hardware connections, thanks

Hi Jerry,

Unfortunately, I do not have P3509 carrier board, the Orin Nano 4GB (P3767) and Xavier NX carrier board (P3518) are used for testing on my hand.

Is it possible to have a try with such combination at your side?

Thanks,
George

Hi chengang1,

The Xavier-NX devkit is P3509.
You can use below command to check:
$ cat /etc/nv_boot_control.conf

Hi Carol,

the contents of /etc/nv_boot_control.conf is:

TNSPEC 3767-300-0004-M.3-1-1-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3767–0004–1–jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE nvme0n1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0

I learn from the Jetson Linux developer guide (Welcome — Jetson Linux Developer Guide documentation), section “Welcome” → " Devices Supported by This Document", in the column “Compatible Developer Kit”, there are lines:

Jetson Xavier NX Developer Kit (P3518-0000)
Includes the P3668-0000 module.

I presume the P3518 is Xavier NX Developer Kit, and I learn from the carrier board which I used for Orin Nano testing, its model number is P3518.

Best Regards,

actually… you can check the board for the SKUs.
for example, the Xavier NX carrier board it shows: Model: P3518.

Hi Jerry,

The carrier board which I used with Orin Nano is Model: p3518, please refer the below picture:

BTW, I try this carrier board with Xavier NX, the 2 CSI interfaces (CAM0 and CAM1) work fine with my IMX477 compatible camera.

where to set the “dmabuf_fd mapped entry”, in dtb?

hello chengang1,

we’ve confirmed IMX477 works with Cam0 and Cam1.
let me double confirm the Jetpack release version, and also the steps to configure CSI connector.

The JetPack 5.1.1 (rev. 1) is installed to the NVME on my Orin Nano (4GB) by using Nvidia SDK Manager, only Jetson Linux is installed, Jetson Runtime components and Jetson SDK components are not installed.

While the Jetson Linux is configured manually in its first boot, I log into the desktop, open a terminal window, start jetson-io.py with command “sudo /opt/nvidia/jetson-io/jetson-io.py” in this window, and select “Configure Jetson 24pin CSI Connector” → “Configure for compatible hardware” → “Camera IMX477 Dual” in the menu of jetson-io, “Save the pin changes”, and then “Save and reboot to reconfigure pins”.

After the Orin Nano reboots again, the IMX477 compatible camera is detected and the device “/dev/video0” could be found, then, I test it with utility nvgstcapture.

hello chengang1,

please also gather the kernel init logs for reference, $ dmesg > klogs.txt

klogs.txt (69.8 KB)

The output of dmesg.

The IMX477 camera is attached to the CAM1, and the following error message is shown when the utility nvgstcapture runs:

nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)

hello chengang1,

do you have only single IMX477 connected?
it looks one of sensor registration has failed.

[   12.435040] imx477 9-001a: tegracam sensor driver:imx477_v2.0.6
[   12.736001] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx477 9-001a bound
...
[   13.037950] imx477 10-001a: imx477_board_setup: error during i2c read probe (-121)
[   13.048572] imx477 10-001a: board setup failed
[   13.054117] imx477: probe of 10-001a failed with error -121

the error message, dmabuf_fd it’s related to buffer surfaces allocation failure, which may due to no sensor frames,
you may try an alternative ways to select sensor-id to enable the camera stream,
for example,
$ gst-launch-1.0 nvarguscamerasrc sensor-id=X ! 'video/x-raw(memory:NVMM),framerate=30/1,format=NV12' ! nvvidconv ! xvimagesink

Hi Jerry,

You are right, I just have one CSI camera, it is attached to CAM1 interface on the carrier board. You could see the line:

[ 12.736001] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx477 9-001a bound

If I try the alternative way to select sensor-id, what is the value of sensor-id, 0 or 9-001a?

Some information about camera from c4l2-ctl:

$ v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
/dev/media0

vi-output, imx477 9-001a (platform:tegra-capture-vi:1):
/dev/video0

$ v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

    [0]: 'RG10' (10-bit Bayer RGRG/GBGB)
            Size: Discrete 3840x2160
                    Interval: Discrete 0.033s (30.000 fps)
            Size: Discrete 1920x1080
                    Interval: Discrete 0.017s (60.000 fps)

some error output as nvgstcapture when the following pipeline is launched:

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),framerate=30/1,format=NV12’ ! nvvidconv ! xvimagesink

With following command:

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1920,height=1080,framerate=60/1,format=NV12’ ! queue ! nvvidconv ! queue ! xvimagesink

When the IMX477 camera is attached to the CSI interface CAM0, the video is shown in the display window, and the following log gst-launch0.log is gotten:
gst-launch0.log (1.2 KB)

When the IMX477 camera is attached to the CSI interface CAM1, no video is shown in the display window, the display window is a black window, the following log gst-launch1.log is gotten:
gst-launch1.log (1.8 KB)