IMX477 Camera NvBufSurfaceFromFd Failed on Custom Carrier Board - JetPack 6 R36.5.0

Hardware:

  • Board: AI-EDGE ORIN custom carrier (ES-0083 V1.0)
  • Module: Jetson Orin Nano

Exact version confirmed:

  • JetPack: 6.2.2 (nvidia-jetpack 6.2.2+b24)
  • L4T: R36.5.0
  • Kernel: 5.15.185-tegra
  • Camera: RPi HQ Camera IMX477 on CAM2 (J13)
  • DTBO: tegra234-p3767-camera-p3768-imx477-C.dtbo

Current Status:

  • /dev/video0 exists
  • imx477 subdev bound successfully
  • Sensor modes detected (1080p@60, 4K@30)
  • Capture FAILS with 0 byte file

I FLASHED OFFICIAL JETPACK PACKAGES (Default DTBO for official Board) and I am thinking this is wrong DTBO is this correct?. (This problem will come due to the wrong DTBO ??)

Error 1 - Capture fails:
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
NvBufSurfaceFromFd Failed
gstnvarguscamerasrc.cpp threadExecute:760

Error 2 - Argus daemon:
PIX_SHORT corr_err notifyBits: 0x120000
EMB_SHORT corr_err notifyBits: 0x120000
FALCON_ERROR 0x00000e
SCF: Error ResourceError: Error 15
waitCsiFrameEnd() failed line 664

Error 3 - dmesg:
i2c-mux-gpio: 2 port mux on 3180000.i2c adapter
imx477 9-001a: tegracam sensor driver:imx477_v2.0.6
tegra-camrtc-capture-vi: subdev imx477 9-001a bound

GStreamer pipeline:
gst-launch-1.0 nvarguscamerasrc num-buffers=1
sensor-id=0 ! nvvidconv !
‘video/x-raw, format=I420’ !
jpegenc ! filesink location=/home/parkzap/test.jpg

Current DTBO settings:
tegra_sinterface = “serial_c”
port-index = 2
bus-width = 2
lane_polarity = “6”
mclk_khz = “24000”
reset-gpios = <0xf3 0xa0 0x00>
mux-gpios = <0x105 0x13 0x00>
i2c-parent = <0x222>

Board CSI mapping (from schematic):
CAM2 J13 uses CSI2+CSI3 lanes
I2C mux: GPIO PCC.03 (gpio-331)
PWDN: buffer U18 SN74LV1T125DBVR
MCLK: SODIMM pin 122
Reset: PH.06 (gpio-397)

Additional findings:

  1. VI Tracing: entries 0/0 - no events captured
  2. IVC modules all loaded correctly:
    • capture_ivc ✅
    • tegra_camera_rtcpu ✅
    • ivc_bus ✅
    • nvhost_capture ✅
  3. Clock boost did not fix the issue
  4. “ivc channel driver missing” messages
    appear to be normal on JetPack 6

The issue appears to be IMX477 specific
on JetPack 6 R36.5 with custom carrier board.

Question:

Is there a known issue with
NvBufSurfaceFromFd Failed specifically
with IMX477 on JetPack 6 R36.5?

CRITICAL NEW FINDING:

argus_log.txt (485.0 KB)

dmesg_full.txt (58.5 KB)

extlinux.txt (973 Bytes)

live_dtree.txt (29.8 KB)

VI engine timing out - no CSI data received:

tegra-camrtc-capture-vi: uncorr_err:
request timed out after 2500 ms

This confirms the sensor is NOT sending
CSI data to the VI engine.

v4l2-ctl with bypass_mode=0 also fails
with same timeout.

Both nvarguscamerasrc AND v4l2-ctl fail.
This is NOT an Argus/software issue.
This is a CSI data path issue.

Questions:

  1. Could wrong tegra_sinterface cause
    VI timeout? We use serial_c for CAM2.
  2. How to verify MCLK is reaching sensor?
  3. How to verify sensor is entering
    streaming mode on JetPack 6?

What we fixed:

  1. DTBO broken phandles (0xffffffff) - fixed
  2. lane_polarity 0 to 6 - reduces PIX_SHORT
  3. duplicate channel-0 - fixed

What still fails:

  1. NvBufSurfaceFromFd Failed
  2. Camera on bus 9 instead of bus 10
  3. PIX_SHORT/EMB_SHORT errors

Questions:

  1. Is NvBufSurfaceFromFd caused by wrong CSI config?
  2. Correct lane_polarity for custom board IMX477?
  3. Why camera on bus 9 instead of bus 10?
  4. How to create correct DTBO for custom carrier board?
  5. Is serial_c correct for CAM2 on Orin Nano?

Thank you

The lane_polarity should be 0 for CSI-C

parkzap@jetson:~$ sudo dtc -I dtb -O dts
/boot/tegra234-p3767-camera-p3768-imx477-C-fixed.dtbo
2>/dev/null | grep -i “embedded|line_length|lane_polarity|port-index|sinterface”
port-index = <0x02>;
port-index = <0x02>;
tegra_sinterface = “serial_c”;
lane_polarity = “0”;
line_length = “11200”;
embedded_metadata_height = “2”;
tegra_sinterface = “serial_c”;
lane_polarity = “0”;
line_length = “7000”;
embedded_metadata_height = “2”;
port-index = <0x02>;
parkzap@jetson:~$

After changed the lane polarity 6 to 0. I am getting error “Invalid settings”

see the logs (output)

parkzap@jetson:~$ ls /dev/video*
/dev/video0
parkzap@jetson:~$ gst-launch-1.0 nvarguscamerasrc num-buffers=1 !
‘video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12’ !
nvvidconv ! nvjpegenc !
filesink location=/home/parkzap/test.jpg &&
ls -lh /home/parkzap/test.jpg
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 1
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 59.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: INVALID_SETTINGS
Additional debug info:
Argus Correctable Error Status
Execution ended after 0:00:00.733138889
Setting pipeline to NULL …
GST_ARGUS: Cleaning up
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: INVALID_SETTINGS
Additional debug info:
Argus Correctable Error Status
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline …
parkzap@jetson:~$

check daemon logs also

parkzap@jetson:~$ sudo journalctl -u nvargus-daemon --no-pager -n 15 |
grep -i “error|fault|embed|line|pixel|timeout” | tail -10
[sudo] password for parkzap:
Apr 20 09:20:12 jetson nvargus-daemon[846]: Module_id 30 Severity 2 : FuSaCaptureViErrorDecode VI Error in frame: 0
Apr 20 09:20:12 jetson nvargus-daemon[846]: Module_id 30 Severity 2 : FALCON_ERROR 0x00000e
Apr 20 09:20:12 jetson nvargus-daemon[846]: SCF: Error ResourceError: Error 15 Received for sensor 0 ..!
Apr 20 09:20:12 jetson nvargus-daemon[846]: (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 664)
Apr 20 09:20:12 jetson nvargus-daemon[846]: Module_id 30 Severity 5 : ChanselFault 0x002000
Apr 20 09:20:12 jetson nvargus-daemon[846]: Module_id 30 Severity 5 : Current line in frame
Apr 20 09:20:12 jetson nvargus-daemon[846]: Module_id 30 Severity 2 : EMBED_LONG_LINE: An embedded line is found to exceed the expected value of EMBED_X_MAX_BYTES register. Line is truncated to expected width.
parkzap@jetson:~$

Get the trace log.

modprobe rtcpu_debug

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 3 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace

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

cat /sys/kernel/debug/tracing/trace

Hi ShaneCCC,

Thank you for your response.
Please find the trace log attached.

i flashed the jetpack so i have default DTBO file only!. is this i have to create a custom DTBO file for my custom carrier board!!???

Current status:

  • lane_polarity = “0” applied ✅
  • VI timeout fixed ✅
  • Now getting EMBED_LONG_LINE error
  • Capture still fails with INVALID_SETTINGS

Trace log collected while running:
v4l2-ctl --stream-mmap -c bypass_mode=0

trace.txt (17.5 MB)

Boost the clocks to get the trace log again.

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

Hi ShaneCCC,

I boosted the clocks as requested and
collected the trace log again.

Clock rates confirmed:
vi = 550400000 Hz
isp = 729600000 Hz
nvcsi = 214300000 Hz
emc = 2133000000 Hz

Trace log attached (trace2.txt).

Camera: Raspberry Pi HQ Camera (IMX477R, 12.3MP)
Board: AI-EDGE ORIN custom carrier ES-0083
JetPack: 6.2.2 (L4T R36.5.0)

trace2.txt (37.6 MB)

Hi ShaneCCC,

I boosted the clocks as requested and
collected the trace log again.

Clock rates confirmed:
vi = 550400000 Hz
isp = 729600000 Hz
nvcsi = 214300000 Hz
emc = 2133000000 Hz

Trace log attached (trace2.txt).

Camera: Raspberry Pi HQ Camera (IMX477R, 12.3MP)
Board: AI-EDGE ORIN custom carrier ES-0083
JetPack: 6.2.2 (L4T R36.5.0)

trace2.txt

Looks like HW signal problem. Below log tell the CRC error.

Thanks

     kworker/0:2-138     [000] .......  1451.860903: rtcpu_nvcsi_intr: tstamp:46053419292 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:2 vc:0 status:0x00000004

is the connection problem ( i connected correctly) or hardware pcb problem>?

It’s could be HW or sensor config or higher speed get worse signal quality cause the problem.

I didnt flash my custom pinmux while flashing the jetson for linux os on my custom carrier board. is this gives problem ? and one more thing is this i have to create a custom DTB and DTBO right for my custom board >>???

I would suspect it could be the customized carrier HW problem.

My thought is i didnt flashed custom pinmux and custom DTB or DTB0 file when flash the jetson for linux. so the default pinmux and DTB should have so it cause this invalide settings error. This is almost certainly the root cause of everything we have been debugging. The Excel file generates your custom pinmux .dtsi files which configure the pad voltage, drive strength, and slew rate for every pin including CSI_C, MCLK (extperiph1), and PWDN. Without flashing this, the Orin uses default devkit pad settings which explains the wrong 51 MHz MCLK and the sensor not streaming.

See the LLM’s answer also, is this my point is correct>?

I don’t think the custom pinmux would modify the CSI pad.

For the MCLK you can probe to confirm it match the setting.

In our custom board we are mapped the csi 22 pins reversly and we connected them with breakout board like We cannot connect the ribbon cable directly in this way because it reverses the pin order due to the Nano board design. That’s why we used a breakout board to remap the pins, ensuring they match correctly pin 15 on the camera side aligns with pin 22 on the Nano side.

the below image shown it is breakout board we are using and one more thing we connnected all 22 pins wiht esd diodes. is that causes any issues

**

Pasted content**

7.13 KB •187 lines•Formatting may be inconsistent from source

ure-vi: corr_err: discarding frame 0, flags: 0, err_data 8192
parkzap@jetson:~$ GST_DEBUG=3 nvgstcapture-1.0
Encoder null, cannot set bitrate!
Encoder Profile = High
Codec not supported. Falling back to opensrc H264 encoder
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:
(1): image
(2): video
Get Capture Mode:
gmo
Set sensor orientation:
so:
(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: e.g., smo:1
Get sensor mode:
gsmo
Set Whitebalance Mode:
wb:
(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: e.g., st:1.25
Get Saturation:
gst
Set Exposure Compensation (-2 to 2):
ec: e.g., ec:-2
Get Exposure Compensation:
gec
Set Auto Whitebalance Lock:
awbl: e.g., awbl:0
Get Auto Whitebalance Lock:
awbl
Set Auto Exposure Lock:
ael: e.g., ael:0
Get Auto Exposure Lock:
gael
Set TNR Mode:
tnrm: e.g., tnrm:1
(0): OFF
(1): FAST
(2): HIGH QUALITY
Get TNR Mode:
gtnrm
Set TNR Strength (-1 to 1):
tnrs: e.g., tnrs:0.5
Get TNR Strength:
gtnrs
Set EE Mode:
eem: e.g., eem:1
(0): OFF
(1): FAST
(2): HIGH QUALITY
Get EE Mode:
geem
Set EE Strength (-1 to 1):
ees: e.g., ees:0.5
Get EE Strength:
gees
Set Auto Exposure Anti-Banding (0 to 3):
aeab: 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: e.g., gr:1 16
Get Gain Range:
ggr
Set Exposure Time Range:
etr: e.g., etr:34000 35000
Get Exposure Time Range:
getr
Set ISP Digital Gain Range:
dgr: 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: e.g., br:4000000
Get Encoding Bit-rate(in bytes):
gbr
Set Encoding Profile(only for H.264):
ep: 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’

bitrate = 4000

Cannot open display specified with DISPLAY environment variable

can’t create window, Display NULL

Using winsys: x11
0:00:00.388536056 3697 0xaaaad662d6a0 FIXME default gstutils.c:4025:gst_pad_create_stream_id_internal:nvarguscamerasrc0:src Creating random stream-id, consider implementing a deterministic way of creating a stream-id
** Message: 10:24:22.275: main:4732 iterating capture loop …
0:00:00.401715682 3697 0xaaaad63a8360 ERROR egladaption gstegladaptation.c:689:gst_egl_adaptation_choose_config: Could not find matching framebuffer config
0:00:00.401769157 3697 0xaaaad63a8360 ERROR egladaption gstegladaptation.c:703:gst_egl_adaptation_choose_config: Couldn’t choose an usable config
0:00:00.401779781 3697 0xaaaad63a8360 ERROR nveglglessink gsteglglessink.c:2778:gst_eglglessink_configure_caps: Couldn’t choose EGL config
0:00:00.401787366 3697 0xaaaad63a8360 ERROR nveglglessink gsteglglessink.c:2836:gst_eglglessink_configure_caps: Configuring caps failed
0:00:00.401831112 3697 0xaaaad63a8240 ERROR nveglglessink gsteglglessink.c:2869:gst_eglglessink_setcaps: Failed to configure caps
0:00:00.401873450 3697 0xaaaad63a8240 ERROR nveglglessink gsteglglessink.c:2869:gst_eglglessink_setcaps: Failed to configure caps
0:00:00.401888618 3697 0xaaaad63a8240 WARN GST_PADS gstpad.c:4351:gst_pad_peer_query:nvegltransform0:src could not send sticky events
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 1
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 59.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:760 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:244 (propagating)
0:00:04.402284240 3697 0xaaaad63a8240 ERROR nveglglessink gsteglglessink.c:2869:gst_eglglessink_setcaps: Failed to configure caps
0:00:04.402374964 3697 0xaaaad63a8240 ERROR nveglglessink gsteglglessink.c:2869:gst_eglglessink_setcaps: Failed to configure caps
0:00:04.402401973 3697 0xaaaad63a8240 ERROR nveglglessink gsteglglessink.c:2869:gst_eglglessink_setcaps: Failed to configure caps
0:00:04.402517978 3697 0xaaaad63a82a0 FIXME basesink gstbasesink.c:3395:gst_base_sink_default_event: stream-start event without group-id. Consider implementing group-id handling in the upstream elements
0:00:04.402876427 3697 0xaaaad63a82a0 FIXME aggregator gstaggregator.c:1410:gst_aggregator_aggregate_func: Subclass should call gst_aggregator_selected_samples() from its aggregate implementation.