Error Using the Camera Setup and Verification

Hello, I am using the Camera Setup and Verification guide to stream from hdmi input onto the CSI HDMI input board on the Clara AGX Developer kit.
When I run the command,

gst-launch-1.0 v4l2src io-mode=mmap device=/dev/video0 ! 'video/x-raw, format=(string)BGRA, width=(int)1920, height=(int)1080, framerate=(fraction)60/1' ! capssetter join=true caps='video/x-raw, format=(string)RGBA' ! nvvideoconvert ! 'video/x-raw(memory:NVMM), format=(string)RGBA' ! nveglglessink sync=0

I receive the following error.
Setting pipeline to PAUSED …

Using winsys: x11
Pipeline is live and does not need PREROLL …
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to NULL …
Freeing pipeline …

I have been stuck on this problem and I’m relatively new to Jetson AGX Xavier. Could someone direct me to a solution? Thank you for your help!

What’s the sensor output format? Please note v4l2src don’t support bayer format.

v4l2-ctl --list-formats-ext

Here is the output of the command.
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

[0]: 'AB24' (32-bit RGBA 8-8-8-8)
	Size: Discrete 1920x1080
		Interval: Discrete 0.017s (60.000 fps)
	Size: Discrete 3840x2160
		Interval: Discrete 0.017s (60.000 fps)
	Size: Discrete 1280x720
		Interval: Discrete 0.017s (60.000 fps)

Additionally, what is bayer format? Are there any resources that I could use to learn more?

Please check below command.

gst-launch-1.0 v4l2src ! "video/x-raw,width=1920,height=1080" ! videoconvert ! fpsdisplaysink video-sink=fakesink text-overlay=false sync=false -v

I received this as my output:
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = false
Setting pipeline to PLAYING …
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.001270727
Setting pipeline to NULL …
Freeing pipeline …

I seem to get the same internal data stream error for most commands I enter. Could it be a setup issue when I flashed Jetson?

Do you verify the sensor driver and HW by v4l2-ctl?

This is the output of v4l2-ctl: v4l2-ctl --device=/dev/video0 --all

Driver Info:
	Driver name      : tegra-video
	Card type        : vi-output, lt6911uxc 2-002b
	Bus info         : platform:tegra-capture-vi:0
	Driver version   : 5.10.216
	Capabilities     : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : tegra-camrtc-ca
	Model            : NVIDIA Tegra Video Input Device
	Serial           : 
	Bus info         : 
	Media version    : 5.10.216
	Hardware revision: 0x00000003 (3)
	Driver version   : 5.10.216
Interface Info:
	ID               : 0x03000008
	Type             : V4L Video
Entity Info:
	ID               : 0x00000006 (6)
	Name             : vi-output, lt6911uxc 2-002b
	Function         : V4L2 I/O
	Pad 0x01000007   : 0: Sink
	  Link 0x0200000c: from remote pad 0x1000003 of entity '13e10000.host1x:nvcsi@15a00000-': Data, Enabled
Priority: 2
Video input : 0 (Camera 0: ok)
Format Video Capture:
	Width/Height      : 1920/1080
	Pixel Format      : 'AB24' (32-bit RGBA 8-8-8-8)
	Field             : None
	Bytes per Line    : 7680
	Size Image        : 8294400
	Colorspace        : sRGB
	Transfer Function : Default (maps to sRGB)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
	Flags             : 

Camera Controls

           sensor_configuration 0x009a2032 (u32)    : min=0 max=4294967295 step=1 default=0 [22] flags=read-only, volatile, has-payload
         sensor_mode_i2c_packet 0x009a2033 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
      sensor_control_i2c_packet 0x009a2034 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
                    bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
				0: 0 (0x0)
				1: 1 (0x1)
                override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
				0: 0 (0x0)
				1: 1 (0x1)
                   height_align 0x009a2066 (int)    : min=1 max=16 step=1 default=1 value=1
                     size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
				0: 1 (0x1)
				1: 65536 (0x10000)
				2: 131072 (0x20000)
               write_isp_format 0x009a2068 (int)    : min=1 max=1 step=1 default=1 value=1
       sensor_signal_properties 0x009a2069 (u32)    : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
        sensor_image_properties 0x009a206a (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
      sensor_control_properties 0x009a206b (u32)    : min=0 max=4294967295 step=1 default=0 [30][36] flags=read-only, has-payload
              sensor_dv_timings 0x009a206c (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
               low_latency_mode 0x009a206d (bool)   : default=0 value=0
               preferred_stride 0x009a206e (int)    : min=0 max=65535 step=1 default=0 value=0
    override_capture_timeout_ms 0x009a206f (int)    : min=-1 max=2147483647 step=1 default=2500 value=2500
                   sensor_modes 0x009a2082 (int)    : min=0 max=30 step=1 default=30 value=3 flags=read-only

Please check below command.

v4l2-ctl --stream-mmap -c bypass_mode=0

There is no output and no screen pops up either.

That’s tell can’t get frame from the sensor output.
Get the trace log to check.

https://elinux.org/Jetson/l4t/Camera_BringUp

Hello, I’ve read through the link and I’m confused on what to look for or which commands to run. Would it be possible to have some pointers on what to do?

sudo modprobe rtcpu_debug   JP6 release needed
echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 2 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace

v4l2-ctl -c bypass_mode=0 --stream-mmap

cat /sys/kernel/debug/tracing/trace

I received the following error when attempting to run modprobe.

modprobe: FATAL: Module rtcpu_debug not found in directory /lib/modules/5.10.216-tegra

I verified I have the correct JP version.

JP6.x should be 5.15 instead of 5.10.
For JP5 you can ignore the modprobe command.

Hello, this was my output from the cat command.

# tracer: nop
#
# entries-in-buffer/entries-written: 86/86   #P:8
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        v4l2-ctl-6900    [000] ....  1472.890883: tegra_channel_open: vi-output, lt6911uxc 2-002b
        v4l2-ctl-6900    [000] ....  1472.904593: tegra_channel_set_power: lt6911uxc 2-002b : 0x1
        v4l2-ctl-6900    [000] ....  1472.904609: camera_common_s_power: status : 0x1
        v4l2-ctl-6900    [001] ....  1472.906272: tegra_channel_set_power: 13e10000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-6900    [001] ....  1472.906276: csi_s_power: enable : 0x1
        v4l2-ctl-6900    [001] ....  1472.906816: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 9
        v4l2-ctl-6900    [006] ....  1472.914168: tegra_channel_set_stream: enable : 0x1
        v4l2-ctl-6900    [006] ....  1472.916495: tegra_channel_set_stream: 13e10000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-6900    [006] ....  1472.916498: csi_s_stream: enable : 0x1
        v4l2-ctl-6900    [006] ....  1472.916896: tegra_channel_set_stream: lt6911uxc 2-002b : 0x1
     kworker/2:0-25      [002] ....  1472.950130: rtcpu_string: tstamp:46713153923 id:0x04010000 str:"VM0 activating."
     kworker/2:0-25      [002] ....  1472.950135: rtcpu_vinotify_event: tstamp:46713675114 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1494825282080 data:0xcd9ce50010000000
     kworker/2:0-25      [002] ....  1472.950137: rtcpu_vinotify_event: tstamp:46713675252 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1494825287584 data:0x0000000031000001
     kworker/2:0-25      [002] ....  1472.950138: rtcpu_vinotify_event: tstamp:46713675408 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1494825342240 data:0xcd9ce20010000000
     kworker/2:0-25      [002] ....  1472.950139: rtcpu_vinotify_event: tstamp:46713675540 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1494825347808 data:0x0000000031000002
 vi-output, lt69-6902    [003] ....  1475.483375: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 9
     kworker/2:0-25      [002] ....  1475.529952: rtcpu_string: tstamp:46793590272 id:0x04010000 str:"ERROR: camera-ip/vi5/vi5.c:3893 [vi5_update_chan"
     kworker/2:0-25      [002] ....  1475.529959: rtcpu_string: tstamp:46793590374 id:0x04010000 str:"nel_match_data] ""
     kworker/2:0-25      [002] ....  1475.529961: rtcpu_string: tstamp:46793590910 id:0x04010000 str:"match configuration is already in use by by chan"
     kworker/2:0-25      [002] ....  1475.529963: rtcpu_string: tstamp:46793591010 id:0x04010000 str:"nel 35 cannot set channel match configuration"
     kworker/2:0-25      [002] ....  1475.529964: rtcpu_string: tstamp:46793591164 id:0x04010000 str:""
"
     kworker/2:0-25      [002] ....  1475.530021: rtcpu_string: tstamp:46793591670 id:0x04010000 str:"ERROR: services/capture/capture-scheduler.c:3024"
     kworker/2:0-25      [002] ....  1475.530023: rtcpu_string: tstamp:46793591770 id:0x04010000 str:" [capture_scheduler_thread] ""
     kworker/2:0-25      [002] ....  1475.530025: rtcpu_string: tstamp:46793592059 id:0x04010000 str:"Error processing event 0x100003"
     kworker/2:0-25      [002] ....  1475.530026: rtcpu_string: tstamp:46793592209 id:0x04010000 str:""
"
 vi-output, lt69-6902    [003] ....  1478.043311: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 9
     kworker/2:0-25      [002] ....  1478.109835: rtcpu_vinotify_event: tstamp:46873995636 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1499954871936 data:0xcd9ce50010000000
     kworker/2:0-25      [002] ....  1478.109839: rtcpu_vinotify_event: tstamp:46873995776 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1499954887968 data:0x0000000031000001
     kworker/2:0-25      [002] ....  1478.109841: rtcpu_vinotify_event: tstamp:46873995932 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1499954931904 data:0xcd9ce20010000000
     kworker/2:0-25      [002] ....  1478.109841: rtcpu_vinotify_event: tstamp:46873996064 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1499954948160 data:0x0000000031000002
 vi-output, lt69-6902    [001] ....  1480.603203: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 9
     kworker/2:0-25      [002] ....  1480.629742: rtcpu_string: tstamp:46953583702 id:0x04010000 str:"ERROR: camera-ip/vi5/vi5.c:3893 [vi5_update_chan"
     kworker/2:0-25      [002] ....  1480.629748: rtcpu_string: tstamp:46953583805 id:0x04010000 str:"nel_match_data] ""
     kworker/2:0-25      [002] ....  1480.629750: rtcpu_string: tstamp:46953584341 id:0x04010000 str:"match configuration is already in use by by chan"
     kworker/2:0-25      [002] ....  1480.629751: rtcpu_string: tstamp:46953584442 id:0x04010000 str:"nel 35 cannot set channel match configuration"
     kworker/2:0-25      [002] ....  1480.629753: rtcpu_string: tstamp:46953584596 id:0x04010000 str:""
"
     kworker/2:0-25      [002] ....  1480.629776: rtcpu_string: tstamp:46953585103 id:0x04010000 str:"ERROR: services/capture/capture-scheduler.c:3024"
     kworker/2:0-25      [002] ....  1480.629777: rtcpu_string: tstamp:46953585203 id:0x04010000 str:" [capture_scheduler_thread] ""
     kworker/2:0-25      [002] ....  1480.629779: rtcpu_string: tstamp:46953585490 id:0x04010000 str:"Error processing event 0x100003"
     kworker/2:0-25      [002] ....  1480.629780: rtcpu_string: tstamp:46953585640 id:0x04010000 str:""
"
 vi-output, lt69-6902    [001] ....  1483.163058: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 9
     kworker/2:0-25      [002] ....  1483.205605: rtcpu_vinotify_event: tstamp:47033909358 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1505074602336 data:0xcd9ce50010000000
     kworker/2:0-25      [002] ....  1483.205638: rtcpu_vinotify_event: tstamp:47033909512 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1505074631328 data:0x0000000031000001
     kworker/2:0-25      [002] ....  1483.205640: rtcpu_vinotify_event: tstamp:47033909666 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1505074676640 data:0xcd9ce20010000000
     kworker/2:0-25      [002] ....  1483.205641: rtcpu_vinotify_event: tstamp:47033909801 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1505074692928 data:0x0000000031000002
 vi-output, lt69-6902    [001] ....  1485.723017: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 9
     kworker/2:0-25      [002] ....  1485.725799: rtcpu_string: tstamp:47113578660 id:0x04010000 str:"ERROR: camera-ip/vi5/vi5.c:3893 [vi5_update_chan"
     kworker/2:0-25      [002] ....  1485.725804: rtcpu_string: tstamp:47113578777 id:0x04010000 str:"nel_match_data] ""
     kworker/2:0-25      [002] ....  1485.725806: rtcpu_string: tstamp:47113579311 id:0x04010000 str:"match configuration is already in use by by chan"
     kworker/2:0-25      [002] ....  1485.725808: rtcpu_string: tstamp:47113579411 id:0x04010000 str:"nel 35 cannot set channel match configuration"
     kworker/2:0-25      [002] ....  1485.725809: rtcpu_string: tstamp:47113579565 id:0x04010000 str:""
"
     kworker/2:0-25      [002] ....  1485.725828: rtcpu_string: tstamp:47113580072 id:0x04010000 str:"ERROR: services/capture/capture-scheduler.c:3024"
     kworker/2:0-25      [002] ....  1485.725829: rtcpu_string: tstamp:47113580172 id:0x04010000 str:" [capture_scheduler_thread] ""
     kworker/2:0-25      [002] ....  1485.725831: rtcpu_string: tstamp:47113580457 id:0x04010000 str:"Error processing event 0x100003"
     kworker/2:0-25      [002] ....  1485.725832: rtcpu_string: tstamp:47113580609 id:0x04010000 str:""
"
 vi-output, lt69-6902    [001] ....  1488.282841: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 9
     kworker/2:0-25      [002] ....  1488.301349: rtcpu_vinotify_event: tstamp:47193579910 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1510194416416 data:0xcd9ce50010000000
     kworker/2:0-25      [002] ....  1488.301352: rtcpu_vinotify_event: tstamp:47193580051 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1510194443648 data:0x0000000031000001
     kworker/2:0-25      [002] ....  1488.301354: rtcpu_vinotify_event: tstamp:47193580207 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1510194490688 data:0xcd9ce20010000000
     kworker/2:0-25      [002] ....  1488.301355: rtcpu_vinotify_event: tstamp:47193580341 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1510194507008 data:0x0000000031000002
 vi-output, lt69-6902    [001] ....  1490.842637: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 9
     kworker/2:0-25      [002] ....  1490.881217: rtcpu_vinotify_event: tstamp:47274024044 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x22 frame:0 vi_tstamp:1512768674272 data:0xcd9cdf0010000000
     kworker/2:0-25      [002] ....  1490.881221: rtcpu_vinotify_event: tstamp:47274024201 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x22 frame:0 vi_tstamp:1512768690304 data:0x0000000031000001
     kworker/2:0-25      [002] ....  1490.881222: rtcpu_vinotify_event: tstamp:47274024358 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x22 frame:0 vi_tstamp:1512768697248 data:0xcd9cdc0010000000
     kworker/2:0-25      [002] ....  1490.881222: rtcpu_vinotify_event: tstamp:47274430876 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x22 frame:0 vi_tstamp:1512768777632 data:0x0000000031000002
 vi-output, lt69-6902    [000] ....  1493.402635: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 9
     kworker/2:0-25      [002] ....  1493.457081: rtcpu_string: tstamp:47353567243 id:0x04010000 str:"ERROR: camera-ip/vi5/vi5.c:3893 [vi5_update_chan"
     kworker/2:0-25      [002] ....  1493.457085: rtcpu_string: tstamp:47353567347 id:0x04010000 str:"nel_match_data] ""
     kworker/2:0-25      [002] ....  1493.457086: rtcpu_string: tstamp:47353567882 id:0x04010000 str:"match configuration is already in use by by chan"
     kworker/2:0-25      [002] ....  1493.457087: rtcpu_string: tstamp:47353567983 id:0x04010000 str:"nel 34 cannot set channel match configuration"
     kworker/2:0-25      [002] ....  1493.457088: rtcpu_string: tstamp:47353568138 id:0x04010000 str:""
"
     kworker/2:0-25      [002] ....  1493.457104: rtcpu_string: tstamp:47353568645 id:0x04010000 str:"ERROR: services/capture/capture-scheduler.c:3024"
     kworker/2:0-25      [002] ....  1493.457105: rtcpu_string: tstamp:47353568746 id:0x04010000 str:" [capture_scheduler_thread] ""
     kworker/2:0-25      [002] ....  1493.457105: rtcpu_string: tstamp:47353569032 id:0x04010000 str:"Error processing event 0x100003"
     kworker/2:0-25      [002] ....  1493.457106: rtcpu_string: tstamp:47353569184 id:0x04010000 str:""
"
        v4l2-ctl-6900    [003] ....  1493.861180: tegra_channel_close: vi-output, lt6911uxc 2-002b
 vi-output, lt69-6902    [000] ....  1495.962287: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 9
        v4l2-ctl-6900    [003] ....  1495.962663: tegra_channel_set_stream: enable : 0x0
        v4l2-ctl-6900    [003] ....  1495.962666: tegra_channel_set_stream: lt6911uxc 2-002b : 0x0
        v4l2-ctl-6900    [003] ....  1495.962690: tegra_channel_set_stream: 13e10000.host1x:nvcsi@15a00000- : 0x0
        v4l2-ctl-6900    [003] ....  1495.962692: csi_s_stream: enable : 0x0
        v4l2-ctl-6900    [005] ....  1495.965732: tegra_channel_set_power: lt6911uxc 2-002b : 0x0
        v4l2-ctl-6900    [005] ....  1495.965749: camera_common_s_power: status : 0x0
        v4l2-ctl-6900    [005] ....  1495.966233: tegra_channel_set_power: 13e10000.host1x:nvcsi@15a00000- : 0x0
        v4l2-ctl-6900    [005] ....  1495.966236: csi_s_power: enable : 0x0
     kworker/2:0-25      [002] ....  1502.268680: rtcpu_string: tstamp:47629171116 id:0x04010000 str:"VM0 deactivating."

What’s your BSP version?

cat /etc/nv_tegra_release

# R35 (release), REVISION: 6.0, GCID: 37391689, BOARD: t186ref, EABI: aarch64, DATE: Wed Aug 28 09:12:27 UTC 2024

Apply this kernel patch to try.

0001-camera-oot-use-reg-number-as-channel-id.patch (3.7 KB)

Hi, would you have any recommendations on how to do the kernel patch? I’ve been reading some documentations but I’m not sure where to start.

Check below link to down the kernel source then apply the patch to build the kernel Image.

https://docs.nvidia.com/jetson/archives/r35.1/DeveloperGuide/text/SD/Kernel.html