120fps with IMX219 and binned modes

I’m facing an inconsistent behavior with the camera.
After getting a good output with the previous command, I tried my opencv/python script attached below.

arducam.py (4.4 KB)

I only changed Arducam(640, 480, 60, flip_method=2) to Arducam(300, 300, 120, flip_method=2)
but it didn’t work and now all the other commands stopped working :/

nvidia@nvidia-desktop:~/drone-racing-px4/drone_racing/src/camera$ python arducam.py
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 4
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 120.000005
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:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
[ WARN:0] global /home/ubuntu/build_opencv/opencv/modules/videoio/src/cap_gstreamer.cpp (1100) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
GST_ARGUS: Cleaning up
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
GST_ARGUS: Done Success
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Argus client is exiting with 4 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 355)
nvidia@nvidia-desktop:~/drone-racing-px4/drone_racing/src/camera$ cd

nvidia@nvidia-desktop:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1280, height=720, framerate=120/1, format=NV12’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=I420’ ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v
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
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 4
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 120.000005
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = false
Got EOS from element “pipeline0”.
Execution ended after 0:01:01.012758526
Setting pipeline to PAUSED …
Setting pipeline to READY …
GST_ARGUS: Cleaning up
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
GST_ARGUS: Done Success
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
Setting pipeline to NULL …
Freeing pipeline …
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Argus client is exiting with 5 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 355)

And I got even errors in the dmesg:

[نوف25 14:44] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000625] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000011] imx219 10-0010: Error writing mode
[ +0.107363] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000571] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000012] imx219 10-0010: Error writing mode
[ +0.111436] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000575] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000013] imx219 10-0010: Error writing mode
[ +0.103412] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000651] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000013] imx219 10-0010: Error writing mode
[نوف25 14:49] NVRM: No NVIDIA GPU found.
[ +0.395759] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000668] imx219 10-0010: imx219_write_reg: i2c write failed, 0x157 = 0
[ +0.103274] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000599] imx219 10-0010: imx219_write_reg: i2c write failed, 0x157 = c0
[ +0.103468] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000549] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000009] imx219 10-0010: Error writing mode
[ +0.107345] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000545] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000013] imx219 10-0010: Error writing mode
[ +0.111425] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000520] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000010] imx219 10-0010: Error writing mode
[ +0.103462] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000542] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000010] imx219 10-0010: Error writing mode
[نوف25 14:50] NVRM: No NVIDIA GPU found.
[ +0.527973] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000675] imx219 10-0010: imx219_write_reg: i2c write failed, 0x157 = 0
[ +0.103325] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000669] imx219 10-0010: imx219_write_reg: i2c write failed, 0x157 = c0
[ +0.103304] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000731] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000010] imx219 10-0010: Error writing mode
[ +0.107249] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000519] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000011] imx219 10-0010: Error writing mode
[ +0.111439] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000763] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000013] imx219 10-0010: Error writing mode
[ +0.103263] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000585] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000011] imx219 10-0010: Error writing mode

I rebooted and I could get the ~100fps with the terminal command and after that I could even open the python script and see the videostreaming.

(Note: It was working with 300x300 but I restored it to 1280x720 to save the screenshot).

I can deal with the inconsistency if rebooting solves it (sometimes…). Now I have to understand why the upper part of the video is black :D

hello Gorgo90,

what’s the pipeline you’re used to output frames?
you may narrow down by saving 1280x720 capture images,
for example, $ gst-launch-1.0 nvarguscamerasrc num-buffers=1 ! 'video/x-raw(memory:NVMM), width=1280, height=720' ! nvjpegenc ! filesink location=sample.jpg
or,
you may try v4l to dump raw image for confirmation.
for example, $ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw

BTW,
there’re some I2C transfer timed out errors. these doesn’t looks correct.

please resolve this for further stability issue.
for a quick try, you may try disable the ioctl from kernel driver, such as CID_GAIN, CID_EXPOSURE, CID_FRAME_RATE to narrow down the issue.

what’s the pipeline you’re used to output frames?

def gstreamer_pipeline(
self,
capture_width=1280,
capture_height=720,
display_width=1280,
display_height=720,
framerate=120,
flip_method=0,
):
return (
"nvarguscamerasrc ! "
"video/x-raw(memory:NVMM), "
"width=(int)%d, height=(int)%d, "
"format=(string)NV12, framerate=(fraction)%d/1 ! "
"nvvidconv flip-method=%d ! "
"video/x-raw, width=(int)%d, height=(int)%d, format=(string)BGRx ! "
"videoconvert ! "
“video/x-raw, format=(string)BGR ! appsink”
% (
capture_width,
capture_height,
framerate,
flip_method,
display_width,
display_height,
)
)

So I think I was already capturing 1280x720.
I tried your gst-launch and v4l2-ctl commands and I got not-cropped images though.
Do you see any problem with my pipeline?

About the i2c timeouts, I agree this is actually symptom of something wrong.
At the moment I’m having hard times with my test because I don’t see a constant behavior.

What I usually do is:

  • Boot the board. Check if /dev/video0 exists - Sometimes it doesn’t shows up and I must reboot
  • If /dev/video0 exists, I run

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1280, height=720, framerate=120/1, format=NV12’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=I420’ ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v

Sometimes it fails immediately (with the i2c timed out errors), sometimes it stops working after 2/3 runs of the very same command.

nvidia@nvidia-desktop:~$ ./out #Contains the gst-launch-1.0 command only
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
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 640 x 480 FR = 200.000000 fps Duration = 5000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 4
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 120.000005
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = false
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 44, dropped: 0, current: 86.37, average: 86.37
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 88, dropped: 0, current: 87.46, average: 86.91
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 133, dropped: 0, current: 89.72, average: 87.84
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 178, dropped: 0, current: 88.84, average: 88.09
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 223, dropped: 0, current: 89.91, average: 88.45
^Chandling interrupt.
Interrupt: Stopping pipeline …
Execution ended after 0:00:03.296759680
Setting pipeline to NULL …
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline …
nvidia@nvidia-desktop:~$ ./out
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
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 640 x 480 FR = 200.000000 fps Duration = 5000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 4
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 120.000005
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:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = false
Got EOS from element “pipeline0”.
Execution ended after 0:00:04.006123008
Setting pipeline to NULL …
GST_ARGUS: Cleaning up
^C #I killed the pipeline cleaning but It hanged.

I don’t think it’s a power problem. I’m powering the board with a benchtop power supplier (14.8V/2A).
The arducam is connected with a AWM 20624 80C 60V VW-1 ribbon cable to the CSI port.

for a quick try, you may try disable the ioctl from kernel driver, such as CID_GAIN, CID_EXPOSURE, CID_FRAME_RATE to narrow down the issue.

Could you explain more about this test?
I guess you’re referring to the imx219_write_table() inside nv_imx219.c and imx219_ctrl_ops.
Do you want me to comment:

tc_dev->tcctrl_ops = &imx219_ctrl_ops;

?? Tnks

(I’m also trying to show all the dev_dbg prints that are in the driver)

hello Gorgo90,

so, there’s problem in your program, you may look into what’s actually buffer handling is done.

as you can see,
there’re control functions for sending user-space settings to low-level driver.

static struct tegracam_ctrl_ops imx219_ctrl_ops = {
	.numctrls = ARRAY_SIZE(ctrl_cid_list),
	.ctrl_cid_list = ctrl_cid_list,
	.set_gain = imx219_set_gain,
	.set_exposure = imx219_set_exposure,
	.set_frame_rate = imx219_set_frame_rate,
	.set_group_hold = imx219_set_group_hold,

since you got an issue regarding to register write,
the quickest way is hacking functions to return directly without programming the registers.
here’s an example to ignore set_exposure…

diff --git a/drivers/media/i2c/nv_imx219.c b/drivers/media/i2c/nv_imx219.c
index b87eb2780..4dfb82c85 100644
--- a/drivers/media/i2c/nv_imx219.c
+++ b/drivers/media/i2c/nv_imx219.c
@@ -254,6 +254,8 @@ static int imx219_set_exposure(struct tegracam_device *tc_dev, s64 val)
       const struct sensor_mode_properties *mode =
               &s_data->sensor_props.sensor_modes[s_data->mode_prop_idx];

+       return 0;
+
       int err = 0;
       imx219_reg ct_regs[2];
       const s32 max_coarse_time = 

I added DEBUG in nv_imx219.c, in menuconfig and i2c-tegra.c
I also added ‘return 0’ at the beginning o imx219_set_gain, imx219_set_frame_rate and imx219_set_exposure.

This is a dmesg while gst-launch-1.0 is working:

Nov 28 16:44:09 nvidia-desktop kernel: [ 126.239197] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.239321] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.249934] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250093] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250130] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250260] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250317] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250447] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250476] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250605] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250638] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250766] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250824] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250953] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.250985] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251114] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251145] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251279] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251311] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251439] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251470] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251598] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251628] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251757] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251792] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251919] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.251949] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252087] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252122] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252252] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252285] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252415] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252446] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252575] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252605] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252734] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252763] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252892] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.252923] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253050] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253080] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253262] tegra-i2c 3180000.i2c: transfer complete: 24 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253328] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253447] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253487] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253616] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253648] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253790] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253830] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253952] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.253983] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.254111] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.254144] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.254271] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.254303] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.254431] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.254467] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.254673] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.254706] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.254834] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.254864] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.254993] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.255022] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.255155] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.255211] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.255313] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.255342] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.255609] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.255641] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.255770] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.255803] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.255936] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.255965] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256094] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256123] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256252] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256281] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256419] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256452] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256589] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256622] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256752] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256783] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256912] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.256945] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.257084] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.257117] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.257317] tegra-i2c 3180000.i2c: transfer complete: 24 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.257363] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.257493] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.257523] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.257660] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.257696] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.257824] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.257855] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.257984] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.258016] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.258145] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.258180] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.258313] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.258355] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.258507] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.258539] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.258667] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.258722] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.258915] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.258942] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259072] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259106] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259235] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259268] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259396] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259452] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259580] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259610] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259739] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259781] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259911] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.259946] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.260080] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.260110] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.260239] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.260272] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.260409] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.260444] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.260576] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.260612] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.260737] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.338992] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.339980] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.346523] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.346679] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.355031] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.355197] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.363757] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.363919] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.779204] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.779362] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.795671] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
Nov 28 16:44:09 nvidia-desktop kernel: [ 126.795807] tegra-i2c 3180000.i2c: transfer complete: 25 0 0

This happens when the command fails:

[ +0.000159] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
[ +2.023412] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
[ +0.000134] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
[ +0.010624] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
[ +0.000135] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
[ +0.000094] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
[ +0.000141] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
[ +0.000086] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
[ +0.000142] tegra-i2c 3180000.i2c: transfer complete: 25 0 0
[ +0.000047] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
[ +0.101276] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000188] tegra-i2c 3180000.i2c: setting default prod
[ +0.000014] tegra-i2c 3180000.i2c: setting prod: prod_c_fm
[ +0.000018] tegra-i2c 3180000.i2c: tlow 0x2, thigh 0x2, hs_tlow 0x8, hs_thigh 0x3, divisor 0x3c, divisor_hs 0x1
[ +0.000469] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000012] imx219 10-0010: Error writing mode
[ +0.003325] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
[ +0.103988] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000203] tegra-i2c 3180000.i2c: setting default prod
[ +0.000013] tegra-i2c 3180000.i2c: setting prod: prod_c_fm
[ +0.000017] tegra-i2c 3180000.i2c: tlow 0x2, thigh 0x2, hs_tlow 0x8, hs_thigh 0x3, divisor 0x3c, divisor_hs 0x1
[ +0.000392] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000012] imx219 10-0010: Error writing mode
[ +0.010225] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
[ +0.101136] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000176] tegra-i2c 3180000.i2c: setting default prod
[ +0.000014] tegra-i2c 3180000.i2c: setting prod: prod_c_fm
[ +0.000043] tegra-i2c 3180000.i2c: tlow 0x2, thigh 0x2, hs_tlow 0x8, hs_thigh 0x3, divisor 0x3c, divisor_hs 0x1
[ +0.000376] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000010] imx219 10-0010: Error writing mode
[ +0.002161] tegra-i2c 3180000.i2c: unmasked IRQ: 8c
[ +0.101206] tegra-i2c 3180000.i2c: I2C transfer timed out
[ +0.000169] tegra-i2c 3180000.i2c: setting default prod
[ +0.000045] tegra-i2c 3180000.i2c: setting prod: prod_c_fm
[ +0.000022] tegra-i2c 3180000.i2c: tlow 0x2, thigh 0x2, hs_tlow 0x8, hs_thigh 0x3, divisor 0x3c, divisor_hs 0x1
[ +0.000379] regmap_util_write_table_8:regmap_util_write_table:-110
[ +0.000039] imx219 10-0010: Error writing mode

hello Gorgo90,

did you meant there’s stability issue that it sometimes capture failed?
it’s tegra-i2c 3180000.i2c: I2C transfer timed out failure reported. it may be a hardware issue.

Yes apparently. I’m doing the following test

  • Boot
  • Check if video0 is up an running
  • gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1280, height=720, framerate=120/1, format=NV12’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=I420’ ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v
  • Ctrl+c gst-launch-1.0, waiting for the correct pipeline cleaning and repeat

At the moment the command usually runs the first 1/2 times, then it fails, I got timeout in the dmesg and I must reboot to make it work again.

I’m going to try with a different carrier board now and I’ll try the old carrier board with Jetpack 4.6 to check if the same behavior is there.

hello Gorgo90,

you may also try to restart Argus daemon for a clean restart.
for example,
$ sudo pkill nvargus-daemon
$ sudo systemctl start nvargus-daemon

Hi @JerryChang ,
So I changed the imx219 module and now it seems more reliable and I haven’t got (yet?) timeout problems. Maybe it’s was indeed an hardware issue even if I hate it worked sometimes :/

Back to the capturing,
I found something interesting about your command:

gst-launch-1.0 nvarguscamerasrc num-buffers=1 ! ‘video/x-raw(memory:NVMM), width=1280, height=720’ ! nvjpegenc ! filesink location=sample.jpg

As I told you, this gets the fully image, BUT it’s not true (half image as the screenshot above) if I add framerate=120/1.

gst-launch-1.0 nvarguscamerasrc num-buffers=1 ! ‘video/x-raw(memory:NVMM), width=1280, height=720, framerate=120/1’ ! nvjpegenc ! filesink location=sample.jpg

I then tried with multiple images:

gst-launch-1.0 nvarguscamerasrc num-buffers=1200 sensor-id=0 ! “video/x-raw(memory:NVMM),width=1280,height=720,framerate=120/1” ! nvjpegenc ! multifilesink location=%03d_cam0.jpeg

And it took ~15sec (100/120fps?) but they are cropped, while

gst-launch-1.0 nvarguscamerasrc num-buffers=1200 sensor-id=0 ! “video/x-raw(memory:NVMM),width=1280,height=720” ! nvjpegenc ! multifilesink location=%03d_cam0.jpeg

took 40sec (30/60fps?). These images aren’t cropped though.

hello Gorgo90,

you have only single 1280x720 sensor mode with 120-fps defined in drivers, right?
please share your sensor format dumps, $ v4l2-ctl -d /dev/video0 --list-formats-ext.

please try following to test the sensor capability,
for example, by using v4l standard utility. this will also report fps below pipeline.
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=600

furthermore,
there’s commands to disable preview frames and shows frame-rate only.
please try you see different results by adding framerate property.
for example,
$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1280, height=720, framerate=120/1, format=NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=I420' ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v
and…
$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1280, height=720, format=NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=I420' ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v

Hi @JerryChang
yes, the Image I’m using is the same (Jetpack 5.0.2 with 1280x720/120 enabled and 1280x720/60 disabled. CUDA installed) but I cleared the ‘return 0’ we set on setGain, setFrameRate because apparently it doesn’t say timeout anymore.

nvidia@nvidia-desktop:~$ v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

  Size: Discrete 3280x2464
  	Interval: Discrete 0.048s (21.000 fps)
  Size: Discrete 3280x1848
  	Interval: Discrete 0.036s (28.000 fps)
  Size: Discrete 1920x1080
  	Interval: Discrete 0.033s (30.000 fps)
  Size: Discrete 1640x1232
  	Interval: Discrete 0.033s (30.000 fps)
  Size: Discrete 1280x720
  	Interval: Discrete 0.017s (60.000 fps)     <---This says 60 but in the device tree there is 120 only

devicetree_hayi.dts (393.8 KB)

The first command shows:

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=600
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 21.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<< 21.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<< 21.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<< 21.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<< 21.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<< 21.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<< 21.00 fps

As expected, without framerate property, it runs at 30fps

nvidia@nvidia-desktop:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1280, height=720, framerate=120/1, format=NV12’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=I420’ ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v
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
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)120/1, format=(string)I420
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)120/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 640 x 480 FR = 200.000000 fps Duration = 5000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 4
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 120.000005
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = false
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 49, dropped: 0, current: 97.18, average: 97.18
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 98, dropped: 0, current: 96.23, average: 96.70
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 146, dropped: 0, current: 95.21, average: 96.21
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 194, dropped: 0, current: 94.60, average: 95.80
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 242, dropped: 0, current: 95.31, average: 95.71
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 290, dropped: 0, current: 94.50, average: 95.50
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 338, dropped: 0, current: 95.88, average: 95.56
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 386, dropped: 0, current: 93.91, average: 95.35
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 433, dropped: 0, current: 93.38, average: 95.13
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 481, dropped: 0, current: 94.67, average: 95.09
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 530, dropped: 0, current: 96.43, average: 95.21
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 578, dropped: 0, current: 95.04, average: 95.19
^Chandling interrupt.
Interrupt: Stopping pipeline …
Execution ended after 0:00:06.584433651
Setting pipeline to PAUSED …
Setting pipeline to READY …
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Setting pipeline to NULL …
Freeing pipeline …
nvidia@nvidia-desktop:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1280, height=720, format=NV12’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=I420’ ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v
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
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)I420
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)I420
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)30/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 640 x 480 FR = 200.000000 fps Duration = 5000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 4
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 120.000005
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = false
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 17, dropped: 0, current: 32.19, average: 32.19
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 33, dropped: 0, current: 30.01, average: 31.10
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 49, dropped: 0, current: 30.01, average: 30.73
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 65, dropped: 0, current: 30.07, average: 30.57
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 80, dropped: 0, current: 29.92, average: 30.44
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 96, dropped: 0, current: 30.11, average: 30.39
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 112, dropped: 0, current: 29.99, average: 30.33
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 127, dropped: 0, current: 29.90, average: 30.28
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 143, dropped: 0, current: 30.04, average: 30.25
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 159, dropped: 0, current: 30.07, average: 30.23
^Chandling interrupt.
Interrupt: Stopping pipeline …
Execution ended after 0:00:05.831219234
Setting pipeline to PAUSED …
Setting pipeline to READY …
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Setting pipeline to NULL …
Freeing pipeline …

hello Gorgo90,

it turns out there’s DEFAULT_FPS = 30 in gstnvarguscamerasrc.cpp. so, you must assign the framerate property for running frame-rate over 30-fps.

regarding to your v4l pipeline, re-cap as below.
it doesn’t look normal since the low-level side report the capability is 21-fps.

so, you may review your driver side, please examine the register settings.
furthermore, is it possible to probe the signaling? you may check it’s actually sending every frames ~8.33ms (i.e. 1/120-fps).

Hi @JerryChang, unfortunately I don’t have proper tools to probe the signaling :(
I tried

gst-launch-1.0 -e nvarguscamerasrc num-buffers=100 sensor-id=0 ! “video/x-raw(memory:NVMM),width=1280,height=720,framerate=$FRAMERATE/1” ! nvjpegenc ! multifilesink location=%03d_cam$0.jpeg

With 4 different framerates (120, 100, 80, 60).
See how the image increases while the framerate decreases. (don’t bother about the color. I didn’t change the ISP file).




As registers I’m using

static imx219_reg imx219_mode_1280x720_120fps = {
// capture settings
{0x0157, 0x00}, // ANALOG_GAIN_GLOBAL[7:0]
{0x015A, 0x01}, // COARSE_INTEG_TIME[15:8]
{0x015B, 0x85}, //389 COARSE_INTEG_TIME[7:0]
// format settings
{0x0160, 0x01}, // FRM_LENGTH[15:8]
{0x0161, 0x89}, //393 FRM_LENGTH[7:0]
{0x0162, 0x0D}, // LINE_LENGTH[15:8]
{0x0163, 0x78}, //3448 LINE_LENGTH[7:0]
{0x0164, 0x01}, //X_ADD_STA_A
{0x0165, 0x68}, //360 X_ADD_STA_A
{0x0166, 0x0B}, //X_ADD_END_A
{0x0167, 0x67}, //2919 X_ADD_END_A
{0x0168, 0x02}, // Y_ADD_STA_A[11:8]
{0x0169, 0x00}, //512 Y_ADD_STA_A[7:0]
{0x016A, 0x07}, // Y_ADD_END_A[11:8] (y_addr_end; y address of the bottom right corner of pixel data)
{0x016B, 0x9F}, //1951 Y_ADD_END_A[7:0]
{0x016C, 0x05}, // x_output_size[11:8] (width of image data output from the sensor module)
{0x016D, 0x00}, //1280 x_output_size[7:0]
{0x016E, 0x02}, // y_output_size[11:8] (height of image data output from the sensor module)
{0x016F, 0xD0}, //720 y_output_size[7:0]
{0x0170, 0x01}, // X_ODD_INC_A[2:0] (x_odd_inc; increment for odd pixels; 1 or 3)
{0x0171, 0x01}, // Y_ODD_INC_A[2:0] (y_odd_inc; increment for odd pixels; 1 or 3)
{0x0174, 0x03}, // BINNING_MODE_H_A (horizontal binning) (0 = none, 1 = 2x, 2 = 4x, 3 = 2x analog)
{0x0175, 0x03}, // BINNING_MODE_V_A (vertical binning) (0 = none, 1 = 2x, 2 = 4x, 3 = 2x analog)
{0x018C, 0x0A},
{0x018D, 0x0A},
// clocks dividers
{0x0301, 0x05},
{0x0303, 0x01},
{0x0304, 0x03},
{0x0305, 0x03},
{0x0306, 0x00},
{0x0307, 0x35},
{0x0309, 0x0A},
{0x030B, 0x01},
{0x030C, 0x00},
{0x030D, 0x66},
{IMX219_TABLE_END, 0x00}
};

mode4 { // IMX219_MODE_1280x720_120FPS
mclk_khz = “24000”;
num_lanes = “2”;
tegra_sinterface = “serial_c”;
phy_mode = “DPHY”;
discontinuous_clk = “yes”;
dpcm_enable = “false”;
cil_settletime = “0”;
active_w = “1280”;
active_h = “720”;
mode_type = “bayer”;
pixel_phase = “rggb”;
csi_pixel_bit_depth = “10”;
readout_orientation = “90”;
line_length = “3448”;
inherent_gain = “1”;
mclk_multiplier = “9.33”;
pix_clk_hz = “182400000”;
gain_factor = “16”;
framerate_factor = “1000000”;
exposure_factor = “1000000”;
min_gain_val = “16”; // 1.00x
max_gain_val = “170”; // 10.66x
step_gain_val = “1”;
default_gain = “16”; // 1.00x
min_hdr_ratio = “1”;
max_hdr_ratio = “1”;
min_framerate = “2000000”; // 2.0 fps
max_framerate = “120000000”; // 120.0 fps
step_framerate = “1”;
default_framerate = “120000000”; // 120.0 fps
min_exp_time = “13”; // us
max_exp_time = “683709”; // us
step_exp_time = “1”;
default_exp_time = “2495”; // us
embedded_metadata_height = “2”;
};

Could you help with checking the reg values?

Plus, I’m trying to check nv_imx219.c and I added different printk such as

printk(KERN_ERR “DEBUG: Passed %s %d : imx219_open\n”,FUNCTION,LINE);

I added

#define DEBUG 1

at the beginning of the file.

I added DYNAMIC_DEBUG in the .config before compiling/flashing.
I added debug in extlinux.conf

APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 debug fbcon=map:0 net.ifnames=0

I added nv_imx219.c in control:

nvidia@nvidia-desktop:~$ sudo su
root@nvidia-desktop:/home/nvidia# echo ‘file imx219.c +p’>/sys/kernel/debug/dynamic_debug/control

BUT I don’t see any imx219 custom printk in my dmesg.
I checked if they were in /sys/kernel/debug/dynamic_debug/control but there are some imx entries by nv_imx390 (??!) linked to the building directory on my laptop

nvidia@nvidia-desktop:~$ sudo cat /sys/kernel/debug/dynamic_debug/control | grep imx
/home/gorgo/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/i2c/nv_imx390.c:564 [nv_imx390]imx390_open =_ “%s:\012”
/home/gorgo/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/i2c/nv_imx390.c:266 [nv_imx390]imx390_power_off =_ “%s:\012”
/home/gorgo/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/i2c/nv_imx390.c:244 [nv_imx390]imx390_power_on =_ “%s: power on\012”
/home/gorgo/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/i2c/nv_imx390.c:337 [nv_imx390]imx390_set_group_hold =_ “%s: Group hold control error\012”
/home/gorgo/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/i2c/nv_imx390.c:357 [nv_imx390]imx390_set_gain =_ “%s: db: %d\012”
/home/gorgo/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/i2c/nv_imx390.c:429 [nv_imx390]imx390_set_exposure =_ “%s: set coarse time error\012”

Nothing related to imx219.
Could you tell me why?

hello Gorgo90,

dynamic debug is default disabled for k-5.10.
currently, you need to configure kernel config to enable CONFIG_DYNAMIC_DEBUG=y, and rebuilt the kernel image, after apply that, all pr_debug()/dev_dbg() and print_hex_dump_debug()/print_hex_dump_bytes() calls can be dynamically enabled per-callsite.

please review sensor specification. it should be sub-sampling both horizontal, and vertical of the source images.
could you please compare FOVs?
it looks frames become narrower (but the horizon did not change) when the frame-rate is higher?
if yes, it might be an issue that your H-binning setting is incorrect.

Hi @JerryChang,
I saw that DYNAMIC_DEBUG was disabled before compiling.
As I was telling in the previous message, I added DYNAMIC_DEBUG in the .config before compiling/flashing. I manually added it between make…tegra_defconfig and make…-j16.
Is the correct procedure? Enabling it will help me debugging a lot.

nvidia@nvidia-desktop:~$ cat /proc/config.gz | gunzip | grep CONFIG_DYNAMIC_DEBUG
CONFIG_DYNAMIC_DEBUG=y
CONFIG_DYNAMIC_DEBUG_CORE=y

About the cropped image:

  • What do you mean with FOV comparing? You mean checking if this changes between the ‘framerates’? To me it doesn’t.
  • In fact, the 4 images FOV looks the same to me. It’s as you said, the height decreases when the FR is higher.
    At the moment I’m using a (x2 analog) binning for V and H binning, e.g. 0x0174 and 0x0175 are 0x03 in my mode table. I’ll try different

Thank you!

Hi @JerryChang,
I tried to change 0x0174 and 0x0175 to 0x02 (x4 binning) in order to check any difference. Apparently it didn’t change anything. (The image is still cropped with gst-launch-1.0 -e nvarguscamerasrc num-buffers=100 sensor-id=0 ! “video/x-raw(memory:NVMM),width=1280,height=720,framerate=120/1” ! nvjpegenc ! multifilesink location=%03d_cam$0.jpeg )

Then, I did the following test:

In imx219_tables.h I removed imx219_mode_1280x720_120fps (along with its references in enum, imx219_120fps and imx219_frmfmt).
So, only these are defined:

static const struct camera_common_frmfmt imx219_frmfmt = {
{{3280, 2464}, imx219_21fps, 1, 0, IMX219_MODE_3280x2464_21FPS},
/* Add modes with no device tree support after below */
{{3280, 1848}, imx219_28fps, 1, 0, IMX219_MODE_3280x1848_28FPS},
{{1920, 1080}, imx219_30fps, 1, 0, IMX219_MODE_1920x1080_30FPS},
{{1640, 1232}, imx219_30fps, 1, 0, IMX219_MODE_1640x1232_30FPS},
{{640, 480}, imx219_200fps, 1, 0, IMX219_MODE_640x480_200FPS},
};

I ‘make clean’ and recompile the Images, dtb, modules and flash everything with the ‘fix’.
Unexpectly, v4l2-ctl --device /dev/video0 --list-formats-ext still shows:

ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

  Size: Discrete 3280x2464
  	Interval: Discrete 0.048s (21.000 fps)
  Size: Discrete 3280x1848
  	Interval: Discrete 0.036s (28.000 fps)
  Size: Discrete 1920x1080
  	Interval: Discrete 0.033s (30.000 fps)
  Size: Discrete 1640x1232
  	Interval: Discrete 0.033s (30.000 fps)
  Size: Discrete 1280x720
  	Interval: Discrete 0.017s (60.000 fps)

while GST_ARGUS shows only the modes define in the device tree (through the dtsi file).
I left 4 modes only to test.

nvidia@nvidia-desktop:~$ gst-launch-1.0 -e nvarguscamerasrc num-buffers=100 sensor-id=0 ! “video/x-raw(memory:NVMM),width=1280,height=720,framerate=120/1” ! nvjpegenc ! multifilesink location=%03d_cam$0.jpeg
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
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: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

ARGUS_ERROR: Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute: 903 Frame Rate specified is greater than supported
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3280 H = 2464
seconds to Run = 0
Frame Rate = 21.000000

I’m a bit surprised about --list-formats-ext.
Are my changes in imx219_tables.h effective? Maybe the formats are saved in the module registers?

hello Gorgo90,

ya, it looks weird. may I know how you update the kernel and dtb binary files?

Hi @JerryChang , sure!
I’m on Ubuntu 20.04. I have downloaded the sources using sdkmanager (Jetpack 5.0.2) and get the kernel sources using source_sync.sh (this one: Jetpack5.0.2 kernel compile error - #12 by ShaneCCC) with branch jetson_35.1 when requested.

Once in kernel-5.10 folder I usually do:

sudo make clean
sudo make ARCH=arm64 LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} tegra_defconfig
sudo make ARCH=arm64 LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j16
sudo make ARCH=arm64 LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} modules_install INSTALL_MOD_PATH=…/…/…/rootfs/
cp arch/arm64/boot/Image …/…/…/kernel/Image
cp --verbose arch/arm64/boot/dts/nvidia/*.dtb …/…/…/kernel/dtb/
cd …/…/…/rootfs/
sudo tar --owner root --group root -cjf kernel_supplements.tbz2 lib/modules
cp kernel_supplements.tbz2 …/kernel/kernel_supplements.tbz2
cd …
sudo ./apply_binaries.sh
sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1

I then do the Ubuntu initial setup and I try the command after rebooting.

hello Gorgo90,

ohh… that’s exhausting ways for updating binary.
so, can you see $ dmesg | grep DTS to check the build time has changed?

FYI,
there’s an alternative way (easy, and quick) for updating without re-flash the target.

there’s ability for reading kernel image and device tree blob via root file system.
please refer to /boot/extlinux/extlinux.conf
you may update LINUX entry for loading your self-build kernel, and FDT entry for device tree.

LABEL primary
      LINUX /boot/Image
      FDT /boot/dtb/kernel_tegra194-p3668-0000-p3509-0000.dtb

the changes will take effect after performing reboot,
thanks