Radxa camera 4K on ubuntu

Greetings.

I’m using Ubuntu distribution on my Rock 5B and when I tried to run the camera 4k, it didn’t work.
I followed the steps in the docs but i couldn’t find the config.txt in the /boot directory, It worked on Debian but i couldn’t use the yolov8 model so i switched to ubuntu.
So to summarize :
On Debian, the camera works and Yolov8 doesn’t
On Ubuntu, the camera doesn’t work and Yolov8 works
is there a solution for that problem ?

Thanks

Any update on the camera. I am trying to do the same thing

This was an old issue.
Generally speaking, there is no difference between Ubuntu and Debian regarding camera and NPU.
Run sudo rsetup , enable the camera and NPU, and follow the yolov8s discussion.

I was trying to make the radxa camera 8m-219 to work with ubuntu.
How ever, I could not able to make it work
v4l2-compliance 1.26.1, 64 bits, 64-bit time_t

Compliance test for rkisp_v5 device /dev/video0:

Driver Info:
Driver name : rkisp_v5
Card type : rkisp_mainpath
Bus info : platform:rkisp-vir0
Driver version : 2.4.0
Capabilities : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Media Driver Info:
Driver name : rkisp-vir0
Model : rkisp0
Serial :
Bus info : platform:rkisp-vir0
Media version : 6.1.43
Hardware revision: 0x00000000 (0)
Driver version : 6.1.43
Interface Info:
ID : 0x0300000e
Type : V4L Video
Entity Info:
ID : 0x0000000d (13)
Name : rkisp_mainpath
Function : V4L2 I/O
Pad 0x01000010 : 0: Sink
Link 0x02000011: from remote pad 0x1000004 of entity ‘rkisp-isp-subdev’ (FAIL: Unknown V4L2 Sub-Device): Data, Enabled

Required ioctls:
test MC information (see ‘Media Driver Info’ above): FAIL
fail: v4l2-compliance.cpp(672): (vcap.version >> 16) < 3
test VIDIOC_QUERYCAP: FAIL
fail: v4l2-compliance.cpp(810): doioctl(node, ioc, nullptr) != ENOTTY
test invalid ioctls: FAIL

Allow for multiple opens:
test second /dev/video0 open: OK
fail: v4l2-compliance.cpp(672): (vcap.version >> 16) < 3
test VIDIOC_QUERYCAP: FAIL
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK

Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 0 Private Controls: 0

Format ioctls:
fail: v4l2-test-formats.cpp(77): expected EINVAL, but got 19 when enumerating frameinterval 0
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
fail: v4l2-test-formats.cpp(488): pixelformat 32314d4e (NM12) for buftype 9 not reported by ENUM_FMT
test VIDIOC_G_FMT: FAIL
fail: v4l2-test-formats.cpp(488): pixelformat 32314d4e (NM12) for buftype 9 not reported by ENUM_FMT
test VIDIOC_TRY_FMT: FAIL
warn: v4l2-test-formats.cpp(1157): S_FMT cannot handle an invalid pixelformat.
warn: v4l2-test-formats.cpp(1158): This may or may not be a problem. For more information see:
warn: v4l2-test-formats.cpp(1159): http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html
fail: v4l2-test-formats.cpp(488): pixelformat 32314d4e (NM12) for buftype 9 not reported by ENUM_FMT
test VIDIOC_S_FMT: FAIL
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
fail: v4l2-test-formats.cpp(1535): doioctl(node, VIDIOC_G_SELECTION, &sel) != EINVAL
test Cropping: FAIL
test Composing: OK (Not Supported)
test Scaling: OK

Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
fail: v4l2-test-buffers.cpp(607): q.reqbufs(node, 1)
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
test CREATE_BUFS maximum buffers: OK
fail: v4l2-test-buffers.cpp(814): VIDIOC_EXPBUF is supported, but the V4L2_MEMORY_MMAP support is missing or malfunctioning.
fail: v4l2-test-buffers.cpp(815): VIDIOC_EXPBUF is supported, but the V4L2_MEMORY_MMAP support is missing, probably due to earlier failing format tests.
test VIDIOC_EXPBUF: OK (Not Supported)
test Requests: OK (Not Supported)

Total for rkisp_v5 device /dev/video0: 47, Succeeded: 37, Failed: 10, Warnings: 3

Command I was trying to use is
GST_DEBUG=4 gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! videoconvert ! video/x-raw,format=NV12,width=1920,height=1080 ! jpegenc ! multifilesink location=/home/radxa/test.jpg

I think this issue with kerne 6.1.x has been resolved with latest kernel and camera engine.
the FPC cable (Rock 5) for the imx219 is coming. it was held by customs, so i can’t help much.

Or you can rollback to kernel 5.10.

Also, type in the cli the following cmd to check if the camera is detected correctly :

sudo dmesg|grep -i imx

radxa@radxa-zero3:~$ sudo dmesg|grep -i imx
radxa@radxa-zero3:~$ uname -a
Linux radxa-zero3 5.10.160-26-rk356x #bfb9351f3 SMP Wed Jan 10 07:01:50 UTC 2024 aarch64 GNU/Linux
radxa@radxa-zero3:~$
I downgraded to 5.10 and it is working but nothing on dmesg

In the 22.04 ubuntu I see the below issues when I enable debug
Non Working
0:00.000521809 3125 0xaaaae250fe00 INFO GST_INIT gst.c:611:init_pre: Linux zero3 5.10.160-rockchip #30 SMP Mon Jan 29 02:38:59 UTC 2024 aarch64
0:00:00.001759974 3125 0xaaaae250fe00 INFO GST_INIT gstmessage.c:129:_priv_gst_message_initialize: init messages
0:00:00.003559616 3125 0xaaaae250fe00 INFO GST_INIT gstcontext.c:86:_priv_gst_context_initialize: init contexts
0:00:00.004771822 3125 0xaaaae250fe00 INFO GST_PLUGIN_LOADING gstplugin.c:324:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.005290130 3125 0xaaaae250fe00 INFO GST_PLUGIN_LOADING gstplugin.c:232:gst_plugin_register_static: registered static plugin “staticelements”
0:00:00.005369174 3125 0xaaaae250fe00 INFO GST_PLUGIN_LOADING gstplugin.c:234:gst_plugin_register_static: added static plugin “staticelements”, result: 1
0:00:00.005869982 3125 0xaaaae250fe00 INFO GST_REGISTRY gstregistry.c:1827:ensure_current_registry: reading registry cache: /home/radxa/.cache/gstreamer-1.0/registry.aarch64.bin
0:00:00.039899546 3125 0xaaaae250fe00 INFO GST_REGISTRY gstregistrybinary.c:683:priv_gst_registry_binary_read_cache: loaded /home/radxa/.cache/gstreamer-1.0/registry.aarch64.bin in 0,033841 seconds
0:00:00.040271141 3125 0xaaaae250fe00 INFO GST_REGISTRY gstregistry.c:1693:scan_and_update_registry: Validating plugins from registry cache: /home/radxa/.cache/gstreamer-1.0/registry.aarch64.bin
0:00:00.046765310 3125 0xaaaae250fe00 INFO GST_REGISTRY gstregistry.c:1785:scan_and_update_registry: Registry cache has not changed
0:00:00.046907940 3125 0xaaaae250fe00 INFO GST_REGISTRY gstregistry.c:1862:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.046939733 3125 0xaaaae250fe00 INFO GST_INIT gst.c:833:init_post: GLib runtime version: 2.72.4
0:00:00.046967734 3125 0xaaaae250fe00 INFO GST_INIT gst.c:835:init_post: GLib headers version: 2.72.1
0:00:00.046986984 3125 0xaaaae250fe00 INFO GST_INIT gst.c:837:init_post: initialized GStreamer successfully
0:00:00.047115613 3125 0xaaaae250fe00 INFO GST_PIPELINE gstparse.c:344:gst_parse_launch_full: parsing pipeline description 'v4l2src device=/dev/video0 io-mode=4 ! videoconvert ! video/x-raw,format=NV12,width=1920,height=1080 ! jpegenc ! multifilesink location=/home/radxa/test.jpg

Working 5.10 output

0:00:00.000742897  2356 0xaaaaf218b800 INFO                GST_INIT gst.c:605:init_pre: Linux radxa-zero3 5.10.160-26-rk356x #bfb9351f3 SMP Wed Jan 10 07:01:50 UTC 2024 aarch64
0:00:00.001898223  2356 0xaaaaf218b800 INFO                GST_INIT gstmessage.c:129:_priv_gst_message_initialize: init messages
0:00:00.004156373  2356 0xaaaaf218b800 INFO                GST_INIT gstcontext.c:85:_priv_gst_context_initialize: init contexts
0:00:00.005141944  2356 0xaaaaf218b800 INFO      GST_PLUGIN_LOADING gstplugin.c:325:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.005941717  2356 0xaaaaf218b800 INFO      GST_PLUGIN_LOADING gstplugin.c:233:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.006069179  2356 0xaaaaf218b800 INFO      GST_PLUGIN_LOADING gstplugin.c:235:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.006218809  2356 0xaaaaf218b800 INFO            GST_REGISTRY gstregistry.c:1790:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.006273644  2356 0xaaaaf218b800 INFO                GST_INIT gst.c:806:init_post: GLib runtime version: 2.66.8

0:00:00.006317395 2356 0xaaaaf218b800 INFO GST_INIT gst.c:808:init_post: GLib headers version: 2.66.8

I see some version changes.

The thread is about Rock 5B/5B+ and you have Zero 3W/E , search for help on Zero / Zero 3W about the camera.

The symptoms where similar to those I face. That is the reason I have replied here. I have added a new one in Zero 3W/E. Thank you for your support.