Nvargus_daemon with IMX219 camera

There is a link in my first sentence of my first post. This is a career board from Connecttech.

You mean currently running on my setup ?

Any way just replace the /boot/Image at NX by the file build from source.

After replacing the image and a reboot, I can’t execute below command :

diff --git a/drivers/media/platform/tegra/camera/vi/capture.c b/drivers/media/platform/tegra/camera/vi/capture.c

–git option is unrecognized so I tried with -u option and I don’t know what a and b means since I only have those folder containing capture.c :

sudo find -name capture.c
./Linux_for_Tegra/source/public/kernel/kernel-4.9/sound/usb/line6/capture.c
./Linux_for_Tegra/source/public/kernel/nvidia/drivers/media/platform/tegra/camera/vi/capture.c

You may need apply the patch manually by modify the …/tegra/camera/vi/capture.c
in the kernel sources and build the Image then replace the /boot/Image.

Tried it, but got these errors, and now I have to fully reflash my NX, ( I didn’t even replace the Image)

result_make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4.txt (30.8 KB)

Will compile the kernel on another PC then replace the image to /boot/Image

Hi ShaneCCC,
Here is the step that I did :

  • Reflash my NX setup to get it working.

  • On my DevKit NX (not the same NX) → Modify the file in /Linux_for_Tegra/source/public/kernel/nvidia/drivers/media/platform/tegra/camera/vi/capture.c to apply the patch.

  • On my DevKit NX, I did these commands line :
    – $ TEGRA_KERNEL_OUT= < outdir >
    – $ cd <kernel_source>
    – $ mkdir -p $TEGRA_KERNEL_OUT
    – $ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
    – $ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4

  • Change the Image in (NX setup) /boot/Image by the one built with the kernel source in /build_kernel_out/arch/arm64/boot/Image

  • sudo reboot

  • sudo modprobe uvcvideo nodrop=1 timeout=5000

  • nvgstcapture-1.0 → still the same error : no reply from processor

  • sudo service nvargus-daemon restart

  • nvgstcapture-1.0 → still the same error : no reply from processor

Did I miss something ? The error is still here and the camera is correctly detected :

$ dmesg | grep imx219
[ 1.945124] imx219 9-0010: tegracam sensor driver:imx219_v2.0.6
[ 1.970522] imx219 10-0010: tegracam sensor driver:imx219_v2.0.6
[ 1.994087] imx219 10-0010: imx219_board_setup: error during i2c read probe (-121)
[ 1.994424] imx219 10-0010: board setup failed
[ 1.994611] imx219: probe of 10-0010 failed with error -121
[ 3.053972] tegra194-vi5 15c10000.vi: subdev imx219 9-0010 bound

Camera is perfectly working on the devkit.

Did you check with v4l2-ctl?

Yes, same result as before :

v4l2-ctl --set-fmt-video=width=1280,height=720 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=500 -d /dev/video0 

v4l2_arducam.txt (6.8 KB)

Did you check uname -a to confirm the Image was build from you?

$ uname -a
Linux localhost.home 4.9.253-tegra #1 SMP PREEMPT Fri Oct 1 12:54:13 EDT 2021 aarch64 aarch64 aarch64 GNU/Linux

Is this the Image built from kernel ? I did :

  • (On Devkit) scp ~/build_kernel_out/arch/arm64/boot/Image NX@IP:/home/user
  • (On NX setup) sudo mv Image /boot/
  • (On NX setup) sudo reboot

Never mind for the path, this patch only for fixed kernel crash while capture failed.
However the capture failed could be HW or dts problem cause it.
I would suggest consult with vendor for the capture failed problem.

Camera works at each tries with devkit, so it should be MIPI connector issues ?
Restarting the nvargus-daemon service sometimes enables the camera, so is it really a hardware issue ?

If the devkit without problem with the same driver you may need to figure out what the different for the customize carrier board.

Ok, so the source of the issue is the connection between the hardware or DTB of the carreer board or on the nvargus-daemon service, but I will never have access to those.
I tried to inspect the script launched by nvargus-daemon but it can’t be read , so I try to look in services needed by nvargus-daemon but found nothing interesting.

Already did, and I have the same camera model, BSP, Jetpack version, carreer board as what they tested on.

What should I do now except waiting for board constructor response ?

It’s doesn’t matter with nvargus-daemon.
You need to verify the sensor driver by v4l2-ctl for the sensor bring up first.

After reaching out with Quark constructor, this issue is currently under investigation from both sides. It seems that there is an issue with the 32.6.1 Jetpack version, but it’s working fine with 32.5 or 32.5.2.
I will try with Jetpack 32.5, and will update this topic if :

  • It works with Jetpack 32.5
  • I have any news about the camera driver <–> nvargus-daemon service issue

Thank you ShaneCCC for your assistance and your help.