Lt6911uxe based-on OrinNX16GB/r35.5.0 vi discarding frame

Hello,I drove LT6911UXE on JetsonOrinNX. When I kept capturing video0 devices through gstreamer, frames would drop, and the higher I input, the more frames would be lost. When I reached 4k30hz, it was completely unusable, and the system would crash and restart after a few seconds of collection

4k30hz

1080p60hz
image

hello Towe_Roll,

do your both 4K@30 and 1080p@60 sensor modes have this kernel message discarding frames has reported?
such discarding frame error report by VI due to incorrect capture states, it’s dropping the concurrent capture buffer, and expect next coming good.

hello JerryChang,
Yes, they all have this problem, the 4k30 will lose more, and will cause the system to crash and restart.
How can I solve this problem and do I need to provide additional information.
thank you

hello Towe_Roll,

could you please check the reported flags, and err_data.
for instance, if that’s flag=0, it means there’s error in the capture state, which usually due to incomplete packet sending to CSI channel.

hello JerryChang,
Ok, so far I’m getting zero error codes, which might mean the problem is from the hardware or the sender?

hello Towe_Roll,

it might be the issue on the hardware side. we’ve locally check 4K@30 and it worked normally.

BTW,
let’s give it another try with below 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

Hello JerryChang,
After the hardware update, I can now collect 4k30hz output, but when I used the launch demo of gst-rtsp-server for test output, I found that it was only 15hz, and the mipi data measured by oscilloscope was 33ms. Is there any way to check it? Thank you.

my test shell, gst-rtsp-server-1.16/examples/test-launch.c

./launch “( v4l2src device=/dev/video0 io-mode=4 ! video/x-raw,width=3840,height=2160,format=YUY2,framerate=30/1 ! nvvidconv ! nvv4l2h264enc ! rtph264pay name=pay0 pt=127 )”

hello Towe_Roll,

let’s confirm you’re able to stream 4k30hz without encoder
for instance,
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=3840,height=2160,pixelformat=YUV2 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=300

Hello JerryChang,
This seems normal.

hello Towe_Roll,

thanks for confirmation. it’s should be the issue from gst-rtsp-server.
please give it another try to record the stream to your local storage.
for instance,
here’s pipeline to setup preview stream, and also have do video recording.
$ gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=150 ! 'video/x-raw, width=1920, height=1080, framerate=30/1, format=YUY2' ! tee name=streams streams. ! queue ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=testUSB.mkv streams. ! queue ! xvimagesink -e

Hello JerryChang,
This is the output, which is 15Hz.
image

since Jetson™ Orin Nano does not have the NVENC engine. just double confirm you’re using Orin NX or Orin Nano.

hello JerryChang,
I am using JetsonOrinNX16GB.



hello Towe_Roll,

may I know the results by using h265?
gst-launch-1.0 nvarguscamerasrc num-buffers=300 ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! tee name=streams streams. ! queue ! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=h265.mp4 streams. ! queue ! nvvidconv ! xvimagesink -e

hello JerryChang,
They’re the same.

hello Towe_Roll,

is there any error logs reported?
please setup a terminal with $ dmesg --follow to monitor kernel side messages.

no, error output

hello Towe_Roll,

you may ignore those bwmgr API not supported messages as bwmgr has disabled for Orin series.

let’s have step-back to check frame-rate reported by v4l2src plugin,
for instance,
$ gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=300 ! 'video/x-raw, width=1920, height=1080, framerate=30/1, format=YUY2' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! fpsdisplaysink text-overlay=0 name=sink_0 video-sink=fakesink sync=0 -v