Camera driver v4l2-ctl works but not argus_camera and gstreamer

Hi,

We are developing GMSL camera driver on Jetpack 6.2 (R36.4.3), and the argus_camera and gstreamer tools do not work. Please help check it, thanks.

1.Use the v4l2-ctl command to capture raw data,it’s OK.

nv@nv-desktop:~$ v4l2-ctl --set-fmt-video=width=3840,height=2160,pixelformat=RG12 --stream-mmap --set-ctrl=sensor_mode=0 --stream-count=10 --stream-to=imx728.raw -d /dev/video0
<<<<<<<<<<
nv@nv-desktop:~$ v4l2-ctl --set-fmt-video=width=3840,height=2160,pixelformat=RG12 --stream-mmap --set-ctrl=sensor_mode=0 --stream-count=10 --stream-to=imx728.raw -d /dev/video1
<<<<<<<<<<

2.nvargus-daemon log

log.txt (21.6 KB)

3.DTS

		tegra-camera-platform {
			compatible = "nvidia, tegra-camera-platform";

			num_csi_lanes = <8>;
			max_lane_speed = <1600000>;
			min_bits_per_pixel = <12>;
			vi_peak_byte_per_pixel = <2>;
			vi_bw_margin_pct = <25>;
			max_pixel_rate = <750000>;
			isp_peak_byte_per_pixel = <5>;
			isp_bw_margin_pct = <25>;

			modules {
				module0 {
					badge = "imx728_bottomleft";
					position = "bottomleft";
					orientation = "0";
					drivernode0 {
						/* Declare PCL support driver (classically known as guid)  */
						pcl_id = "v4l2_sensor";
						/* Declare the device-tree hierarchy to driver instance */
						sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/imx728_d@79";
					};
				};
				module1 {
					badge = "imx728_bottomright";
					position = "bottomright";
					orientation = "0";
					drivernode0 {
						/* Declare PCL support driver (classically known as guid)  */
						pcl_id = "v4l2_sensor";
						/* Declare the device-tree hierarchy to driver instance */
						sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/imx728_c@78";
					};
				};
				module2 {
					badge = "imx728_centerleft";
					position = "centerleft";
					orientation = "0";
					drivernode0 {
						/* Declare PCL support driver (classically known as guid)  */
						pcl_id = "v4l2_sensor";
						sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/imx728_b@77";
					};
				};
				module3 {
					badge = "imx728_centerright";
					position = "centerright";
					orientation = "0";
					drivernode0 {
						 /* Declare PCL support driver (classically known as guid)  */
						pcl_id = "v4l2_sensor";
						/* Declare the device-tree hierarchy to driver instance */
						sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/imx728_a@76";
					};
				};
			};
		};
	};

*** Please note that this reply is generated by LLM automatically ***

Based on the provided context, it appears that you are experiencing issues with the Argus camera and GStreamer tools on your Jetson AGX Orin device running Jetpack 4.6.2 (R32.4.3). You have successfully used the v4l2-ctl command to capture raw data, but the Argus camera and GStreamer tools are not working as expected.

Here are a few potential issues and suggestions to help you troubleshoot:

  1. V4L2 compliance test: You can try running the v4l2-compliance test to ensure that your camera driver is compliant with the V4L2 interface. This test can help identify any issues with the driver.
  2. Argus camera configuration: Make sure that the Argus camera is properly configured and that the nvargus-daemon log file is not indicating any errors. You can check the log file by running the command nvargus-daemon log log.txt.
  3. GStreamer installation: Ensure that GStreamer is properly installed on your Jetson device. You can try reinstalling GStreamer using the command sudo apt-get install gstreamer1.0.
  4. GStreamer pipeline: Verify that the GStreamer pipeline is correctly configured. You can try using the gst-launch-1.0 command to test the pipeline.
  5. Camera sensor mode: Check that the camera sensor mode is set correctly. You can try setting the sensor mode using the v4l2-ctl command, for example: v4l2-ctl -d /dev/video0 -c sensor_mode=0.
  6. Device tree configuration: Ensure that the device tree is correctly configured for your camera module. You can try checking the device tree configuration using the dtc command.
  7. Jetpack version: Verify that you are running the latest version of Jetpack. You can try updating to the latest version using the sudo apt-get update and sudo apt-get upgrade commands.

In comparison to the provided context, it appears that the v4l2-ctl command is working correctly, but the Argus camera and GStreamer tools are not. This suggests that the issue may be related to the camera driver or configuration rather than the V4L2 interface.

To further troubleshoot the issue, you can try:

  • Checking the camera driver documentation for any specific configuration requirements
  • Verifying that the camera module is correctly connected to the Jetson device
  • Trying a different camera module or driver to see if the issue is specific to the current setup
  • Checking the Jetson device’s system logs for any error messages related to the camera or GStreamer

I hope this helps you troubleshoot the issue and get the Argus camera and GStreamer tools working correctly on your Jetson AGX Orin device.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

hello zuolifang0930,

let me re-cap the error logs, it looks like capture request has timed out.

SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)
Error: Camera HwEvents wait, this may indicate a hardware timeout occured,abort current/incoming cc for sensor guid 0 count 2657865840

you may dig into signal property settings, since libargus parse device tree properties for camera initialization.
for instance, please refer to Sensor Pixel Clock, which must be set correctly to avoid potential issues.

besides,
you may refer to below for commands to boost all the VI/CSI/ISP 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