bnc
Posts: 5
Joined: Tue Jan 04, 2022 2:33 pm

libcamera stack does not work in Bullseye with the RasPi Camera V2 and the HQ Camera

Tue Jan 04, 2022 2:51 pm

Hello,


On a RasPi4 (4 GB RAM), the HQ-Camera and the RasPi Camera V2 both work well with the legacy camera stack, but not with the libcamera stack. I did an update from Buster to Bullseye. There, the situation was the same. Legacy stack worked, but libcamera stack not. My current os version:

Code: Select all

$ uname -a
Linux raspberrypi 5.10.89-v7l+ #1506 SMP Fri Dec 31 14:40:15 GMT 2021 armv7l GNU/Linux
$ cat /etc/debian_version 
11.2
have these lines in the sections pi4 and all inside the file /boot/config.txt now.

Code: Select all

[pi4]
max_framebuffers=2

[all]
dtoverlay=vc4-kms-v3d
camera_auto_detect=1
gpu_mem=256
The v4l2-ctl tool gives met his output.

Code: Select all

$ v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
    /dev/video10
    /dev/video11
    /dev/video12
    /dev/video18
    /dev/media3

bcm2835-isp (platform:bcm2835-isp):
    /dev/video13
    /dev/video14
    /dev/video15
    /dev/video16
    /dev/video20
    /dev/video21
    /dev/video22
    /dev/video23
    /dev/media0
    /dev/media1

unicam (platform:fe801000.csi):
    /dev/video0
    /dev/video1
    /dev/media2
This is the list of v4l2 modules I run at the moment:

Code: Select all

$ lsmod | grep v4l2
v4l2_dv_timings        36864  1 bcm2835_unicam
v4l2_fwnode            24576  2 bcm2835_unicam,imx219
bcm2835_v4l2           45056  0
videobuf2_vmalloc      16384  1 bcm2835_v4l2
bcm2835_mmal_vchiq     32768  3 bcm2835_isp,bcm2835_codec,bcm2835_v4l2
v4l2_mem2mem           36864  1 bcm2835_codec
videobuf2_v4l2         32768  5 bcm2835_unicam,bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
videobuf2_common       61440  6 bcm2835_unicam,bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
videodev              249856  9 bcm2835_unicam,imx219,bcm2835_isp,v4l2_fwnode,bcm2835_codec,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
mc                     45056  8 bcm2835_unicam,imx219,bcm2835_isp,bcm2835_codec,videobuf2_common,videodev,v4l2_mem2mem,videobuf2_v4l2
The libcamera-hello tool gives opens a window which stays black and returns this output.

Code: Select all

$ libcamera-hello --verbose
Options:
    verbose: 1
    info_text:#%frame (%fps fps) exp %exp ag %ag dg %dg
    timeout: 5000
    width: 0
    height: 0
    output: 
    post_process_file: 
    rawfull: 0
    preview: default
    qt-preview: 0
    transform: identity
    roi: all
    metering: centre
    exposure: normal
    ev: 0
    awb: auto
    flush: false
    wrap: 0
    brightness: 0
    contrast: 1
    saturation: 1
    sharpness: 1
    framerate: 30
    denoise: auto
    viewfinder-width: 0
    viewfinder-height: 0
    tuning-file: (libcamera)
    lores-width: 0
    lores-height: 0
Opening camera...
[1:56:07.244460125] [2952]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3156-f4070274
[1:56:07.298694806] [2954] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009e0901 but control is not exposed by device /dev/video0
[1:56:07.298756808] [2954] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x00980911 but control is not exposed by device /dev/video0
[1:56:07.298786827] [2954] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009e0903 but control is not exposed by device /dev/video0
Acquired camera /base/soc/i2c0mux/i2c@1/imx219@10
Configuring viewfinder...
Viewfinder size chosen is 1640x1232
Final viewfinder size is 1640x1232
Stream configuration adjusted
[1:56:07.300131290] [2952]  INFO Camera camera.cpp:937 configuring streams: (0) 1640x1232-YUV420
[1:56:07.300565431] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt Y10  Score: 500 (best 500)
[1:56:07.300653360] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt Y12  Score: 500 (best 500)
[1:56:07.300694583] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt Y14  Score: 500 (best 500)
[1:56:07.300731510] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt BA10 Score: 1500 (best 500)
[1:56:07.300767252] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt GB10 Score: 1500 (best 500)
[1:56:07.300803345] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt BG10 Score: 1500 (best 500)
[1:56:07.300839124] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt RG10 Score: 1500 (best 500)
[1:56:07.300874680] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt BA81 Score: 2500 (best 500)
[1:56:07.300911181] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt BA12 Score: 500 (best 500)
[1:56:07.300946960] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt GB12 Score: 500 (best 500)
[1:56:07.300982628] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt BG12 Score: 500 (best 500)
[1:56:07.301020092] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt RG12 Score: 500 (best 500)
[1:56:07.301056000] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt RGB3 Score: 500 (best 500)
[1:56:07.301092686] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt BGR3 Score: 500 (best 500)
[1:56:07.301130410] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt GB14 Score: 500 (best 500)
[1:56:07.301498142] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt BG14 Score: 500 (best 500)
[1:56:07.301543106] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt RG14 Score: 500 (best 500)
[1:56:07.301576774] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt GR14 Score: 500 (best 500)
[1:56:07.301612293] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt RGB4 Score: 500 (best 500)
[1:56:07.301670665] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pBAA Score: 1000 (best 500)
[1:56:07.301707907] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pGAA Score: 1000 (best 500)
[1:56:07.301742630] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pRAA Score: 1000 (best 500)
[1:56:07.301779649] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pgAA Score: 1000 (best 500)
[1:56:07.301815725] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt RGGB Score: 2500 (best 500)
[1:56:07.301850744] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pBCC Score: 0 (best 0)
[1:56:07.301888041] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pGCC Score: 0 (best 0)
[1:56:07.301925024] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pRCC Score: 0 (best 0)
[1:56:07.301963099] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pgCC Score: 0 (best 0)
[1:56:07.301998618] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pBEE Score: 500 (best 0)
[1:56:07.302034860] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pGEE Score: 500 (best 0)
[1:56:07.302072732] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pREE Score: 500 (best 0)
[1:56:07.302108084] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt pgEE Score: 500 (best 0)
[1:56:07.302143233] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt GRBG Score: 2500 (best 0)
[1:56:07.302178383] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt GBRG Score: 2500 (best 0)
[1:56:07.302215772] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt RGBO Score: 500 (best 0)
[1:56:07.302252625] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt Y10P Score: 500 (best 0)
[1:56:07.302289904] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt Y12P Score: 500 (best 0)
[1:56:07.302325183] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt Y14P Score: 500 (best 0)
[1:56:07.302362239] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt RGBP Score: 500 (best 0)
[1:56:07.302678341] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt RGBQ Score: 500 (best 0)
[1:56:07.302724805] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt RGBR Score: 500 (best 0)
[1:56:07.302781177] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt YVYU Score: 500 (best 0)
[1:56:07.302820993] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt YUYV Score: 500 (best 0)
[1:56:07.302856012] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt GREY Score: 2500 (best 0)
[1:56:07.302891513] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt VYUY Score: 500 (best 0)
[1:56:07.302928384] [2954]  INFO RPI raspberrypi.cpp:122 Mode: 1640x1232 fmt UYVY Score: 500 (best 0)
[1:56:07.303203559] [2954]  INFO RPI raspberrypi.cpp:620 Sensor: /base/soc/i2c0mux/i2c@1/imx219@10 - Selected mode: 1640x1232-pgCC
[1:56:07.305500640] [2954] ERROR IPARPI raspberrypi.cpp:539 Unable to find sensor control 0x009e0903
[1:56:07.305605309] [2954] ERROR IPARPI raspberrypi.cpp:351 Sensor control validation failed.
[1:56:07.305632069] [2954] ERROR RPI raspberrypi.cpp:1306 IPA configuration failed!
[1:56:07.305680867] [2954] ERROR RPI raspberrypi.cpp:757 Failed to configure the IPA: -32
Closing Libcamera application(frames displayed 0, dropped 0)
Camera stopped!
Tearing down requests, buffers and configuration
Camera closed
ERROR: *** failed to configure streams ***
When I connect a webcam via USB, it works fine with the libcamera stack and tools like qv4l2 but I cannot get any Raspberry Camera running.

Has anyone an idea of how to fix this issue?

Thanks for any help.
bnc

rollyng
Posts: 100
Joined: Sat Dec 10, 2016 4:08 pm
Location: Hong Kong SAR

Re: libcamera stack does not work in Bullseye with the RasPi Camera V2 and the HQ Camera

Thu Jan 06, 2022 4:37 am

Hello,

My recent experience with Bullseye is that you have to update the libcamera and libcamera-apps from the git repository.

Before that you can also try to modify your /boot/config.txt

Code: Select all

camera_auto_detect=0
dtoverlay=imx477
dtoverlay=vc4-kms-v3d, cma 512

bnc
Posts: 5
Joined: Tue Jan 04, 2022 2:33 pm

Re: libcamera stack does not work in Bullseye with the RasPi Camera V2 and the HQ Camera

Thu Jan 06, 2022 9:33 am

Sadly this did not help.

I tried these lines in the config.txt

Code: Select all

[all]
camera_auto_detect=0
dtoverlay=imx477
gpu_mem=128
dtoverlay=vc4-kms-v3d,cma-512

# Automatically load overlays for detected DSI displays
#display_auto_detect=1
And I tried different values for gpu_mem. Also with gpu_mem=256

But nothing did help.

The output of libcamera-hello is:

Code: Select all

$ libcamera-hello --verbose
Options:
    verbose: 1
    info_text:#%frame (%fps fps) exp %exp ag %ag dg %dg
    timeout: 5000
    width: 0
    height: 0
    output: 
    post_process_file: 
    rawfull: 0
    preview: default
    qt-preview: 0
    transform: identity
    roi: all
    metering: centre
    exposure: normal
    ev: 0
    awb: auto
    flush: false
    wrap: 0
    brightness: 0
    contrast: 1
    saturation: 1
    sharpness: 1
    framerate: 30
    denoise: auto
    viewfinder-width: 0
    viewfinder-height: 0
    tuning-file: (libcamera)
    lores-width: 0
    lores-height: 0
Opening camera...
[0:01:05.745746566] [1403]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3156-f4070274
[0:01:05.766307719] [1405]  WARN CameraSensorProperties camera_sensor_properties.cpp:141 No static properties available for 'imx477'
[0:01:05.766376273] [1405]  WARN CameraSensorProperties camera_sensor_properties.cpp:143 Please consider updating the camera sensor properties database
[0:01:05.790528493] [1405] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009e0901 but control is not exposed by device /dev/video0
[0:01:05.790615175] [1405] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x00980911 but control is not exposed by device /dev/video0
[0:01:05.790661229] [1405] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009e0903 but control is not exposed by device /dev/video0
Acquired camera /base/soc/i2c0mux/i2c@1/imx477@1a
Configuring viewfinder...
Viewfinder size chosen is 2028x1520
Final viewfinder size is 2028x1520
Stream configuration adjusted
[0:01:05.792190067] [1403]  INFO Camera camera.cpp:937 configuring streams: (0) 2028x1520-YUV420
[0:01:05.792599461] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt Y10  Score: 500 (best 500)
[0:01:05.792673051] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt Y12  Score: 500 (best 500)
[0:01:05.792711087] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt Y14  Score: 500 (best 500)
[0:01:05.792746123] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt BA10 Score: 1500 (best 500)
[0:01:05.792781381] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt GB10 Score: 1500 (best 500)
[0:01:05.792816639] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt BG10 Score: 1500 (best 500)
[0:01:05.792850749] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt RG10 Score: 1500 (best 500)
[0:01:05.792884915] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt BA81 Score: 2500 (best 500)
[0:01:05.792919265] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt BA12 Score: 500 (best 500)
[0:01:05.792953542] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt GB12 Score: 500 (best 500)
[0:01:05.792987911] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt BG12 Score: 500 (best 500)
[0:01:05.793021854] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt RG12 Score: 500 (best 500)
[0:01:05.793056613] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt RGB3 Score: 500 (best 500)
[0:01:05.793091186] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt BGR3 Score: 500 (best 500)
[0:01:05.793126184] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt GB14 Score: 500 (best 500)
[0:01:05.793160739] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt BG14 Score: 500 (best 500)
[0:01:05.793195719] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt RG14 Score: 500 (best 500)
[0:01:05.793230477] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt GR14 Score: 500 (best 500)
[0:01:05.793264976] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt RGB4 Score: 500 (best 500)
[0:01:05.793298956] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pBAA Score: 1000 (best 500)
[0:01:05.793333011] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pGAA Score: 1000 (best 500)
[0:01:05.793367491] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pRAA Score: 1000 (best 500)
[0:01:05.793401342] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pgAA Score: 1000 (best 500)
[0:01:05.793443915] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt RGGB Score: 2500 (best 500)
[0:01:05.793479099] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pBCC Score: 0 (best 0)
[0:01:05.793514672] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pGCC Score: 0 (best 0)
[0:01:05.793549522] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pRCC Score: 0 (best 0)
[0:01:05.793587132] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pgCC Score: 0 (best 0)
[0:01:05.793624631] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pBEE Score: 500 (best 0)
[0:01:05.793669463] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pGEE Score: 500 (best 0)
[0:01:05.793706276] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pREE Score: 500 (best 0)
[0:01:05.793741608] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt pgEE Score: 500 (best 0)
[0:01:05.793776200] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt GRBG Score: 2500 (best 0)
[0:01:05.793811532] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt GBRG Score: 2500 (best 0)
[0:01:05.793846512] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt RGBO Score: 500 (best 0)
[0:01:05.793880956] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt Y10P Score: 500 (best 0)
[0:01:05.793915640] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt Y12P Score: 500 (best 0)
[0:01:05.793950787] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt Y14P Score: 500 (best 0)
[0:01:05.793985341] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt RGBP Score: 500 (best 0)
[0:01:05.794020136] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt RGBQ Score: 500 (best 0)
[0:01:05.794054857] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt RGBR Score: 500 (best 0)
[0:01:05.794089838] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt YVYU Score: 500 (best 0)
[0:01:05.794124892] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt YUYV Score: 500 (best 0)
[0:01:05.794158724] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt GREY Score: 2500 (best 0)
[0:01:05.794193575] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt VYUY Score: 500 (best 0)
[0:01:05.794228074] [1405]  INFO RPI raspberrypi.cpp:122 Mode: 2028x1520 fmt UYVY Score: 500 (best 0)
[0:01:05.794403124] [1405]  INFO RPI raspberrypi.cpp:620 Sensor: /base/soc/i2c0mux/i2c@1/imx477@1a - Selected mode: 2028x1520-pgCC
[0:01:05.796698122] [1405] ERROR IPARPI raspberrypi.cpp:539 Unable to find sensor control 0x009e0903
[0:01:05.796757787] [1405] ERROR IPARPI raspberrypi.cpp:351 Sensor control validation failed.
[0:01:05.796784878] [1405] ERROR RPI raspberrypi.cpp:1306 IPA configuration failed!
[0:01:05.796815470] [1405] ERROR RPI raspberrypi.cpp:757 Failed to configure the IPA: -32
Camera streams configured
Buffers allocated and mapped
Viewfinder setup complete
Requests created
[0:01:05.837515550] [1405] ERROR V4L2 v4l2_videodevice.cpp:1158 /dev/video1[17:cap]: Unable to request 4 buffers: Invalid argument
[0:01:05.837640916] [1405] ERROR RPI raspberrypi.cpp:817 Failed to allocate buffers
Closing Libcamera application(frames displayed 0, dropped 0)
Camera stopped!
Tearing down requests, buffers and configuration
Camera closed
And I just get a black window.

And when I execute libcamera-hello, I get this warning in dmesg.

Code: Select all

[   17.820993] ------------[ cut here ]------------
[   17.821032] WARNING: CPU: 0 PID: 944 at drivers/media/common/videobuf2/videobuf2-core.c:806 vb2_core_reqbufs+0x190/0x494 [videobuf2_common]
[   17.821039] Modules linked in: rfcomm cmac algif_hash aes_arm_bs crypto_simd cryptd algif_skcipher af_alg hci_uart btbcm bnep iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter imx477 8021q garp stp llc bluetooth ecdh_generic ecc snd_soc_hdmi_codec brcmfmac brcmutil cfg80211 rfkill vc4 cec bcm2835_unicam raspberrypi_hwmon v4l2_dv_timings v4l2_fwnode bcm2835_v4l2(C) v3d i2c_brcmstb i2c_mux_pinctrl gpu_sched i2c_mux bcm2835_codec(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) v4l2_mem2mem videobuf2_vmalloc i2c_bcm2835 videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc vc_sm_cma(C) drm_kms_helper snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm rpivid_mem snd_timer snd syscopyarea sysfillrect sysimgblt fb_sys_fops uio_pdrv_genirq uio nvmem_rmem i2c_dev drm drm_panel_orientation_quirks backlight fuse ip_tables x_tables ipv6
[   17.821496] CPU: 0 PID: 944 Comm: libcamera-still Tainted: G         C        5.10.89-v7l+ #1506
[   17.821500] Hardware name: BCM2711
[   17.821504] Backtrace: 
[   17.821522] [<c0b873e0>] (dump_backtrace) from [<c0b87774>] (show_stack+0x20/0x24)
[   17.821529]  r7:ffffffff r6:00000000 r5:60000013 r4:c12e6fd8
[   17.821537] [<c0b87754>] (show_stack) from [<c0b8bb54>] (dump_stack+0xcc/0xf8)
[   17.821546] [<c0b8ba88>] (dump_stack) from [<c0220d2c>] (__warn+0xfc/0x114)
[   17.821552]  r10:bf374474 r9:00000009 r8:bf290948 r7:00000326 r6:00000009 r5:bf290948
[   17.821557]  r4:bf293f90 r3:c1205094
[   17.821563] [<c0220c30>] (__warn) from [<c0b87ed4>] (warn_slowpath_fmt+0x70/0xd8)
[   17.821569]  r7:00000326 r6:bf293f90 r5:c1205048 r4:00000000
[   17.821583] [<c0b87e68>] (warn_slowpath_fmt) from [<bf290948>] (vb2_core_reqbufs+0x190/0x494 [videobuf2_common])
[   17.821589]  r9:bf2a6998 r8:c5d93e3c r7:c3a70a84 r6:ffffffea r5:c1205048 r4:c3a70a44
[   17.821608] [<bf2907b8>] (vb2_core_reqbufs [videobuf2_common]) from [<bf2168d4>] (vb2_ioctl_reqbufs+0x80/0xa8 [videobuf2_v4l2])
[   17.821614]  r10:bf374474 r9:bf2a6998 r8:c3a70ba4 r7:c5ba0cc0 r6:c3a70bb8 r5:00000000
[   17.821618]  r4:c5d93e3c
[   17.821663] [<bf216854>] (vb2_ioctl_reqbufs [videobuf2_v4l2]) from [<bf2a69e8>] (v4l_reqbufs+0x50/0x54 [videodev])
[   17.821668]  r7:bf374474 r6:c5d0d000 r5:c5ba0cc0 r4:c5d93e3c
[   17.821730] [<bf2a6998>] (v4l_reqbufs [videodev]) from [<bf2a71b4>] (__video_do_ioctl+0x234/0x460 [videodev])
[   17.821735]  r7:00000003 r6:c1205048 r5:c0145608 r4:c3a70bb8
[   17.821795] [<bf2a6f80>] (__video_do_ioctl [videodev]) from [<bf2a7bd8>] (video_usercopy+0x138/0x5f0 [videodev])
[   17.821801]  r10:00000000 r9:c5d93e3c r8:00000000 r7:c1205048 r6:00000000 r5:c0145608
[   17.821805]  r4:c0145608
[   17.821863] [<bf2a7aa0>] (video_usercopy [videodev]) from [<bf2a80b0>] (video_ioctl2+0x20/0x24 [videodev])
[   17.821869]  r10:0000000d r9:c5d92000 r8:00000000 r7:c5ba0cc0 r6:c5ba0cc1 r5:c1205048
[   17.821873]  r4:bf2a8090
[   17.821932] [<bf2a8090>] (video_ioctl2 [videodev]) from [<bf2a01f4>] (v4l2_ioctl+0x4c/0x60 [videodev])
[   17.821967] [<bf2a01a8>] (v4l2_ioctl [videodev]) from [<c045540c>] (sys_ioctl+0x1d4/0x8ec)
[   17.821972]  r5:c1205048 r4:c0145608
[   17.821980] [<c0455238>] (sys_ioctl) from [<c0200040>] (ret_fast_syscall+0x0/0x28)
[   17.821984] Exception stack(0xc5d93fa8 to 0xc5d93ff0)
[   17.821990] 3fa0:                   b1114478 b1110c68 0000000d c0145608 b1a6d3a4 0000000d
[   17.821996] 3fc0: b1114478 b1110c68 00000004 00000036 00000001 00000000 b1114334 006812f8
[   17.822000] 3fe0: b6ec1ff4 b1a6d38c b6e65bf4 b6b111ac
[   17.822006]  r10:00000036 r9:c5d92000 r8:c0200204 r7:00000036 r6:00000004 r5:b1110c68
[   17.822010]  r4:b1114478
[   17.822016] ---[ end trace 592759731a4618ff ]---
[   31.849815] cam-dummy-reg: disabling
[   31.849830] cam1-reg: disabling

naushir
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 179
Joined: Mon Apr 25, 2016 10:21 am

Re: libcamera stack does not work in Bullseye with the RasPi Camera V2 and the HQ Camera

Thu Jan 06, 2022 10:50 am

This looks like there is a mismatch between the kernel and libcamera pipeline handler:

Code: Select all

[0:01:05.790528493] [1405] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009e0901 but control is not exposed by device /dev/video0
[0:01:05.790615175] [1405] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x00980911 but control is not exposed by device /dev/video0
[0:01:05.790661229] [1405] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009e0903 but control is not exposed by device /dev/video0
The newer kernel drivers use the media controller API, but your libcamera libraries are expecting the older non-media controller API, see here for more details. Sadly, until we are able to push an update in apt (this is imminent), this mismatch is likely to occur.

You can fix this by forcing the kernel driver to use the old API by setting:

Code: Select all

dt-overlay=imx477,media-controller=0
in your config.txt file. You should not need to set cma or gpu_mem values either. Once an update is available on apt, you can remove the media-controller=0 clause.

bnc
Posts: 5
Joined: Tue Jan 04, 2022 2:33 pm

Re: libcamera stack does not work in Bullseye with the RasPi Camera V2 and the HQ Camera

Thu Jan 06, 2022 6:43 pm

It worked with your solution.
This is the content of the section all in the file /boot/config.txt now:

Code: Select all

camera_auto_detect=0
dtoverlay=imx477,media-controller=0
gpu_mem=256
dtoverlay=vc4-kms-v3d
The warning in dmesg is gone and the camera works with the libcamera stack.

Thanks a lot!!!

rusli
Posts: 60
Joined: Thu Feb 16, 2017 5:55 pm

Re: libcamera stack does not work in Bullseye with the RasPi Camera V2 and the HQ Camera

Sat Jan 08, 2022 6:17 am

I am having issues with the logitech 930e webcam camera on Chromium web browser version 95. It some how display an inverted web cam picture. That is a confirm bug. And goes the same to Firefox web browser. I cannot seems to see my face on a firefox to do face verification authentication with both web browser.

I am using Raspberry pi 4 with 8GB Ram with the current latest version of the Bullseye distro.

They have to fix this issues.

Return to “Camera board”