Imx477 csi camera with jetson xavier nx

Hello ,

I am using Jetson xavier nx with custom carrier board. (Custom carrier board is same as the jetson xavier nx developer kit). I am using the Arducam imx477 Csi camera with the jetson.

Jetson is production module. It is flashed with jetpack 5.1.2.
I have previously modified the Linux_for_Tegra/kernel.dtb/tegra194-p3668-0001-p3509-0000.dtb ,file for using the arducam imx 477, and i was successfull in streaming the csi camera using gstraemer, nvgstcapture-1.0.

the device is recognised /dev/video0, and also I2Cdetect is fine.
I am facing this issue.

nvidia@ubuntu:~$ nvgstcapture-1.0
Encoder null, cannot set bitrate!
Encoder Profile = High
Supported resolutions in case of ARGUS Camera
  (2) : 640x480
  (3) : 1280x720
  (4) : 1920x1080
  (5) : 2104x1560
  (6) : 2592x1944
  (7) : 2616x1472
  (8) : 3840x2160
  (9) : 3896x2192
  (10): 4208x3120
  (11): 5632x3168
  (12): 5632x4224

Runtime ARGUS Camera Commands:

  Help : 'h'
  Quit : 'q'
  Set Capture Mode:
      mo:<val>
          (1): image
          (2): video
  Get Capture Mode:
      gmo
  Set sensor orientation:
      so:<val>
          (0): none
          (1): Rotate counter-clockwise 90 degrees
          (2): Rotate 180 degrees
          (3): Rotate clockwise 90 degrees
  Get sensor orientation:
      gso
  Set sensor mode:
      smo:<val> e.g., smo:1
  Get sensor mode:
      gsmo
  Set Whitebalance Mode:
      wb:<val>
          (0): off
          (1): auto
          (2): incandescent
          (3): fluorescent
          (4): warm-fluorescent
          (5): daylight
          (6): cloudy-daylight
          (7): twilight
          (8): shade
          (9): manual
  Get Whitebalance Mode:
      gwb
  Set Saturation (0 to 2):
      st:<val> e.g., st:1.25
  Get Saturation:
      gst
  Set Exposure Compensation (-2 to 2):
      ec:<val> e.g., ec:-2
  Get Exposure Compensation:
      gec
  Set Auto Whitebalance Lock:
      awbl:<val> e.g., awbl:0
  Get Auto Whitebalance Lock:
      awbl
  Set Auto Exposure Lock:
      ael:<val> e.g., ael:0
  Get Auto Exposure Lock:
      gael
  Set TNR Mode:
      tnrm:<val> e.g., tnrm:1
          (0): OFF
          (1): FAST
          (2): HIGH QUALITY
  Get TNR Mode:
      gtnrm
  Set TNR Strength (-1 to 1):
      tnrs:<val> e.g., tnrs:0.5
  Get TNR Strength:
      gtnrs
  Set EE Mode:
      eem:<val> e.g., eem:1
          (0): OFF
          (1): FAST
          (2): HIGH QUALITY
  Get EE Mode:
      geem
  Set EE Strength (-1 to 1):
      ees:<val> e.g., ees:0.5
  Get EE Strength:
      gees
  Set Auto Exposure Anti-Banding (0 to 3):
      aeab:<val> e.g., aeab:2
          (0): OFF
          (1): MODE AUTO
          (2): MODE 50HZ
          (3): MODE 60HZ
  Get Auto Exposure Anti-Banding:
      gaeab
  Set Gain Range:
      gr:<val><space><val> e.g., gr:1 16
  Get Gain Range:
      ggr
  Set Exposure Time Range:
      etr:<val><space><val> e.g., etr:34000 35000
  Get Exposure Time Range:
      getr
  Set ISP Digital Gain Range:
      dgr:<val><space><val> e.g., dgr:2 152
  Get ISP Digital Gain Range:
      gdgr
  Capture: enter 'j' OR
           followed by a timer (e.g., jx5000, capture after 5 seconds) OR
           followed by multishot count (e.g., j:6, capture 6 images)
           timer/multihot values are optional, capture defaults to single shot with timer=0s
  Start Recording : enter '1'
  Stop Recording  : enter '0'
  Video snapshot  : enter '2' (While recording video)
  Get Preview Resolution:
      gpcr
  Get Image Capture Resolution:
      gicr
  Get Video Capture Resolution:
      gvcr


Runtime encoder configuration options:

  Set Encoding Bit-rate(in bytes):
      br:<val> e.g., br:4000000
  Get Encoding Bit-rate(in bytes):
      gbr
  Set Encoding Profile(only for H.264):
      ep:<val> e.g., ep:1
          (0): Baseline
          (1): Main
          (2): High
  Get Encoding Profile(only for H.264):
      gep
  Force IDR Frame on video Encoder(only for H.264):
      Enter 'f' 



** (nvgstcapture-1.0:12171): ERROR **: 15:21:28.347: <create_csi_cap_bin:2185> Element nvarguscamerasrc creation failed 

Trace/breakpoint trap (core dumped)

The camera is detected in every aspect

nvidia@ubuntu:~$ sudo media-ctl -p -d /dev/media0 ? media_ctl.txt
Media controller API version 5.10.120

Media device information
------------------------
driver          tegra-camrtc-ca
model           NVIDIA Tegra Video Input Device
serial          
bus info        
hw revision     0x3
driver version  5.10.120
Device topology
- entity 1: 13e10000.host1x:nvcsi@15a00000- (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
	pad0: Sink
		<- "imx477 2-001a":0 [ENABLED]
	pad1: Source
		-> "vi-output, imx477 2-001a":0 [ENABLED]

- entity 4: imx477 2-001a (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev1
	pad0: Source
		[fmt:SRGGB10_1X10/3840x2160 field:none colorspace:srgb]
		-> "13e10000.host1x:nvcsi@15a00000-":0 [ENABLED]

- entity 6: vi-output, imx477 2-001a (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
	pad0: Sink
		<- "13e10000.host1x:nvcsi@15a00000-":1 [ENABLED]

nvidia@ubuntu:~$  ls /dev/video*
/dev/video0
nvidia@ubuntu:~$ sudo dmesg | grep -i video
[    0.000000] Kernel command line: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=efifb:off nospectre_bhb nv-auto-config 
[    0.411676] videodev: Linux video capture interface: v2.00


[    0.410959] SCSI subsystem initialized
[    1.113796] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 239)
[    3.214391] vdd-csi-1v2: supplied by vdd-1v8-ls
[    7.163861] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: context isolation disabled due to no IOMMU
[    7.168774] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: initialized
[    7.174597] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e10000.host1x:nvcsi@15a00000- bound
nvidia@ubuntu:~$  ls /dev/video*
/dev/video0

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

vi-output, imx477 2-001a (platform:tegra-capture-vi:0):
	/dev/video0
nvidia@ubuntu:~$ sudo journalctl -u nvargus-daemon
-- Logs begin at Wed 2023-03-15 20:34:16 IST, end at Mon 2025-05-12 15:30:30 IST. --
May 12 15:05:33 ubuntu systemd[1]: Started Argus daemon.
May 12 15:30:23 ubuntu systemd[1]: Stopping Argus daemon...
May 12 15:30:23 ubuntu nvargus-daemon[8220]: === NVIDIA Libargus Camera Service (0.99.33)=== Listeni>
May 12 15:30:23 ubuntu systemd[1]: nvargus-daemon.service: Succeeded.
May 12 15:30:23 ubuntu systemd[1]: Stopped Argus daemon.
May 12 15:30:23 ubuntu systemd[1]: Started Argus daemon.

The flashed dtb was already used for streaming the csi camera back then. but now with the same files it is not working.(I am flashing with the same hostpc, same files).

Need your help in resolving this.
Thank you

Please confirm by below command.

export DISPLAY=:0
gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1" ! nvvidconv ! xvimagesink sync=false

This is the command output

nvidia@ubuntu:~$ export DISPLAY=:0
nvidia@ubuntu:~$ gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1" ! nvvidconv ! xvimagesink sync=false
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keynvbufsurftransform: Could not get EGL display connection
Setting pipeline to PAUSED ...
Invalid MIT-MAGIC-COOKIE-1 keyERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1773): gst_xv_image_sink_open (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Could not open display (null)
Setting pipeline to NULL ...
Freeing pipeline ...

Don’t you have connect HDMI display?
Check below command.

xinit&
export DISPLAY=:0
gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1" ! nvvidconv ! xvimagesink sync=false

Hello the, the HDMI display was connected and i had typed the commands on the terminal directly.

Can you help with knowing the current responisble dtb for the current boot other than the below method.I did check with the extlinux.conf file, but it doesnot have the .dtb (FDT entry Line)

nvidia@ubuntu:~/Downloads$ sudo cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/arducam/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=efifb:off nospectre_bhb nv-auto-config 


# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
#      sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot

# LABEL backup
#    MENU LABEL backup kernel
#    LINUX /boot/Image.backup
#    INITRD /boot/initrd

Even if i uncomment the last set of lines and add the dtb entry in the above file after the reflash the exlinux.conf file reloading same as above.
because when i try to install the arducam driver for the above camera it says no DTB found.

Traceback (most recent call last):
  File "/opt/arducam/jetson-io/config-by-hardware.py", line 125, in <module>
    main()
  File "/opt/arducam/jetson-io/config-by-hardware.py", line 94, in main
    jetson = board.Board()
  File "/opt/arducam/jetson-io/Jetson/board.py", line 230, in _init_
    self.dtb = _board_get_dtb(self.compat, self.model, dtbdir)
  File "/opt/arducam/jetson-io/Jetson/board.py", line 114, in _board_get_dtb
    raise RuntimeError("No DTB found for %s!" % model)
RuntimeError: No DTB found for NVIDIA Jetson Xavier NX Developer Kit!

I use SOM production module p3668-0001 with custom carrier board.

Maybe check with arducam.

Thanks

I checked with the arducam team, they said to check with the cam , cam is working.

can you help with this part?

“Can you help with knowing the current responisble dtb for the current boot other than the below method.I did check with the extlinux.conf file, but it doesnot have the .dtb (FDT entry Line)”

Thanks

You can add the FDT manually to assign your dtb.
Or you can run the jetson-io to generate it then edit it again.

Thanks for the response.

As i mentioned previously , even if i edit the extlinux.conf file and add the FDT manually after the boot i should be able to see the FDT entry line in the extlinux.conf, But here in my case the exlinux.conf file is getting reloaded and changing same as previously i.e without FDT entry.

With resepct to running the jetson-io to generate, i cannot run that as i am not on the developer kit, it is custom carrier board.

What’s the storage? EMMC or SSD?

EMMC (production module has 16gb emmc hence i am using the same)

Do you mean you modify something to the exlinux.conf but has no effect?

yes.

When i flashed the board first time with normal procedure using sdk manager ( i replaced the .dtb of own with the exisiting one), i checked the exlinux.conf to look for the responsible dtb for that boot. since there was no entry of .dtb (FDT line) i added the FDT entry manually with .dtb file path and rebooted. then i did affect.

Could you add something else to the kernel cmdline in the extlinux.conf and see if it makes any effect to the dmesg?

Hello, @WayneWWW Now i added my .dtb line via FDT againa and after the reboot. the extlinux.conf was having the FDT line.

but in the dmesg if i check dmesg, also i have attached entire dmesg.

nvidia@ubuntu:~$ sudo dmesg | grep -i dtb
[    0.008287] DTB Build time: <unknown>
nvidia@ubuntu:~$ sudo find /boot -name '*.dtb' -exec grep -l 'p3668-0001' {} \;
/boot/tegra194-p3668-0001-p3509-0000.dtb
/boot/dtb/tegra194-p3668-0001-p3509-0000.dtb
/boot/dtb/kernel_tegra194-p3668-0001-p3509-0000.dtb
/boot/kernel_tegra194-p3668-0001-p3509-0000.dtb
/boot/tegra194-p3668-all-p3509-0000.dtb
/boot/arducam/dts/tegra194-p3668-0001-p3509-0000.dtb
/boot/arducam/dts/tegra194-p3668-all-p3509-0000.dtb
/boot/arducam/dts/tegra194-p2888-as-p3668-p2822-0000.dtb

dmesgLogs (1).txt (70.8 KB)

Hello @ShaneCCC

nvidia@ubuntu:~$ xinit& export DISPLAY=:0 
[1] 4558
nvidia@ubuntu:~$ 
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
(EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
nvidia@ubuntu:~$ gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1" ! nvvidconv ! xvimagesink sync=false
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keynvbufsurftransform: Could not get EGL display connection
Setting pipeline to PAUSED ...
Invalid MIT-MAGIC-COOKIE-1 keyERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1773): gst_xv_image_sink_open (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Could not open display (null)
Setting pipeline to NULL ...
Freeing pipeline ...

Issue is resolved thanks for the help.
We found out that the pin inside the carrier board is not functioning properly which was unable to get the data from the csi camera. So it was a hardware problem.