Hello,
We are working on a Xavier NX based product that uses a custom baseboard. We started off using a yocto distribution based on OE4T’s L4T 35.1 branch with a modified device tree that was able to detect and capture video from our Raspberry Pi IMX477 cameras attached to the baseboard. We are also able to use these same cameras with our dev kits running JetPack 5.1, although this requires removing the resistor as documented here.
We have decided we want to explore using JetPack with our custom baseboard rather than the Yocto based custom distribution. This is because of NVIDIA’s growing support for A/B OTA updates, parity between our dev kits and production modules, faster and more predictable release cycles, and more. However, to do so we need to get our custom device tree working with JetPack 5.1.
I was able to replace the device tree on my JetPack device (this is the Xavier NX module inserted in our custom baseboard) with the .dtb file from our Yocto image. After rebooting with the new device tree, the cameras attached to the baseboard properly show up with v4l2-ctl
. The output here is the same between JetPack and our working Yocto image.
jetpack@jetpack-desktop:~$ v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
/dev/media0
vi-output, imx477 32-001a (platform:tegra-capture-vi:0):
/dev/video1
vi-output, imx477 31-001a (platform:tegra-capture-vi:2):
/dev/video0
However, things go wrong when we attempt to actually capture video from the cameras:
jetpack@jetpack-desktop:~$ gst-launch-1.0 -e nvarguscamerasrc sensor-id=0 ! nvvidconv ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=test_cam1_full.mp4
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available
Redistribute latency...
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
Got EOS from element "pipeline0".
Execution ended after 0:00:00.012964764
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
(Argus) Error EndOfFile: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 266)
(Argus) Error EndOfFile: Receive worker failure, notifying 1 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 339)
(Argus) Error InvalidState: Argus client is exiting with 1 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 355)
(Argus) Error EndOfFile: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 368)
(Argus) Error EndOfFile: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error EndOfFile: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
Here’s the corresponding dmesg
output:
[ 902.279011] CPU: 3 PID: 2438 Comm: nvargus-daemon Tainted: G W O 5.10.104-tegra #1
[ 902.279016] Hardware name: Unknown NVIDIA Jetson Xavier NX Developer Kit/NVIDIA Jetson Xavier NX Developer Kit, BIOS 1.0-d7fb19b 08/10/2022
[ 902.279027] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--)
[ 902.279034] pc : tegra_capture_ivc_register_control_cb+0x180/0x1d0
[ 902.279040] lr : tegra_capture_ivc_register_control_cb+0x28/0x1d0
[ 902.279043] sp : ffff80001069bb30
[ 902.279048] x29: ffff80001069bb30 x28: ffff4be05980c000
[ 902.279059] x27: ffff4be0634ab2a8 x26: ffff4be05980c098
[ 902.279068] x25: ffff4be05980c020 x24: ffff4be05980c000
[ 902.279078] x23: ffff80001069bbec x22: ffffc6093d2a8420
[ 902.279087] x21: ffff80001069bd40 x20: 0000000000000000
[ 902.279100] x19: 0000000000000000 x18: 0000000000000000
[ 902.279110] x17: 000000000001ffd4 x16: ffffc6093d7a3050
[ 902.279119] x15: ffffff2f7ce00000 x14: 0000000000001000
[ 902.279129] x13: ffff4be1bf131000 x12: ffff80001a38f000
[ 902.279139] x11: 0000000000000000 x10: ffff85d881e4b000
[ 902.279148] x9 : 00000000fffffffe x8 : ffff4be06d5d018f
[ 902.279158] x7 : 000000000000000e x6 : 00000006b89b0970
[ 902.279168] x5 : ffffc6093cd07b70 x4 : ffff80001069bb74
[ 902.279177] x3 : ffff80001069bb70 x2 : ffffc6093c76e090
[ 902.279187] x1 : ffff80001069bbec x0 : ffffc6093e6c5000
[ 902.279196] Call trace:
[ 902.279203] tegra_capture_ivc_register_control_cb+0x180/0x1d0
[ 902.279210] isp_capture_setup+0x220/0x5c0
[ 902.279215] isp_channel_ioctl+0x240/0x560
[ 902.279225] __arm64_sys_ioctl+0xac/0xf0
[ 902.279233] el0_svc_common.constprop.0+0x80/0x1d0
[ 902.279239] do_el0_svc+0x38/0xb0
[ 902.279248] el0_svc+0x1c/0x30
[ 902.279254] el0_sync_handler+0xa8/0xb0
[ 902.279259] el0_sync+0x16c/0x180
[ 902.279283] ---[ end trace a9961e65edc58d5f ]---
[ 902.279401] tegra194-isp5 13e10000.host1x:isp@14800000: failed to register control callback
[ 902.279649] tegra194-isp5 13e10000.host1x:isp@14800000: isp capture setup failed
[ 902.339317] falcon 154c0000.nvenc: Direct firmware load for nvhost_nvenc070.fw failed with error -2
[ 902.339575] falcon 154c0000.nvenc: Falling back to sysfs fallback for: nvhost_nvenc070.fw
[ 902.345635] falcon 154c0000.nvenc: looking for firmware in subdirectory
[ 902.410427] falcon 15a80000.nvenc1: Direct firmware load for nvhost_nvenc070.fw failed with error -2
[ 902.410673] falcon 15a80000.nvenc1: Falling back to sysfs fallback for: nvhost_nvenc070.fw
[ 902.413301] falcon 15a80000.nvenc1: looking for firmware in subdirectory
And the nvargus-daemon
logs:
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: Module_id 30 Severity 2 : isp capture setup ioctl failed: 19
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: === NVIDIA Libargus Camera Service (0.98.3)=== Listening for connections...=== gst-launch-1.0[2436]: Connection established (FFFFADA15900)SCF: Error IoctlFailed: (propagating from src/services/capture/FusaCaptureIspHw.cpp, function openIspHw(), line 239)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: SCF: Error IoctlFailed: (propagating from src/services/capture/CaptureServiceDeviceIsp.cpp, function open(), line 188)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: SCF: Error IoctlFailed: (propagating from src/services/capture/CaptureServiceDevice.cpp, function initialize(), line 302)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: SCF: Error InvalidState: Isp is not opened (in src/services/capture/CaptureServiceDeviceIsp.cpp, function close(), line 201)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: SCF: Error IoctlFailed: (propagating from src/services/capture/CaptureService.cpp, function startService(), line 608)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: SCF: Error InvalidState: Queue mutex not initialized (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamerautils/inc/QueueImpl.h, function dequeue(), line 227)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: SCF: Error IoctlFailed: (propagating from src/components/ServiceHost.cpp, function startServices(), line 123)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: SCF: Error InvalidState: (in src/services/capture/CaptureService.cpp, function stopService(), line 645)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: SCF: Error InvalidState: (propagating from src/components/ServiceHost.cpp, function stopServicesInternal(), line 200)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: SCF: Error IoctlFailed: (propagating from src/api/CameraDriver.cpp, function initialize(), line 178)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: SCF: Error InvalidState: Services are already stopped (in src/components/ServiceHost.cpp, function stopServicesInternal(), line 193)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: Module_id 30 Severity 2 : (fusa) Error: IoctlFailed ioctl failed. in:/capture/src/fusaIspChannelLinux.cpp 160
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: SCF: Error IoctlFailed: (propagating from src/api/CameraDriver.cpp, function getCameraDriver(), line 119)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: (Argus) Error IoctlFailed: (propagating from src/api/GlobalProcessState.cpp, function createCameraProvider(), line 210)
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: Module_id 30 Severity 2 : (fusa) Error: IoctlFailed propagating from:/capture/src/fusaIspHandler.cpp 71
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: Module_id 30 Severity 2 : isp capture release ioctl failed: 9
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: Module_id 30 Severity 2 : (fusa) Error: IoctlFailed ioctl failed. in:/capture/src/fusaIspChannelLinux.cpp 216
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: Module_id 30 Severity 2 : (fusa) Error: IoctlFailed propagating from:/capture/src/fusaIspHandler.cpp 130
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: Module_id 30 Severity 2 : (fusa) Error: IoctlFailed propagating from:/capture/src/fusaIspHandler.cpp 93
Mar 23 17:12:38 jetpack-desktop nvargus-daemon[904]: Module_id 30 Severity 2 : (fusa) Error: IoctlFailed propagating from:/capture/src/core.cpp 108
Mar 23 17:12:39 jetpack-desktop nvargus-daemon[904]: === gst-launch-1.0[2436]: CameraProvider initialized (0xffffa8039dc0)=== gst-launch-1.0[2436]: CameraProvider destroyed (0xffffa8039dc0)
Mar 23 17:12:39 jetpack-desktop systemd[1]: nvargus-daemon.service: Main process exited, code=killed, status=11/SEGV
Mar 23 17:12:39 jetpack-desktop systemd[1]: nvargus-daemon.service: Failed with result 'signal'.
Mar 23 17:12:39 jetpack-desktop systemd[1]: nvargus-daemon.service: Scheduled restart job, restart counter is at 1.
Mar 23 17:12:39 jetpack-desktop systemd[1]: Stopped Argus daemon.
Mar 23 17:12:39 jetpack-desktop systemd[1]: Started Argus daemo
And media-ctl
:
Media controller API version 5.10.104
Media device information
------------------------
driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 5.10.104
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 32-001a":0 [ENABLED]
pad1: Source
-> "vi-output, imx477 32-001a":0 [ENABLED]
- entity 4: 13e10000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
<- "imx477 31-001a":0 [ENABLED]
pad1: Source
-> "vi-output, imx477 31-001a":0 [ENABLED]
- entity 7: 13e10000.host1x:nvcsi@15a00000- (2 pads, 0 link)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev2
pad0: Sink
pad1: Source
- entity 10: imx477 31-001a (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev3
pad0: Source
[fmt:SRGGB10_1X10/3840x2160 field:none colorspace:srgb]
-> "13e10000.host1x:nvcsi@15a00000-":0 [ENABLED]
- entity 12: vi-output, imx477 31-001a (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "13e10000.host1x:nvcsi@15a00000-":1 [ENABLED]
- entity 28: imx477 32-001a (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev4
pad0: Source
[fmt:SRGGB10_1X10/3840x2160 field:none colorspace:srgb]
-> "13e10000.host1x:nvcsi@15a00000-":0 [ENABLED]
- entity 30: vi-output, imx477 32-001a (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video1
pad0: Sink
<- "13e10000.host1x:nvcsi@15a00000-":1 [ENABLED]
My core confusion here comes from the different behavior between JetPack and OE4T when using the same underlying L4T version, the same baseboard, and the same device tree. Shouldn’t the sensor → CSI → VI pipelines behave the same? Clearly there is some misunderstanding on my part but I am not quite sure where it lays. Is it entirely wrong to try to use the same device tree across OE4T and JetPack? If so, what should my starting point be? As far as I can tell both use the same source jakku
device tree for the Xavier NX devkit.
Any pointers as to where to further debug this or what might be causing the errors would be greatly appreciated.