raspberrypi / rpicam-apps

BSD 2-Clause "Simplified" License
382 stars 212 forks source link

[BUG] Camera Module 3 not detected on RPi4b 4G Ubuntu 22.04 #551

Closed atticusrussell closed 11 months ago

atticusrussell commented 1 year ago

Describe the bug Camera module 3 on RPi 4b 4GB Ubuntu 22.04. (Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-1034-raspi aarch64)) Compiled libcamera and libcamera-apps but get the message "no cameras available". I have confirmed that this exact hardware functions when using Raspbian, where I can run libcamera.

Bug report report0.txt

I ran the bug report utility again as root to get dmesg info: report1.txt

Additional context

$ cat /boot/firmware/config.txt
[all]
kernel=vmlinuz
cmdline=cmdline.txt
initramfs initrd.img followkernel

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Enable the audio output, I2C and SPI interfaces on the GPIO header. As these
# parameters related to the base device-tree they must appear *before* any
# other dtoverlay= specification
dtparam=audio=on
dtparam=i2c_arm=on
dtparam=spi=on

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Comment out the following line if the edges of the desktop appear outside
# the edges of your display
disable_overscan=1

# If you have issues with audio, you may try uncommenting the following line
# which forces the HDMI output into HDMI mode instead of DVI (which doesn't
# support audio output)
#hdmi_drive=2

# Enable the serial pins
enable_uart=1

# Autoload overlays for any recognized cameras that are attached
# to the CSI port. Please note this is for libcamera support, *not* for
# the legacy camera stack
camera_auto_detect=1
# dtoverlay=imx708
# start_x=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Config settings specific to arm64
arm_64bit=1
dtoverlay=dwc2

# Display on fan hat
dtoverlay=gpio-fan,gpiopin=14,temp=60000
gpu_mem=128

# add pi shutdown switch (manual tweak)
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up,debounce=1000

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable the USB2 outputs on the IO board (assuming your CM4 is plugged into
# such a board)
dtoverlay=dwc2,dr_mode=host
$ sudo dtparam i2c_vc

$ sudo modprobe i2c-dev

$ sudo i2cdetect -y 10
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --    

I have a hat connected to gpio with a fan and an OLED display that communicates over I2c (may be relevant). https://github.com/geeekpi/RPiFEBP https://www.amazon.com/GeeekPi-Raspberr ... B09MVL8BWQ

Note

by adding the line start_x=1 to /boot/firmware/config.txt i can get the camera to be detected by v4l and to show up as /dev/video0, but not to work with libcamera:

$ libcamera-hello 
ERROR: the system appears to be configured for the legacy camera stack
$ v4l2-ctl --all
Driver Info:
    Driver name      : bm2835 mmal
    Card type        : mmal service 16.1
    Bus info         : platform:bcm2835-v4l2-0
    Driver version   : 5.15.99
    Capabilities     : 0x85200005
        Video Capture
        Video Overlay
        Read/Write
        Streaming
        Extended Pix Format
        Device Capabilities
    Device Caps      : 0x05200005
        Video Capture
        Video Overlay
        Read/Write
        Streaming
        Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: ok)
Format Video Capture:
    Width/Height      : 1024/768
    Pixel Format      : 'JPEG' (JFIF JPEG)
    Field             : None
    Bytes per Line    : 0
    Size Image        : 786432
    Colorspace        : JPEG
    Transfer Function : Default (maps to sRGB)
    YCbCr/HSV Encoding: Default (maps to ITU-R 601)
    Quantization      : Default (maps to Full Range)
    Flags             : 
Format Video Overlay:
    Left/Top    : 150/50
    Width/Height: 1024/768
    Field       : None
    Chroma Key  : 0x00000000
    Global Alpha: 0xff
    Clip Count  : 0
    Clip Bitmap : No
Framebuffer Format:
    Capability    : Extern Overlay
            Global Alpha
    Flags         : Overlay Matches Capture/Output Size
    Width         : 1024
    Height        : 768
    Pixel Format  : 'YU12'
Streaming Parameters Video Capture:
    Capabilities     : timeperframe
    Frames per second: 30.000 (30000/1000)
    Read buffers     : 1

User Controls

                     brightness 0x00980900 (int)    : min=0 max=100 step=1 default=50 value=50 flags=slider
                       contrast 0x00980901 (int)    : min=-100 max=100 step=1 default=0 value=0 flags=slider
                     saturation 0x00980902 (int)    : min=-100 max=100 step=1 default=0 value=0 flags=slider
                    red_balance 0x0098090e (int)    : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
                   blue_balance 0x0098090f (int)    : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
                horizontal_flip 0x00980914 (bool)   : default=0 value=0
                  vertical_flip 0x00980915 (bool)   : default=0 value=0
           power_line_frequency 0x00980918 (menu)   : min=0 max=3 default=1 value=1 (50 Hz)
                0: Disabled
                1: 50 Hz
                2: 60 Hz
                3: Auto
                      sharpness 0x0098091b (int)    : min=-100 max=100 step=1 default=0 value=0 flags=slider
                  color_effects 0x0098091f (menu)   : min=0 max=15 default=0 value=0 (None)
                0: None
                1: Black & White
                2: Sepia
                3: Negative
                4: Emboss
                5: Sketch
                6: Sky Blue
                7: Grass Green
                8: Skin Whiten
                9: Vivid
                10: Aqua
                11: Art Freeze
                12: Silhouette
                13: Solarization
                14: Antique
                15: Set Cb/Cr
                         rotate 0x00980922 (int)    : min=0 max=360 step=90 default=0 value=0 flags=modify-layout
             color_effects_cbcr 0x0098092a (int)    : min=0 max=65535 step=1 default=32896 value=32896

Codec Controls

             video_bitrate_mode 0x009909ce (menu)   : min=0 max=1 default=0 value=0 (Variable Bitrate) flags=update
                0: Variable Bitrate
                1: Constant Bitrate
                  video_bitrate 0x009909cf (int)    : min=25000 max=25000000 step=25000 default=10000000 value=10000000
         repeat_sequence_header 0x009909e2 (bool)   : default=0 value=0
                force_key_frame 0x009909e5 (button) : value=0 flags=write-only, execute-on-write
          h264_minimum_qp_value 0x00990a61 (int)    : min=0 max=51 step=1 default=0 value=0
          h264_maximum_qp_value 0x00990a62 (int)    : min=0 max=51 step=1 default=0 value=0
            h264_i_frame_period 0x00990a66 (int)    : min=0 max=2147483647 step=1 default=60 value=60
                     h264_level 0x00990a67 (menu)   : min=0 max=13 default=11 value=11 (4)
                0: 1
                1: 1b
                2: 1.1
                3: 1.2
                4: 1.3
                5: 2
                6: 2.1
                7: 2.2
                8: 3
                9: 3.1
                10: 3.2
                11: 4
                12: 4.1
                13: 4.2
                   h264_profile 0x00990a6b (menu)   : min=0 max=4 default=4 value=4 (High)
                0: Baseline
                1: Constrained Baseline
                2: Main
                4: High

Camera Controls

                  auto_exposure 0x009a0901 (menu)   : min=0 max=3 default=0 value=0 (Auto Mode)
                0: Auto Mode
                1: Manual Mode
         exposure_time_absolute 0x009a0902 (int)    : min=1 max=10000 step=1 default=1000 value=1000
     exposure_dynamic_framerate 0x009a0903 (bool)   : default=0 value=0
             auto_exposure_bias 0x009a0913 (intmenu): min=0 max=24 default=12 value=12 (0 0x0)
                0: -4000 (0xfffffffffffff060)
                1: -3667 (0xfffffffffffff1ad)
                2: -3333 (0xfffffffffffff2fb)
                3: -3000 (0xfffffffffffff448)
                4: -2667 (0xfffffffffffff595)
                5: -2333 (0xfffffffffffff6e3)
                6: -2000 (0xfffffffffffff830)
                7: -1667 (0xfffffffffffff97d)
                8: -1333 (0xfffffffffffffacb)
                9: -1000 (0xfffffffffffffc18)
                10: -667 (0xfffffffffffffd65)
                11: -333 (0xfffffffffffffeb3)
                12: 0 (0x0)
                13: 333 (0x14d)
                14: 667 (0x29b)
                15: 1000 (0x3e8)
                16: 1333 (0x535)
                17: 1667 (0x683)
                18: 2000 (0x7d0)
                19: 2333 (0x91d)
                20: 2667 (0xa6b)
                21: 3000 (0xbb8)
                22: 3333 (0xd05)
                23: 3667 (0xe53)
                24: 4000 (0xfa0)
      white_balance_auto_preset 0x009a0914 (menu)   : min=0 max=10 default=1 value=1 (Auto)
                0: Manual
                1: Auto
                2: Incandescent
                3: Fluorescent
                4: Fluorescent H
                5: Horizon
                6: Daylight
                7: Flash
                8: Cloudy
                9: Shade
                10: Greyworld
            image_stabilization 0x009a0916 (bool)   : default=0 value=0
                iso_sensitivity 0x009a0917 (intmenu): min=0 max=4 default=0 value=0 (0 0x0)
                0: 0 (0x0)
                1: 100000 (0x186a0)
                2: 200000 (0x30d40)
                3: 400000 (0x61a80)
                4: 800000 (0xc3500)
           iso_sensitivity_auto 0x009a0918 (menu)   : min=0 max=1 default=1 value=1 (Auto)
                0: Manual
                1: Auto
         exposure_metering_mode 0x009a0919 (menu)   : min=0 max=3 default=0 value=0 (Average)
                0: Average
                1: Center Weighted
                2: Spot
                3: Matrix
                     scene_mode 0x009a091a (menu)   : min=0 max=13 default=0 value=0 (None)
                0: None
                8: Night
                11: Sports

JPEG Compression Controls

            compression_quality 0x009d0903 (int)    : min=1 max=100 step=1 default=30 value=30
$ cat /boot/firmware/config.txt
[all]
kernel=vmlinuz
cmdline=cmdline.txt
initramfs initrd.img followkernel

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Enable the audio output, I2C and SPI interfaces on the GPIO header. As these
# parameters related to the base device-tree they must appear *before* any
# other dtoverlay= specification
dtparam=audio=on
dtparam=i2c_arm=on
dtparam=spi=on

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Comment out the following line if the edges of the desktop appear outside
# the edges of your display
disable_overscan=1

# If you have issues with audio, you may try uncommenting the following line
# which forces the HDMI output into HDMI mode instead of DVI (which doesn't
# support audio output)
#hdmi_drive=2

# Enable the serial pins
enable_uart=1

# Autoload overlays for any recognized cameras that are attached
# to the CSI port. Please note this is for libcamera support, *not* for
# the legacy camera stack
camera_auto_detect=1
start_x=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Config settings specific to arm64
arm_64bit=1
dtoverlay=dwc2

# Display on fan hat
dtoverlay=gpio-fan,gpiopin=14,temp=60000
gpu_mem=128

# add pi shutdown switch (manual tweak)
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up,debounce=1000

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable the USB2 outputs on the IO board (assuming your CM4 is plugged into
# such a board)
dtoverlay=dwc2,dr_mode=host
6by9 commented 1 year ago

Adding start_x=1 is a dead end as Camera Module 3 is not supported by the legacy stack. It'll identify, but will never work.

Raspberry Pi don't control the Ubuntu kernel builds. Are the relevant modules built? modinfo imx708 and modinfo dw9807-vcm. Does imx708.dtbo exist in /boot/overlays (or whatever the Ubuntu equivalent is)?

sudo vclog -m from https://github.com/raspberrypi/utils/tree/master/vclog can read the firmware logs on systems which don't have vcdbg. That should tell you if the firmware has failed to apply the overlay for whatever reason.

atticusrussell commented 1 year ago

First, thank you @6by9 for your help. TLDR it appears I'm missing those modules. Not sure if I'd have to build a new kernel or something.

Following are the results of those commands:

atticus@rospi:~  
$ modinfo imx708
modinfo: ERROR: Module imx708 not found.
atticus@rospi:~  
$ modinfo dw9807-vcm
modinfo: ERROR: Module dw9807-vcm not found.
atticus@rospi:~  
$ ls /boot/firmware/overlays/im*
/boot/firmware/overlays/imx219.dtbo      /boot/firmware/overlays/imx296.dtbo.bak
/boot/firmware/overlays/imx219.dtbo.bak  /boot/firmware/overlays/imx378.dtbo
/boot/firmware/overlays/imx258.dtbo      /boot/firmware/overlays/imx378.dtbo.bak
/boot/firmware/overlays/imx258.dtbo.bak  /boot/firmware/overlays/imx477.dtbo
/boot/firmware/overlays/imx290.dtbo      /boot/firmware/overlays/imx477.dtbo.bak
/boot/firmware/overlays/imx290.dtbo.bak  /boot/firmware/overlays/imx519.dtbo
/boot/firmware/overlays/imx296.dtbo      /boot/firmware/overlays/imx519.dtbo.bak

I was only able to get "bus error" from vclog, but I have included my install process in hopes there is some error I made.

atticus@rospi:~/github  
$ git clone git@github.com:raspberrypi/utils.git
Cloning into 'utils'...
remote: Enumerating objects: 399, done.
remote: Counting objects: 100% (178/178), done.
remote: Compressing objects: 100% (95/95), done.
remote: Total 399 (delta 113), reused 127 (delta 83), pack-reused 221
Receiving objects: 100% (399/399), 150.38 KiB | 4.30 MiB/s, done.
Resolving deltas: 100% (201/201), done.

atticus@rospi:~/github  
$ cd utils/

atticus@rospi:~/github/utils  (master) 
$ mkdir build

atticus@rospi:~/github/utils  (master) 
$ cd build/

atticus@rospi:~/github/utils/build  (master) 
$ cmake ..
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/atticus/github/utils/build

atticus@rospi:~/github/utils/build  (master) 
$ make
[ 20%] Building C object dtmerge/CMakeFiles/dtmerge.dir/dtmerge.c.o
/home/atticus/github/utils/dtmerge/dtmerge.c:30:10: fatal error: libfdt.h: No such file or directory
   30 | #include <libfdt.h>
      |          ^~~~~~~~~~
compilation terminated.
make[2]: *** [dtmerge/CMakeFiles/dtmerge.dir/build.make:76: dtmerge/CMakeFiles/dtmerge.dir/dtmerge.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:188: dtmerge/CMakeFiles/dtmerge.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

atticus@rospi:~/github/utils/build  (master) 
$ sudo apt install libfdt-dev

atticus@rospi:~/github/utils/build  (master) 
$ make

atticus@rospi:~/github/utils/build  (master) 
$ sudo ./vclog/vclog -m
Bus error
atticusrussell commented 1 year ago

I successfully recompiled the linux kernel and enabled imx708.

atticus@rospi:~  
$ modinfo imx708
filename:       /lib/modules/5.15.0-1035-raspi/kernel/drivers/media/i2c/imx708.ko
license:        GPL v2
description:    Sony IMX708 sensor driver
author:         David Plowman <david.plowman@raspberrypi.com>
srcversion:     51A9A1F441F97D6CA01D94F
alias:          of:N*T*Csony,imx708C*
alias:          of:N*T*Csony,imx708
depends:        videodev,v4l2-fwnode,mc,v4l2-async
intree:         Y
name:           imx708
vermagic:       5.15.0-1035-raspi SMP preempt mod_unload modversions aarch64
sig_id:         PKCS#7
signer:         Build time autogenerated kernel key
sig_key:        6E:9D:24:04:B5:FA:5E:1E:32:88:94:0F:6C:17:E8:79:D9:3F:13:00
sig_hashalgo:   sha512
signature:      27:62:F1:95:1C:D5:09:0F:A0:CF:E4:E5:81:BB:B9:9A:73:9B:2D:46:
        9A:59:DF:FB:67:AF:61:BF:CC:78:43:6A:75:D6:6A:90:A6:98:03:4D:
        40:11:18:B3:BE:95:BE:7E:2C:12:7F:99:59:96:6E:BD:28:37:2C:0F:
        CC:76:CC:48:90:E6:5B:B5:35:85:E5:E4:5F:2C:12:0D:D2:A6:37:B5:
        66:EC:5A:6D:A8:12:8A:98:38:9C:E7:B6:03:47:15:B7:FA:0C:2F:96:
        7A:2B:8B:7E:3B:1C:8F:7F:61:28:23:7E:94:17:A0:33:7D:BA:53:6F:
        16:0F:DB:9D:E0:C9:01:DB:B8:23:49:FE:31:A6:89:1E:12:63:19:AD:
        47:78:7B:4D:1A:DE:EE:46:8A:A6:B7:77:DB:46:68:25:87:3D:B8:E6:
        E3:41:3F:AF:57:9A:84:BC:43:95:6B:E2:03:8F:10:62:9D:C0:FF:61:
        09:E5:95:29:C2:AA:B8:E9:4D:95:88:85:CB:C2:C1:8B:E0:67:B9:64:
        70:8C:02:F7:8D:97:C1:CD:32:80:3D:BA:30:61:97:32:ED:D7:0D:38:
        53:98:D9:6C:C6:0A:67:88:93:67:EE:E8:67:27:3A:08:68:24:C9:38:
        29:81:72:84:E5:2D:D1:6A:32:5E:95:63:87:C4:65:74:92:37:D8:84:
        0D:D4:69:94:56:59:0F:50:EB:AC:B5:3E:AA:88:1B:02:20:BF:C2:85:
        05:9D:CF:2D:38:8E:DC:FF:E4:5C:D3:48:56:F8:FE:67:42:6C:3F:25:
        7E:52:14:CA:31:5D:6C:CA:A9:08:A6:FF:C3:6D:8F:92:E3:D1:91:B5:
        A8:0E:ED:AC:36:93:02:6A:81:D6:0F:80:F4:D4:12:1B:69:39:9E:8B:
        FE:08:BB:96:B2:45:B6:ED:49:26:35:38:9C:89:E1:A3:5B:F0:1D:B0:
        B1:E0:42:FB:63:0E:8E:DD:D5:D1:36:EE:A9:CD:3E:5E:93:74:03:C5:
        6A:80:ED:E5:E3:56:A5:BA:09:D5:D8:8F:D4:50:A4:EB:B5:70:2C:1C:
        CB:99:9A:EA:5C:BB:8A:4F:51:9E:C3:0B:52:13:29:8B:86:79:EB:B7:
        06:87:DE:05:21:6C:57:C6:FD:45:EE:44:70:2E:00:CD:0B:EB:19:2B:
        F0:34:E4:42:88:BE:75:EE:35:34:F8:89:7E:C1:80:3C:55:5F:20:A8:
        3B:A3:E4:00:10:76:DE:8E:61:6D:F6:E7:67:A4:BE:5A:03:73:EE:AD:
        D6:EC:D5:71:EF:4E:BE:70:16:32:C9:78:2A:35:02:C9:14:47:61:0A:
        34:3E:6D:A0:4A:1D:35:6D:C9:6E:99:F9

however I forgot to make sure dw9807-vcm was enabled

atticus@rospi:~  
$ modinfo dw9807-vcm
modinfo: ERROR: Module dw9807-vcm not found.

and imx708.dtbo still doesn't exist as an overlay, so I'm gonna need to work on that (can likely also copy from an rpi repo).

atticusrussell commented 1 year ago

@6by9 I recompiled the kernel again and this time added the imx708 dtbo and the dw9807-vcm, but am running into the same issue. any ideas?

atticus@rospi:~  
$ modinfo dw9807-vcm
filename:       /lib/modules/5.15.0-1035-raspi/kernel/drivers/media/i2c/dw9807-vcm.ko
license:        GPL v2
description:    DW9807 VCM driver
author:         Chiang, Alan
srcversion:     E09A567F71350C88CB79109
alias:          of:N*T*Cdongwoon,dw9807-vcmC*
alias:          of:N*T*Cdongwoon,dw9807-vcm
depends:        v4l2-async,mc,videodev
intree:         Y
name:           dw9807_vcm
vermagic:       5.15.0-1035-raspi SMP preempt mod_unload modversions aarch64
sig_id:         PKCS#7
signer:         Build time autogenerated kernel key
sig_key:        36:2D:70:E4:AC:D8:C0:CA:1C:4A:D6:84:E1:AD:C7:FD:00:F3:06:F9
sig_hashalgo:   sha512
signature:      AF:19:A3:93:9F:53:6D:7B:EC:CE:93:EF:F5:6C:4A:B6:85:B0:C0:23:
        53:27:77:69:1A:2B:2D:88:51:DD:A9:2A:AA:0B:28:AC:26:32:7B:53:
        3B:92:9D:18:9D:9B:16:21:82:98:CE:E9:13:D6:B0:02:49:FA:DE:7F:
        72:D1:36:2B:FF:87:AD:F9:52:2F:EA:5A:CD:43:DE:09:6C:DC:0F:29:
        84:56:74:A9:02:3C:B7:11:BA:7A:1C:49:63:54:6B:E9:88:9A:E3:33:
        D3:4A:F1:C6:7C:4C:01:83:F9:C0:46:A1:61:9E:C8:1C:7C:BE:E2:AD:
        8F:AC:CC:DA:D5:37:CD:95:04:6B:E0:F4:2B:3D:EB:14:8A:07:89:B3:
        20:D8:AF:7A:A4:B3:5E:15:B8:EE:44:4D:E7:F1:A9:7D:1C:9E:08:99:
        42:53:64:C5:E2:F9:C7:77:FC:37:50:9F:B6:FE:4B:25:0D:AD:2A:04:
        99:ED:B2:AE:A6:C1:49:B7:6F:D3:11:30:08:27:5D:C9:01:B8:D6:A1:
        53:4C:44:38:EF:0E:A5:A4:CB:2C:C8:70:D3:90:A9:E0:9D:EC:76:C2:
        39:93:1F:B6:A3:E7:06:C0:BF:3E:75:F9:88:8B:CB:99:2A:7B:8D:74:
        F1:B3:A4:95:7A:FC:FB:7E:C9:0F:F8:2A:4A:44:B2:90:70:0E:8D:FC:
        17:DD:F9:73:32:08:E9:34:D5:30:02:00:4A:88:43:00:67:C1:46:28:
        1E:8D:3D:E3:29:69:2D:6B:FA:3F:93:3F:A7:7A:D2:66:70:D0:4A:85:
        BB:D3:1A:B8:FF:D7:FA:4C:23:EA:0A:FA:55:73:DE:17:68:11:4E:B1:
        0D:E8:95:87:54:34:C5:0A:25:50:44:79:ED:7F:B1:44:E5:88:F4:BD:
        B5:79:DE:68:73:69:EC:8F:83:A6:FE:00:38:5C:FD:5A:A3:8A:83:F0:
        48:54:1F:94:53:89:66:9C:BC:CE:C4:F4:81:98:4A:6A:29:84:43:5A:
        06:E9:CA:14:E2:71:C0:68:75:F8:FF:0C:33:34:78:FC:E3:CB:7A:1F:
        C6:22:D6:A9:23:3D:7A:C4:CC:66:59:CC:49:E7:DA:0D:D5:B7:25:D5:
        76:BB:CC:A7:66:36:0E:13:19:1C:EA:C7:8E:4F:5E:70:0F:E5:F5:81:
        29:4E:83:49:31:FB:69:C2:0F:60:FB:B1:B7:6A:EC:A0:28:7A:D4:46:
        A1:FC:E3:13:38:EF:D0:0A:C3:47:39:0B:12:B7:A7:FB:02:8A:82:49:
        D1:D7:BD:B4:06:9E:1A:FE:0C:4C:C6:78:63:7E:DE:35:6C:A8:0F:FD:
        4C:0B:29:E0:C3:69:3E:15:95:56:D2:42
atticus@rospi:~  
$ ls /boot/firmware/overlays/imx*
/boot/firmware/overlays/imx219.dtbo      /boot/firmware/overlays/imx378.dtbo
/boot/firmware/overlays/imx219.dtbo.bak  /boot/firmware/overlays/imx378.dtbo.bak
/boot/firmware/overlays/imx258.dtbo      /boot/firmware/overlays/imx477.dtbo
/boot/firmware/overlays/imx258.dtbo.bak  /boot/firmware/overlays/imx477.dtbo.bak
/boot/firmware/overlays/imx290.dtbo      /boot/firmware/overlays/imx519.dtbo
/boot/firmware/overlays/imx290.dtbo.bak  /boot/firmware/overlays/imx519.dtbo.bak
/boot/firmware/overlays/imx296.dtbo      /boot/firmware/overlays/imx708.dtbo
/boot/firmware/overlays/imx296.dtbo.bak
atticus@rospi:~  
$ modinfo imx708
filename:       /lib/modules/5.15.0-1035-raspi/kernel/drivers/media/i2c/imx708.ko
license:        GPL v2
description:    Sony IMX708 sensor driver
author:         David Plowman <david.plowman@raspberrypi.com>
srcversion:     51A9A1F441F97D6CA01D94F
alias:          of:N*T*Csony,imx708C*
alias:          of:N*T*Csony,imx708
depends:        videodev,v4l2-fwnode,mc,v4l2-async
intree:         Y
name:           imx708
vermagic:       5.15.0-1035-raspi SMP preempt mod_unload modversions aarch64
sig_id:         PKCS#7
signer:         Build time autogenerated kernel key
sig_key:        36:2D:70:E4:AC:D8:C0:CA:1C:4A:D6:84:E1:AD:C7:FD:00:F3:06:F9
sig_hashalgo:   sha512
signature:      6E:19:23:FD:BD:1A:2A:AC:83:08:C2:3E:24:4E:15:58:9D:56:D0:55:
        89:F9:E3:17:1D:9E:C4:95:2E:37:DF:01:64:A3:86:DF:CE:27:93:BC:
        72:CD:9E:42:23:3F:66:B6:8E:BF:5F:31:FC:A4:BA:F8:38:9D:AA:B6:
        D6:94:23:2D:19:B3:47:54:83:4A:6F:AB:5F:44:7B:40:F8:C8:AC:23:
        83:C3:C9:44:12:A0:7F:E4:A0:99:24:16:42:40:6F:65:A5:E0:9A:4B:
        94:E4:17:1D:3F:C3:B7:64:A6:43:D0:90:69:94:E6:D5:D0:A4:68:3A:
        40:C5:5B:89:0E:9C:48:FB:5F:00:AF:FB:B1:4A:DA:8D:BD:BC:3E:6A:
        CF:A3:F0:42:D9:20:C7:26:61:CA:91:DC:1D:52:26:2C:27:75:80:BC:
        5E:3C:B2:AE:3E:AC:BB:07:FA:91:BA:9E:0E:36:E3:51:C2:F1:87:07:
        F5:9A:52:79:4A:A5:AD:2D:96:7E:BB:CE:3F:9D:EB:F6:14:67:F3:60:
        41:C4:A9:D3:FE:A4:81:40:EA:B2:47:9A:8B:70:80:75:60:3B:8C:2D:
        DC:40:87:6B:D2:98:1D:00:55:BE:B9:D2:89:0B:46:D1:FA:D2:E0:32:
        AD:A2:AF:03:7C:51:6E:7B:BF:B3:9C:BC:30:E0:2D:F3:E1:D5:CB:E1:
        4F:AF:AC:B2:D5:BC:82:29:2C:8B:8A:BC:3A:92:53:DA:A4:9D:2D:23:
        C9:EF:00:B0:49:52:F5:A0:AD:44:97:73:3E:62:C6:F8:38:C8:4F:C5:
        2D:F3:0F:C3:D2:B6:6D:DA:9C:10:A4:62:BE:F5:E6:3F:E6:5F:60:96:
        D6:70:16:6F:94:F7:80:94:A4:B6:DE:17:E2:B5:BA:41:27:93:5B:59:
        37:09:00:EA:DC:26:21:F4:CC:0E:03:24:FE:43:50:59:91:1A:89:44:
        95:6A:5D:90:12:61:94:BF:E0:CC:AA:B0:C8:69:88:00:A8:15:62:6F:
        04:80:91:BF:A5:13:73:FF:97:10:14:11:1A:1A:24:73:C0:AD:2F:E7:
        CB:A2:D7:D0:2C:76:F4:09:3D:D5:70:AD:48:22:BD:75:8E:43:B0:19:
        77:F1:F1:53:10:73:08:46:37:B1:B0:91:9C:46:C9:AD:1F:65:54:72:
        4F:EE:DD:05:E3:5C:E4:84:D4:4F:3F:B3:BE:51:3C:15:42:66:B5:CF:
        D7:E0:4D:10:A9:95:91:9D:5A:96:B0:81:43:72:28:C4:07:4D:99:50:
        38:0E:DD:3E:8F:53:9C:7D:40:07:D3:05:5E:55:73:B7:1A:E7:EF:74:
        52:D6:FE:78:B9:1F:62:77:47:95:74:28
atticus@rospi:~  
$ libcamera-hello 
Preview window unavailable
[0:01:29.796286333] [1656]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0+19-960d0c1e
ERROR: *** no cameras available ***

atticus@rospi:~  
$ cat /boot/firmware/config.txt
[all]
kernel=vmlinuz
cmdline=cmdline.txt
initramfs initrd.img followkernel

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Enable the audio output, I2C and SPI interfaces on the GPIO header. As these
# parameters related to the base device-tree they must appear *before* any
# other dtoverlay= specification
dtparam=audio=on
dtparam=i2c_arm=on
dtparam=spi=on

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Comment out the following line if the edges of the desktop appear outside
# the edges of your display
disable_overscan=1

# If you have issues with audio, you may try uncommenting the following line
# which forces the HDMI output into HDMI mode instead of DVI (which doesn't
# support audio output)
#hdmi_drive=2

# Enable the serial pins
enable_uart=1

# Autoload overlays for any recognized cameras that are attached
# to the CSI port. Please note this is for libcamera support, *not* for
# the legacy camera stack
camera_auto_detect=1

l Automatically load overlays for detected DSI displays
display_auto_detect=1

# Config settings specific to arm64
arm_64bit=1
dtoverlay=dwc2

# Display on fan hat
dtoverlay=gpio-fan,gpiopin=14,temp=60000
gpu_mem=128

# add pi shutdown switch (manual tweak)
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up,debounce=1000

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable the USB2 outputs on the IO board (assuming your CM4 is plugged into
# such a board)
dtoverlay=dwc2,dr_mode=host
atticusrussell commented 1 year ago

A bit of progress!! With the modified/recompiled kernel I manually specified the camera in /boot/firmware/config.txt and got this error:

atticus@rospi:~  
$ libcamera-hello 
Preview window unavailable
[0:01:17.528089267] [1548]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0+19-960d0c1e
[0:01:17.568858211] [1549] ERROR V4L2 v4l2_device.cpp:93 'imx708': Failed to open V4L2 device '': No such file or directory
[0:01:17.568991952] [1549] ERROR RPI vc4.cpp:209 Failed to register camera imx708: -22
ERROR: *** no cameras available ***
atticus@rospi:~  
$ cat /boot/firmware/config.txt
[all]
kernel=vmlinuz
cmdline=cmdline.txt
initramfs initrd.img followkernel

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Enable the audio output, I2C and SPI interfaces on the GPIO header. As these
# parameters related to the base device-tree they must appear *before* any
# other dtoverlay= specification
dtparam=audio=on
dtparam=i2c_arm=on
dtparam=spi=on

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Comment out the following line if the edges of the desktop appear outside
# the edges of your display
disable_overscan=1

# If you have issues with audio, you may try uncommenting the following line
# which forces the HDMI output into HDMI mode instead of DVI (which doesn't
# support audio output)
#hdmi_drive=2

# Enable the serial pins
enable_uart=1

# Autoload overlays for any recognized cameras that are attached
# to the CSI port. Please note this is for libcamera support, *not* for
# the legacy camera stack
camera_auto_detect=0
dtoverlay=imx708

l Automatically load overlays for detected DSI displays
display_auto_detect=1

# Config settings specific to arm64
arm_64bit=1
dtoverlay=dwc2

# Display on fan hat
dtoverlay=gpio-fan,gpiopin=14,temp=60000
gpu_mem=128

# add pi shutdown switch (manual tweak)
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up,debounce=1000

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable the USB2 outputs on the IO board (assuming your CM4 is plugged into
# such a board)
dtoverlay=dwc2,dr_mode=host

not sure if maybe something is still lacking in the kernel or if it might be a simpler config error here.

SachetK commented 1 year ago

camera_auto_detect should be set to 1 to enable libcamera support (I believe).

atticusrussell commented 1 year ago

@SachetK my previous post was unclear, I have now edited it to indicate that I initially tried with camera_auto_detect=1 and then when that resulted in no cameras available I changed it to manually specifying the camera

naushir commented 1 year ago

That suggests the sensor probed correctly, but the device driver could not be opened for some reason.

@atticusrussell do you see any error messages in dmesg after boot related to the imx708? Also does the following command successfully give an output:

v4l2-ctl -d /dev/v4l-subdev0 --list-subdev-mbus-codes

?

Also, could you run camera-bug-report and attach the output again after your changes to get probe working?

Another thing to try is to see if another camera works in your environment. Do you have another Raspberry Pi camera that you could use?

6by9 commented 1 year ago

I'd guess that the media controller node has been created, but due to some dependent device not having probed the /dev/videoN node hasn't been registered. I can recreate that by blacklisting dw9807_vcm (I happen to be on a 6.5 kernel here, but that shouldn't matter):

pi@raspberrypi:~ $ media-ctl -p -d 4
Media controller API version 6.5.0

Media device information
------------------------
driver          unicam
model           unicam
serial          
bus info        platform:fe801000.csi
hw revision     0x0
driver version  6.5.0

Device topology
- entity 1: imx708 (2 pads, 0 link)
            type V4L2 subdev subtype Sensor flags 0
    pad0: Source
    pad1: Source
pi@raspberrypi:~ $  sudo cat /sys/kernel/debug/v4l2-async/pending_async_subdevices 
imx708:
 [fwnode] dev=10-000c, node=/soc/i2c0mux/i2c@1/dw9817@c
unicam fe801000.csi:

ie the imx708 node is waiting for dw9817 to enumerate. /dev/video0 doesn't exist until all dependencies are met, which calls unicam_async_complete and that registers the /dev/videoN nodes.

atticusrussell commented 1 year ago

@naushir the following is the output of bug-report (with the later mentioned USB HD web camera disconnected for simplicity): bugreport3.txt

atticus@rospi:~  
$ v4l2-ctl -d /dev/v4l-subdev0 --list-subdev-mbus-codes
Cannot open device /dev/v4l-subdev0, exiting.

The output of searching dmesg for the sensor only results in the name of the kernel that I modified (not predicting that it would show up as a false positive in dmesg when picking the name)

atticus@rospi:~  
$ dmesg | grep imx708
[    0.000000] Linux version 5.15.0-1035-raspi (root@dev-5587) (aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #38+imx708dw9807~20230815 SMP PREEMPT Tue Aug 15 23:04:05 EDT 20 (Ubuntu 5.15.0-1035.38+imx708dw9807~20230815-raspi 5.15.111)

I found a generic USB "HD Webcam" without branding on it that works on my pi with libcamera. Here is the output of dmesg (nothing grepped) with it connected, as well as the non-working RPi Camera Module 3 connected

atticus@rospi:~  
$ dmesg 
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[    0.000000] Linux version 5.15.0-1035-raspi (root@dev-5587) (aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #38+imx708dw9807~20230815 SMP PREEMPT Tue Aug 15 23:04:05 EDT 20 (Ubuntu 5.15.0-1035.38+imx708dw9807~20230815-raspi 5.15.111)
[    0.000000] random: crng init done
[    0.000000] Machine model: Raspberry Pi 4 Model B Rev 1.1
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000016000000, size 320 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000]   DMA32    [mem 0x0000000040000000-0x00000000fbffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000037ffffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x00000000fbffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000fbffffff]
[    0.000000] On node 0, zone DMA32: 16384 pages in unavailable ranges
[    0.000000] percpu: Embedded 29 pages/cpu s80472 r8192 d30120 u118784
[    0.000000] pcpu-alloc: s80472 r8192 d30120 u118784 alloc=29*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: detected: Spectre-v2
[    0.000000] CPU features: detected: Spectre-v3a
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: ARM erratum 1742098
[    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 983808
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1  smsc95xx.macaddr=DC:A6:32:19:5D:BE vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc quiet splash
[    0.000000] Unknown kernel command line parameters "fixrtc splash", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x0000000034000000-0x0000000038000000] (64MB)
[    0.000000] Memory: 3415444K/3997696K available (14272K kernel code, 2666K rwdata, 5188K rodata, 5760K init, 878K bss, 254572K reserved, 327680K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 44164 entries in 173 pages
[    0.000000] ftrace: allocated 173 pages with 5 groups
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 10)
[    0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[    0.000001] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[    0.000330] Console: colour dummy device 80x25
[    0.000385] printk: console [tty1] enabled
[    0.000449] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000)
[    0.000475] pid_max: default: 32768 minimum: 301
[    0.000690] LSM: Security Framework initializing
[    0.000744] Yama: becoming mindful.
[    0.000844] AppArmor: AppArmor initialized
[    0.001086] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.001148] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.004681] rcu: Hierarchical SRCU implementation.
[    0.006347] EFI services will not be available.
[    0.007273] smp: Bringing up secondary CPUs ...
[    0.008448] Detected PIPT I-cache on CPU1
[    0.008523] CPU1: Booted secondary processor 0x0000000001 [0x410fd083]
[    0.009793] Detected PIPT I-cache on CPU2
[    0.009847] CPU2: Booted secondary processor 0x0000000002 [0x410fd083]
[    0.011037] Detected PIPT I-cache on CPU3
[    0.011089] CPU3: Booted secondary processor 0x0000000003 [0x410fd083]
[    0.011252] smp: Brought up 1 node, 4 CPUs
[    0.011273] SMP: Total of 4 processors activated.
[    0.011285] CPU features: detected: 32-bit EL0 Support
[    0.011294] CPU features: detected: 32-bit EL1 Support
[    0.011306] CPU features: detected: CRC32 instructions
[    0.011644] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.041516] CPU: All CPU(s) started at EL2
[    0.041590] alternatives: patching kernel code
[    0.043241] devtmpfs: initialized
[    0.054119] Enabled cp15_barrier support
[    0.054157] Enabled setend support
[    0.054187] KASLR enabled
[    0.054411] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.054445] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.062549] pinctrl core: initialized pinctrl subsystem
[    0.063310] DMI not present or invalid.
[    0.063938] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.067148] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    0.067437] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.068257] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.068324] audit: initializing netlink subsys (disabled)
[    0.068595] audit: type=2000 audit(0.068:1): state=initialized audit_enabled=0 res=1
[    0.069205] thermal_sys: Registered thermal governor 'fair_share'
[    0.069219] thermal_sys: Registered thermal governor 'bang_bang'
[    0.069229] thermal_sys: Registered thermal governor 'step_wise'
[    0.069239] thermal_sys: Registered thermal governor 'user_space'
[    0.069523] cpuidle: using governor ladder
[    0.069577] cpuidle: using governor menu
[    0.069938] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.070135] ASID allocator initialised with 32768 entries
[    0.070363] Serial: AMBA PL011 UART driver
[    0.082301] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.108305] raspberrypi-firmware soc:firmware: Attached to firmware from 2022-10-26T11:09:05, variant start
[    0.112322] raspberrypi-firmware soc:firmware: Firmware hash is c72ad6b26ff40c91ef776b847436094ee63fabee
[    0.153465] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.153492] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[    0.153505] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.153517] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[    0.170082] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[    0.174549] iommu: Default domain type: Translated 
[    0.174570] iommu: DMA domain TLB invalidation policy: strict mode 
[    0.175806] SCSI subsystem initialized
[    0.176058] libata version 3.00 loaded.
[    0.176251] usbcore: registered new interface driver usbfs
[    0.176297] usbcore: registered new interface driver hub
[    0.176352] usbcore: registered new device driver usb
[    0.176846] pps_core: LinuxPPS API ver. 1 registered
[    0.176859] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.176882] PTP clock support registered
[    0.177173] EDAC MC: Ver: 3.0.0
[    0.178816] NetLabel: Initializing
[    0.178831] NetLabel:  domain hash size = 128
[    0.178842] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.178920] NetLabel:  unlabeled traffic allowed by default
[    0.179761] clocksource: Switched to clocksource arch_sys_counter
[    0.266958] VFS: Disk quotas dquot_6.6.0
[    0.267053] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.268078] AppArmor: AppArmor Filesystem Enabled
[    0.279057] NET: Registered PF_INET protocol family
[    0.279550] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.283293] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.283347] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.283372] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.283550] TCP bind hash table entries: 32768 (order: 7, 524288 bytes, linear)
[    0.284015] TCP: Hash tables configured (established 32768 bind 32768)
[    0.284486] MPTCP token hash table entries: 4096 (order: 4, 98304 bytes, linear)
[    0.284606] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.284663] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.284956] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.284996] NET: Registered PF_XDP protocol family
[    0.285018] PCI: CLS 0 bytes, default 64
[    0.285404] Trying to unpack rootfs image as initramfs...
[    0.287029] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    0.287349] kvm [1]: IPA Size Limit: 44 bits
[    0.288930] kvm [1]: vgic interrupt IRQ9
[    0.289180] kvm [1]: Hyp mode initialized successfully
[    0.296335] Initialise system trusted keyrings
[    0.296421] Key type blacklist registered
[    0.296822] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    0.303995] zbud: loaded
[    0.305916] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.307167] fuse: init (API version 7.34)
[    0.373291] Key type asymmetric registered
[    0.373334] Asymmetric key parser 'x509' registered
[    0.373490] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 242)
[    0.373781] io scheduler mq-deadline registered
[    0.384882] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    0.384934] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    0.385009] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    0.385082] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x00bfffffff -> 0x0400000000
[    0.437928] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[    0.438290] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    0.438314] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[    0.438333] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.438412] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    0.438638] pci 0000:00:00.0: PME# supported from D0 D3hot
[    0.442700] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.443110] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330
[    0.443232] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[    0.443682] pci 0000:01:00.0: PME# supported from D0 D3cold
[    0.447909] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.447981] pci 0000:00:00.0: BAR 14: assigned [mem 0x600000000-0x6000fffff]
[    0.448006] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64bit]
[    0.448045] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.448066] pci 0000:00:00.0:   bridge window [mem 0x600000000-0x6000fffff]
[    0.448505] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    0.448744] pcieport 0000:00:00.0: PME: Signaling with IRQ 67
[    0.449348] pcieport 0000:00:00.0: AER: enabled with IRQ 67
[    0.527948] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.528978] bcm2835-aux-uart fe215040.serial: there is not valid maps for state default
[    0.530780] printk: console [ttyS0] disabled
[    0.530937] fe215040.serial: ttyS0 at MMIO 0xfe215040 (irq = 21, base_baud = 62500000) is a 16550
[    0.531146] printk: console [ttyS0] enabled
[    0.534569] iproc-rng200 fe104000.rng: hwrng registered
[    0.535193] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    0.548998] loop: module loaded
[    0.550056] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    0.555985] tun: Universal TUN/TAP device driver, 1.6
[    0.556984] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[    1.604924] Freeing initrd memory: 81076K
[    1.639905] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[    1.640894] PPP generic driver version 2.4.2
[    1.641189] usbcore: registered new interface driver lan78xx
[    1.641250] usbcore: registered new interface driver smsc95xx
[    1.641292] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.641368] ehci-pci: EHCI PCI platform driver
[    1.641428] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.641450] ohci-pci: OHCI PCI platform driver
[    1.641497] uhci_hcd: USB Universal Host Controller Interface driver
[    1.641617] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.641972] dwc_otg: FIQ enabled
[    1.641983] dwc_otg: NAK holdoff enabled
[    1.641992] dwc_otg: FIQ split-transaction FSM enabled
[    1.642006] Module dwc_common_port init
[    1.642580] mousedev: PS/2 mouse device common for all mice
[    1.643130] i2c_dev: i2c /dev entries driver
[    1.647359] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.647422] device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log.
[    1.647575] device-mapper: uevent: version 1.0.3
[    1.647887] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[    1.650791] sdhci: Secure Digital Host Controller Interface driver
[    1.650805] sdhci: Copyright(c) Pierre Ossman
[    1.651672] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[    1.651692] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[    1.677671] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.681037] ledtrig-cpu: registered to indicate activity on CPUs
[    1.681522] hid: raw HID events driver (C) Jiri Kosina
[    1.690013] drop_monitor: Initializing network drop monitor service
[    1.690572] NET: Registered PF_INET6 protocol family
[    1.721906] Segment Routing with IPv6
[    1.721960] In-situ OAM (IOAM) with IPv6
[    1.722012] NET: Registered PF_PACKET protocol family
[    1.722161] Key type dns_resolver registered
[    1.722725] registered taskstats version 1
[    1.722773] Loading compiled-in X.509 certificates
[    1.724237] Loaded X.509 cert 'Build time autogenerated kernel key: 869890aff729185c3f981b3dea9ad4f4781d15f3'
[    1.725417] Loaded X.509 cert 'Canonical Ltd. Live Patch Signing: 14df34d1a87cf37625abec039ef2bf521249b969'
[    1.726599] Loaded X.509 cert 'Canonical Ltd. Kernel Module Signing: 88f752e560a1e0737e31163a466ad7b70a850c19'
[    1.726606] blacklist: Loading compiled-in revocation X.509 certificates
[    1.726650] Loaded X.509 cert 'Canonical Ltd. Secure Boot Signing: 61482aa2830d0ab2ad5af10b7250da9033ddcef0'
[    1.726694] Loaded X.509 cert 'Canonical Ltd. Secure Boot Signing (2017): 242ade75ac4a15e50d50c84b0d45ff3eae707a03'
[    1.726740] Loaded X.509 cert 'Canonical Ltd. Secure Boot Signing (ESM 2018): 365188c1d374d6b07c3c8f240f8ef722433d6a8b'
[    1.726780] Loaded X.509 cert 'Canonical Ltd. Secure Boot Signing (2019): c0746fd6c5da3ae827864651ad66ae47fe24b3e8'
[    1.726815] Loaded X.509 cert 'Canonical Ltd. Secure Boot Signing (2021 v1): a8d54bbb3825cfb94fa13c9f8a594a195c107b8d'
[    1.726857] Loaded X.509 cert 'Canonical Ltd. Secure Boot Signing (2021 v2): 4cf046892d6fd3c9a5b03f98d845f90851dc6a8c'
[    1.726905] Loaded X.509 cert 'Canonical Ltd. Secure Boot Signing (2021 v3): 100437bb6de6e469b581e61cd66bce3ef4ed53af'
[    1.726942] Loaded X.509 cert 'Canonical Ltd. Secure Boot Signing (Ubuntu Core 2019): c1d57b8f6b743f23ee41f4f7ee292f06eecadfb9'
[    1.727323] Key type .fscrypt registered
[    1.727329] Key type fscrypt-provisioning registered
[    1.747955] Key type encrypted registered
[    1.747977] AppArmor: AppArmor sha1 policy hashing enabled
[    1.748003] ima: No TPM chip found, activating TPM-bypass!
[    1.748020] ima: Allocated hash algorithm: sha1
[    1.748044] ima: No architecture policies found
[    1.748088] evm: Initialising EVM extended attributes:
[    1.748093] evm: security.selinux
[    1.748097] evm: security.SMACK64
[    1.748102] evm: security.SMACK64EXEC
[    1.748105] evm: security.SMACK64TRANSMUTE
[    1.748109] evm: security.SMACK64MMAP
[    1.748113] evm: security.apparmor
[    1.748116] evm: security.ima
[    1.748120] evm: security.capability
[    1.748124] evm: HMAC attrs: 0x1
[    1.751518] uart-pl011 fe201000.serial: there is not valid maps for state default
[    1.751721] uart-pl011 fe201000.serial: cts_event_workaround enabled
[    1.751847] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 19, base_baud = 0) is a PL011 rev2
[    1.759097] of_cfs_init
[    1.759181] of_cfs_init: OK
[    1.759490] mmc1: new high speed SDIO card at address 0001
[    1.795310] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[    1.805486] Freeing unused kernel memory: 5760K
[    1.845983] Checked W+X mappings: passed, no W+X pages found
[    1.846009] Run /init as init process
[    1.846014]   with arguments:
[    1.846020]     /init
[    1.846025]     fixrtc
[    1.846029]     splash
[    1.846033]   with environment:
[    1.846037]     HOME=/
[    1.846041]     TERM=linux
[    1.894111] mmc0: new ultra high speed DDR50 SDXC card at address 59b4
[    1.894749] mmcblk0: mmc0:59b4 USD00 118 GiB 
[    1.897166]  mmcblk0: p1 p2
[    1.897528] mmcblk0: mmc0:59b4 USD00 118 GiB
[    2.440589] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    2.440712] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[    2.491720] xhci_hcd 0000:01:00.0: enabling device (0000 -> 0002)
[    2.491835] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    2.491890] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[    2.492383] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000e40000000890
[    2.492755] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    2.492775] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    2.492792] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    2.496506] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[    2.496528] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.496534] usb usb1: Product: xHCI Host Controller
[    2.496540] usb usb1: Manufacturer: Linux 5.15.0-1035-raspi xhci-hcd
[    2.496545] usb usb1: SerialNumber: 0000:01:00.0
[    2.497036] hub 1-0:1.0: USB hub found
[    2.497110] hub 1-0:1.0: 1 port detected
[    2.497728] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[    2.497756] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.497762] usb usb2: Product: xHCI Host Controller
[    2.497769] usb usb2: Manufacturer: Linux 5.15.0-1035-raspi xhci-hcd
[    2.497774] usb usb2: SerialNumber: 0000:01:00.0
[    2.498447] hub 2-0:1.0: USB hub found
[    2.498540] hub 2-0:1.0: 4 ports detected
[    2.565184] brcmstb-i2c fef04500.i2c:  @97500hz registered in polling mode
[    2.579287] input: soc:shutdown_button@11 as /devices/platform/soc/soc:shutdown_button@11/input/input0
[    2.598149] dwc2 fe980000.usb: supply vusb_d not found, using dummy regulator
[    2.598347] dwc2 fe980000.usb: supply vusb_a not found, using dummy regulator
[    2.618573] brcmstb-i2c fef09500.i2c:  @97500hz registered in polling mode
[    2.638984] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
[    2.697665] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[    2.698839] Registered IR keymap rc-cec
[    2.698970] rc rc0: vc4-hdmi-0 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[    2.699079] input: vc4-hdmi-0 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input1
[    2.700659] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops [vc4])
[    2.701869] Registered IR keymap rc-cec
[    2.702011] rc rc1: vc4-hdmi-1 as /devices/platform/soc/fef05700.hdmi/rc/rc1
[    2.702111] input: vc4-hdmi-1 as /devices/platform/soc/fef05700.hdmi/rc/rc1/input2
[    2.704702] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops [vc4])
[    2.704928] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4])
[    2.706185] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4])
[    2.706356] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4])
[    2.706478] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4])
[    2.706591] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4])
[    2.706716] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4])
[    2.709213] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[    2.709334] vc4-drm gpu: [drm] Cannot find any crtc or sizes
[    2.807867] dwc2 fe980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    2.808096] dwc2 fe980000.usb: DWC OTG Controller
[    2.808114] dwc2 fe980000.usb: new USB bus registered, assigned bus number 3
[    2.808146] dwc2 fe980000.usb: irq 24, io mem 0xfe980000
[    2.808321] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[    2.808331] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.808337] usb usb3: Product: DWC OTG Controller
[    2.808342] usb usb3: Manufacturer: Linux 5.15.0-1035-raspi dwc2_hsotg
[    2.808348] usb usb3: SerialNumber: fe980000.usb
[    2.808746] hub 3-0:1.0: USB hub found
[    2.808784] hub 3-0:1.0: 1 port detected
[    2.831812] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    2.982354] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[    2.982375] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.982381] usb 1-1: Product: USB2.0 Hub
[    2.983997] hub 1-1:1.0: USB hub found
[    2.984316] hub 1-1:1.0: 4 ports detected
[    3.279825] usb 1-1.1: new high-speed USB device number 3 using xhci_hcd
[    3.380836] usb 1-1.1: New USB device found, idVendor=05a3, idProduct=9331, bcdDevice= 1.05
[    3.380859] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.380875] usb 1-1.1: Product: HD Web Camera
[    3.380889] usb 1-1.1: Manufacturer: HD Web Camera
[    3.380902] usb 1-1.1: SerialNumber: Ucamera001
[    3.471831] usb 1-1.3: new high-speed USB device number 4 using xhci_hcd
[    3.572678] usb 1-1.3: New USB device found, idVendor=16c0, idProduct=0483, bcdDevice= 2.80
[    3.572700] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.572716] usb 1-1.3: Product: USB Serial
[    3.572730] usb 1-1.3: Manufacturer: Teensyduino
[    3.572742] usb 1-1.3: SerialNumber: 9146220
[    3.663799] usb 1-1.4: new full-speed USB device number 5 using xhci_hcd
[    3.769234] usb 1-1.4: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[    3.769257] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.769273] usb 1-1.4: Product: CP2102 USB to UART Bridge Controller
[    3.769287] usb 1-1.4: Manufacturer: Silicon Labs
[    3.769299] usb 1-1.4: SerialNumber: 0001
[    4.419772] raid6: neonx8   gen()  3546 MB/s
[    4.487755] raid6: neonx8   xor()  2737 MB/s
[    4.555761] raid6: neonx4   gen()  3844 MB/s
[    4.623764] raid6: neonx4   xor()  2848 MB/s
[    4.691760] raid6: neonx2   gen()  3479 MB/s
[    4.759758] raid6: neonx2   xor()  2581 MB/s
[    4.827762] raid6: neonx1   gen()  2717 MB/s
[    4.895757] raid6: neonx1   xor()  2118 MB/s
[    4.963768] raid6: int64x8  gen()  2408 MB/s
[    5.031759] raid6: int64x8  xor()  1414 MB/s
[    5.099763] raid6: int64x4  gen()  2533 MB/s
[    5.167758] raid6: int64x4  xor()  1450 MB/s
[    5.235758] raid6: int64x2  gen()  2382 MB/s
[    5.303763] raid6: int64x2  xor()  1290 MB/s
[    5.371767] raid6: int64x1  gen()  1836 MB/s
[    5.439768] raid6: int64x1  xor()   960 MB/s
[    5.439774] raid6: using algorithm neonx4 gen() 3844 MB/s
[    5.439778] raid6: .... xor() 2848 MB/s, rmw enabled
[    5.439782] raid6: using neon recovery algorithm
[    5.443473] xor: measuring software checksum speed
[    5.445080]    8regs           :  6305 MB/sec
[    5.446443]    32regs          :  7253 MB/sec
[    5.449649]    arm64_neon      :  3080 MB/sec
[    5.449654] xor: using function: 32regs (7253 MB/sec)
[    5.451503] async_tx: api initialized (async)
[    5.661613] Btrfs loaded, crc32c=crc32c-generic, zoned=yes, fsverity=no
[    6.019408] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[    6.964001] systemd[1]: Inserted module 'autofs4'
[    7.030264] systemd[1]: systemd 249.11-0ubuntu3.9 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[    7.032135] systemd[1]: Detected architecture arm64.
[    7.033737] systemd[1]: Hostname set to <rospi>.
[    7.976994] systemd[1]: Queued start job for default target Graphical Interface.
[    7.996364] systemd[1]: Created slice Slice /system/modprobe.
[    7.999266] systemd[1]: Created slice Slice /system/serial-getty.
[    8.002083] systemd[1]: Created slice Slice /system/systemd-fsck.
[    8.004100] systemd[1]: Created slice User and Session Slice.
[    8.004429] systemd[1]: Started ntp-systemd-netif.path.
[    8.004904] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    8.005972] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    8.006349] systemd[1]: Reached target Slice Units.
[    8.006435] systemd[1]: Reached target Mounting snaps.
[    8.006526] systemd[1]: Reached target Swaps.
[    8.006604] systemd[1]: Reached target System Time Set.
[    8.006777] systemd[1]: Reached target Local Verity Protected Volumes.
[    8.007260] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[    8.008048] systemd[1]: Listening on LVM2 poll daemon socket.
[    8.008747] systemd[1]: Listening on multipathd control socket.
[    8.009400] systemd[1]: Listening on Syslog Socket.
[    8.009908] systemd[1]: Listening on fsck to fsckd communication Socket.
[    8.010148] systemd[1]: Listening on initctl Compatibility Named Pipe.
[    8.011051] systemd[1]: Listening on Journal Audit Socket.
[    8.011565] systemd[1]: Listening on Journal Socket (/dev/log).
[    8.012244] systemd[1]: Listening on Journal Socket.
[    8.012906] systemd[1]: Listening on Network Service Netlink Socket.
[    8.013553] systemd[1]: Listening on udev Control Socket.
[    8.014081] systemd[1]: Listening on udev Kernel Socket.
[    8.017754] systemd[1]: Mounting Huge Pages File System...
[    8.021975] systemd[1]: Mounting POSIX Message Queue File System...
[    8.026666] systemd[1]: Mounting Kernel Debug File System...
[    8.030928] systemd[1]: Mounting Kernel Trace File System...
[    8.037964] systemd[1]: Starting Journal Service...
[    8.043685] systemd[1]: Starting Restore / save the current clock...
[    8.048609] systemd[1]: Starting Set the console keyboard layout...
[    8.053776] systemd[1]: Starting Create List of Static Device Nodes...
[    8.058688] systemd[1]: Starting Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling...
[    8.058933] systemd[1]: Condition check resulted in LXD - agent being skipped.
[    8.064220] systemd[1]: Starting Load Kernel Module chromeos_pstore...
[    8.069502] systemd[1]: Starting Load Kernel Module configfs...
[    8.074288] systemd[1]: Starting Load Kernel Module drm...
[    8.079787] systemd[1]: Starting Load Kernel Module efi_pstore...
[    8.085089] systemd[1]: Starting Load Kernel Module fuse...
[    8.090487] systemd[1]: Starting Load Kernel Module pstore_blk...
[    8.097516] systemd[1]: Starting Load Kernel Module pstore_zone...
[    8.104159] systemd[1]: Starting Load Kernel Module ramoops...
[    8.104550] systemd[1]: Condition check resulted in OpenVSwitch configuration for cleanup being skipped.
[    8.105170] systemd[1]: Condition check resulted in File System Check on Root Device being skipped.
[    8.121739] systemd[1]: Starting Load Kernel Modules...
[    8.126292] systemd[1]: Starting Remount Root and Kernel File Systems...
[    8.130994] systemd[1]: Starting Coldplug All udev Devices...
[    8.142578] systemd[1]: Mounted Huge Pages File System.
[    8.144371] systemd[1]: Mounted POSIX Message Queue File System.
[    8.146376] systemd[1]: Mounted Kernel Debug File System.
[    8.148071] systemd[1]: Mounted Kernel Trace File System.
[    8.151165] systemd[1]: Finished Restore / save the current clock.
[    8.154550] systemd[1]: Finished Create List of Static Device Nodes.
[    8.158370] systemd[1]: modprobe@chromeos_pstore.service: Deactivated successfully.
[    8.160588] systemd[1]: Finished Load Kernel Module chromeos_pstore.
[    8.163895] systemd[1]: modprobe@configfs.service: Deactivated successfully.
[    8.171143] EXT4-fs (mmcblk0p2): re-mounted. Opts: discard,errors=remount-ro. Quota mode: none.
[    8.173529] systemd[1]: Finished Load Kernel Module configfs.
[    8.179961] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    8.181934] systemd[1]: Finished Load Kernel Module drm.
[    8.186461] systemd[1]: modprobe@efi_pstore.service: Deactivated successfully.
[    8.209137] systemd[1]: Finished Load Kernel Module efi_pstore.
[    8.212139] systemd[1]: Finished Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling.
[    8.215494] systemd[1]: modprobe@fuse.service: Deactivated successfully.
[    8.217570] systemd[1]: Finished Load Kernel Module fuse.
[    8.220461] systemd[1]: modprobe@pstore_blk.service: Deactivated successfully.
[    8.222407] systemd[1]: Finished Load Kernel Module pstore_blk.
[    8.225319] systemd[1]: modprobe@pstore_zone.service: Deactivated successfully.
[    8.227351] systemd[1]: Finished Load Kernel Module pstore_zone.
[    8.230743] systemd[1]: modprobe@ramoops.service: Deactivated successfully.
[    8.232851] systemd[1]: Finished Load Kernel Module ramoops.
[    8.235464] systemd[1]: Finished Load Kernel Modules.
[    8.240258] systemd[1]: Finished Remount Root and Kernel File Systems.
[    8.247020] systemd[1]: Mounting FUSE Control File System...
[    8.257700] systemd[1]: Mounting Kernel Configuration File System...
[    8.263247] systemd[1]: Starting Device-Mapper Multipath Device Controller...
[    8.263609] systemd[1]: Condition check resulted in Platform Persistent Storage Archival being skipped.
[    8.271400] systemd[1]: Starting Load/Save Random Seed...
[    8.276428] systemd[1]: Starting Apply Kernel Variables...
[    8.281999] systemd[1]: Starting Create System Users...
[    8.298071] systemd[1]: Finished Set the console keyboard layout.
[    8.299517] systemd[1]: Mounted FUSE Control File System.
[    8.301097] systemd[1]: Mounted Kernel Configuration File System.
[    8.313868] systemd[1]: Started Journal Service.
[    8.321144] alua: device handler registered
[    8.327161] emc: device handler registered
[    8.334852] rdac: device handler registered
[    8.347030] systemd-journald[418]: Received client request to flush runtime journal.
[    8.370140] systemd-journald[418]: File /var/log/journal/85f85c3e87674845a896148f2c9bd6dc/system.journal corrupted or uncleanly shut down, renaming and replacing.
[    8.737062] loop0: detected capacity change from 0 to 121336
[    8.743992] loop1: detected capacity change from 0 to 121368
[    8.752433] loop2: detected capacity change from 0 to 224472
[    8.761572] loop3: detected capacity change from 0 to 88456
[    8.768959] loop4: detected capacity change from 0 to 95056
[    9.148201] gpio-fan gpio-fan@0: GPIO fan initialized
[    9.219109] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x00010000
[    9.219354] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
[    9.219532] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
[    9.219710] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
[    9.225164] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    9.225418] vc_sm_cma: module verification failed: signature and/or required key missing - tainting kernel
[    9.226348] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    9.226370] [vc_sm_connected_init]: start
[    9.227309] [vc_sm_connected_init]: installed successfully
[    9.241517] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000
[    9.252653] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    9.258561] bcm2835_audio bcm2835_audio: card created with 8 channels
[    9.263556] mc: Linux media interface: v0.10
[    9.335438] videodev: Linux video capture interface: v2.00
[    9.494217] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    9.537954] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    9.545741] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    9.545747] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    9.553900] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
[    9.554049] usbcore: registered new interface driver cdc_acm
[    9.554056] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    9.581568] usbcore: registered new interface driver usbserial_generic
[    9.586759] usbserial: USB Serial support registered for generic
[    9.598856] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    9.612780] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[    9.615155] usbcore: registered new interface driver cp210x
[    9.615227] usbserial: USB Serial support registered for cp210x
[    9.615355] cp210x 1-1.4:1.0: cp210x converter detected
[    9.621571] usb 1-1.4: cp210x converter now attached to ttyUSB0
[    9.627874] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    9.628033] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[    9.628861] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[    9.630337] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[    9.631557] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    9.631587] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    9.631595] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    9.631602] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    9.662695] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[    9.663074] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[    9.663089] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    9.663127] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    9.663403] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[    9.668348] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    9.668384] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    9.672549] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[    9.672585] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    9.672596] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    9.672604] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    9.672611] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    9.672809] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[    9.673191] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    9.673219] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    9.688608] brcmfmac: F1 signature read @0x18000000=0x15264345
[    9.694286] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    9.704295] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[    9.704334] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[    9.710452] usb 1-1.1: Found UVC 1.00 device HD Web Camera (05a3:9331)
[    9.711736] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin failed with error -2
[    9.721458] usbcore: registered new interface driver brcmfmac
[    9.742799] bcm2835-codec bcm2835-codec: Device registered as /dev/video31
[    9.742835] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image
[    9.750998] usb 1-1.1: Failed to query (GET_INFO) UVC control 12 on unit 2: -32 (exp. 1).
[    9.783998] usb 1-1.1: Failed to query (GET_INFO) UVC control 11 on unit 2: -32 (exp. 1).
[    9.867065] input: HD Web Camera: HD Web Camera as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input3
[    9.876132] usbcore: registered new interface driver uvcvideo
[    9.897394] Bluetooth: Core ver 2.22
[    9.897486] NET: Registered PF_BLUETOOTH protocol family
[    9.897493] Bluetooth: HCI device and connection manager initialized
[    9.897510] Bluetooth: HCI socket layer initialized
[    9.897518] Bluetooth: L2CAP socket layer initialized
[    9.897531] Bluetooth: SCO socket layer initialized
[    9.964503] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    9.964635] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    9.971717] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov  1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
[   10.002122] usb 1-1.1: Warning! Unlikely big volume range (=3072), cval->res is probably wrong.
[   10.002518] usb 1-1.1: [6] FU [Mic Capture Volume] ch = 1, val = -1536/1536/1
[   10.004695] usbcore: registered new interface driver snd-usb-audio
[   11.036345] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[   11.052339] audit: type=1400 audit(1692110928.959:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lsb_release" pid=656 comm="apparmor_parser"
[   11.055307] audit: type=1400 audit(1692110928.959:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=657 comm="apparmor_parser"
[   11.055346] audit: type=1400 audit(1692110928.959:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=657 comm="apparmor_parser"
[   11.061355] audit: type=1400 audit(1692110928.967:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/man" pid=659 comm="apparmor_parser"
[   11.061424] audit: type=1400 audit(1692110928.967:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_filter" pid=659 comm="apparmor_parser"
[   11.061469] audit: type=1400 audit(1692110928.967:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_groff" pid=659 comm="apparmor_parser"
[   11.096402] audit: type=1400 audit(1692110929.003:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="tcpdump" pid=660 comm="apparmor_parser"
[   11.102248] audit: type=1400 audit(1692110929.007:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/ntpd" pid=662 comm="apparmor_parser"
[   11.106787] audit: type=1400 audit(1692110929.011:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/snapd/snap-confine" pid=661 comm="apparmor_parser"
[   11.107496] audit: type=1400 audit(1692110929.011:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=661 comm="apparmor_parser"
[   16.348488] uart-pl011 fe201000.serial: no DMA platform data
[   16.805154] kauditd_printk_skb: 22 callbacks suppressed
[   16.805166] audit: type=1400 audit(1692110934.711:34): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/snap/bin/" pid=783 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   16.928204] audit: type=1400 audit(1692110934.835:35): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/etc/ssl/openssl.cnf" pid=840 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   17.065812] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   18.536061] audit: type=1400 audit(1692110936.443:36): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/snap/bin/" pid=888 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   18.547112] audit: type=1400 audit(1692110936.451:37): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/etc/ssl/openssl.cnf" pid=894 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   19.169739] audit: type=1400 audit(1692110937.075:38): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/snap/bin/" pid=927 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   19.180564] audit: type=1400 audit(1692110937.087:39): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/etc/ssl/openssl.cnf" pid=941 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   20.419362] audit: type=1400 audit(1692110938.323:40): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/snap/bin/" pid=958 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   20.435410] audit: type=1400 audit(1692110938.339:41): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/etc/ssl/openssl.cnf" pid=964 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   20.772416] audit: type=1400 audit(1692110938.679:42): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/snap/bin/" pid=981 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   20.785821] audit: type=1400 audit(1692110938.691:43): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/etc/ssl/openssl.cnf" pid=987 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   23.822400] Bluetooth: HCI UART driver ver 2.3
[   23.822423] Bluetooth: HCI UART protocol H4 registered
[   23.822427] Bluetooth: HCI UART protocol BCSP registered
[   23.822519] Bluetooth: HCI UART protocol LL registered
[   23.822525] Bluetooth: HCI UART protocol ATH3K registered
[   23.822558] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   23.822711] Bluetooth: HCI UART protocol Intel registered
[   23.822823] Bluetooth: HCI UART protocol Broadcom registered
[   23.822848] Bluetooth: HCI UART protocol QCA registered
[   23.822853] Bluetooth: HCI UART protocol AG6XX registered
[   23.822877] Bluetooth: HCI UART protocol Marvell registered
[   24.312048] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   24.312071] Bluetooth: BNEP filters: protocol multicast
[   24.312088] Bluetooth: BNEP socket layer initialized
[   24.332125] NET: Registered PF_ALG protocol family
[   36.449847] usb 1-1.1: Failed to query (GET_DEF) UVC control 12 on unit 2: -32 (exp. 4).
[   56.167187] loop5: detected capacity change from 0 to 8
[  276.481715] audit: type=1400 audit(1692111194.387:44): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/snap/bin/" pid=2573 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[  276.494003] audit: type=1400 audit(1692111194.399:45): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/etc/ssl/openssl.cnf" pid=2579 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[  278.199297] audit: type=1400 audit(1692111196.103:46): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/snap/bin/" pid=2595 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[  278.212666] audit: type=1400 audit(1692111196.119:47): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/etc/ssl/openssl.cnf" pid=2601 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[  535.154414] audit: type=1400 audit(1692111453.059:48): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/snap/bin/" pid=4019 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[  535.169498] audit: type=1400 audit(1692111453.075:49): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/etc/ssl/openssl.cnf" pid=4029 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[  743.688914] audit: type=1400 audit(1692111661.595:50): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/snap/bin/" pid=5174 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[  743.699806] audit: type=1400 audit(1692111661.603:51): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/etc/ssl/openssl.cnf" pid=5180 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[  745.510930] audit: type=1400 audit(1692111663.415:52): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/snap/bin/" pid=5212 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[  745.521632] audit: type=1400 audit(1692111663.427:53): apparmor="DENIED" operation="open" profile="/usr/sbin/ntpd" name="/etc/ssl/openssl.cnf" pid=5218 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
atticusrussell commented 1 year ago

@6by9 not sure what to make of the fact that I don't have anything starting with v4l in /sys/kernel/debug/:

atticus@rospi:~  
$ sudo cat /sys/kernel/debug/v4l2-async/pending_async_subdevices 
cat: /sys/kernel/debug/v4l2-async/pending_async_subdevices: No such file or directory

atticus@rospi:~  
$ sudo ls /sys/kernel/debug/
asoc       cec          debug_enabled     dma_buf    dynamic_debug       frontswap  kprobes   mmc1      pwm        remoteproc  spi-bcm2835-fe204000.spi  tracing  vcsm-cma
bdi    cleancache       devfreq       dmaengine  error_injection     gpio   kvm   opp       ras        sched       split_huge_pages      usb      zswap
block      clear_warn_once  device_component  dma_pools  extfrag         hid    memblock  pinctrl   regmap     slab    swiotlb           vchiq
bluetooth  clk          devices_deferred  dri    fault_around_bytes  ieee80211  mmc0      pm_genpd  regulator  sleep_time  sync              vc-mem

the following is the result of running the media-ctl command you ran on devices 0 through 10:

atticus@rospi:~  
$ libcamera-hello
Preview window unavailable
[0:07:47.593198313] [3962]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0+19-960d0c1e
ERROR: *** no cameras available ***
atticus@rospi:~  
$ media-ctl -p -d 4
Failed to enumerate /dev/media4 (-2)

atticus@rospi:~  
$ ls /dev/video
video10  video11  video12  video13  video14  video15  video16  video18  video20  video21  video22  video23  video31  

atticus@rospi:~  
$ media-ctl -p -d 0
Media controller API version 5.15.111

Media device information
------------------------
driver          bcm2835-isp
model           bcm2835-isp
serial          
bus info        platform:bcm2835-isp
hw revision     0x0
driver version  5.15.111

Device topology
- entity 1: bcm2835_isp0 (4 pads, 4 links)
            type Node subtype Unknown flags 0
    pad0: Sink
        <- "bcm2835-isp0-output0":0 [ENABLED,IMMUTABLE]
    pad1: Source
        -> "bcm2835-isp0-capture1":0 [ENABLED,IMMUTABLE]
    pad2: Source
        -> "bcm2835-isp0-capture2":0 [ENABLED,IMMUTABLE]
    pad3: Source
        -> "bcm2835-isp0-capture3":0 [ENABLED,IMMUTABLE]

- entity 6: bcm2835-isp0-output0 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video13
    pad0: Source
        -> "bcm2835_isp0":0 [ENABLED,IMMUTABLE]

- entity 12: bcm2835-isp0-capture1 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video14
    pad0: Sink
        <- "bcm2835_isp0":1 [ENABLED,IMMUTABLE]

- entity 18: bcm2835-isp0-capture2 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video15
    pad0: Sink
        <- "bcm2835_isp0":2 [ENABLED,IMMUTABLE]

- entity 24: bcm2835-isp0-capture3 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video16
    pad0: Sink
        <- "bcm2835_isp0":3 [ENABLED,IMMUTABLE]

atticus@rospi:~  
$ media-ctl -p -d 1
Media controller API version 5.15.111

Media device information
------------------------
driver          bcm2835-isp
model           bcm2835-isp
serial          
bus info        platform:bcm2835-isp
hw revision     0x0
driver version  5.15.111

Device topology
- entity 1: bcm2835_isp0 (4 pads, 4 links)
            type Node subtype Unknown flags 0
    pad0: Sink
        <- "bcm2835-isp0-output0":0 [ENABLED,IMMUTABLE]
    pad1: Source
        -> "bcm2835-isp0-capture1":0 [ENABLED,IMMUTABLE]
    pad2: Source
        -> "bcm2835-isp0-capture2":0 [ENABLED,IMMUTABLE]
    pad3: Source
        -> "bcm2835-isp0-capture3":0 [ENABLED,IMMUTABLE]

- entity 6: bcm2835-isp0-output0 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video20
    pad0: Source
        -> "bcm2835_isp0":0 [ENABLED,IMMUTABLE]

- entity 12: bcm2835-isp0-capture1 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video21
    pad0: Sink
        <- "bcm2835_isp0":1 [ENABLED,IMMUTABLE]

- entity 18: bcm2835-isp0-capture2 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video22
    pad0: Sink
        <- "bcm2835_isp0":2 [ENABLED,IMMUTABLE]

- entity 24: bcm2835-isp0-capture3 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video23
    pad0: Sink
        <- "bcm2835_isp0":3 [ENABLED,IMMUTABLE]

atticus@rospi:~  
$ media-ctl -p -d 2
Media controller API version 5.15.111

Media device information
------------------------
driver          bcm2835-codec
model           bcm2835-codec
serial          0000
bus info        platform:bcm2835-codec
hw revision     0x1
driver version  5.15.111

Device topology
- entity 1: bcm2835-codec-decode-source (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video10
    pad0: Source
        -> "bcm2835-codec-decode-proc":0 [ENABLED,IMMUTABLE]

- entity 3: bcm2835-codec-decode-proc (2 pads, 2 links)
            type Node subtype Unknown flags 0
    pad0: Sink
        <- "bcm2835-codec-decode-source":0 [ENABLED,IMMUTABLE]
    pad1: Source
        -> "bcm2835-codec-decode-sink":0 [ENABLED,IMMUTABLE]

- entity 6: bcm2835-codec-decode-sink (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video10
    pad0: Sink
        <- "bcm2835-codec-decode-proc":1 [ENABLED,IMMUTABLE]

- entity 15: bcm2835-codec-encode-source (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video11
    pad0: Source
        -> "bcm2835-codec-encode-proc":0 [ENABLED,IMMUTABLE]

- entity 17: bcm2835-codec-encode-proc (2 pads, 2 links)
             type Node subtype Unknown flags 0
    pad0: Sink
        <- "bcm2835-codec-encode-source":0 [ENABLED,IMMUTABLE]
    pad1: Source
        -> "bcm2835-codec-encode-sink":0 [ENABLED,IMMUTABLE]

- entity 20: bcm2835-codec-encode-sink (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video11
    pad0: Sink
        <- "bcm2835-codec-encode-proc":1 [ENABLED,IMMUTABLE]

- entity 29: bcm2835-codec-isp-source (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video12
    pad0: Source
        -> "bcm2835-codec-isp-proc":0 [ENABLED,IMMUTABLE]

- entity 31: bcm2835-codec-isp-proc (2 pads, 2 links)
             type Node subtype Unknown flags 0
    pad0: Sink
        <- "bcm2835-codec-isp-source":0 [ENABLED,IMMUTABLE]
    pad1: Source
        -> "bcm2835-codec-isp-sink":0 [ENABLED,IMMUTABLE]

- entity 34: bcm2835-codec-isp-sink (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video12
    pad0: Sink
        <- "bcm2835-codec-isp-proc":1 [ENABLED,IMMUTABLE]

- entity 43: bcm2835-codec-image_fx-source (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video18
    pad0: Source
        -> "bcm2835-codec-image_fx-proc":0 [ENABLED,IMMUTABLE]

- entity 45: bcm2835-codec-image_fx-proc (2 pads, 2 links)
             type Node subtype Unknown flags 0
    pad0: Sink
        <- "bcm2835-codec-image_fx-source":0 [ENABLED,IMMUTABLE]
    pad1: Source
        -> "bcm2835-codec-image_fx-sink":0 [ENABLED,IMMUTABLE]

- entity 48: bcm2835-codec-image_fx-sink (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video18
    pad0: Sink
        <- "bcm2835-codec-image_fx-proc":1 [ENABLED,IMMUTABLE]

- entity 57: bcm2835-codec-encode_image-sour (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video31
    pad0: Source
        -> "bcm2835-codec-encode_image-proc":0 [ENABLED,IMMUTABLE]

- entity 59: bcm2835-codec-encode_image-proc (2 pads, 2 links)
             type Node subtype Unknown flags 0
    pad0: Sink
        <- "bcm2835-codec-encode_image-sour":0 [ENABLED,IMMUTABLE]
    pad1: Source
        -> "bcm2835-codec-encode_image-sink":0 [ENABLED,IMMUTABLE]

- entity 62: bcm2835-codec-encode_image-sink (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video31
    pad0: Sink
        <- "bcm2835-codec-encode_image-proc":1 [ENABLED,IMMUTABLE]

atticus@rospi:~  
$ media-ctl -p -d 3
Failed to enumerate /dev/media3 (-2)
atticus@rospi:~  
$ media-ctl -p -d 4
Failed to enumerate /dev/media4 (-2)
atticus@rospi:~  
$ media-ctl -p -d 5
Failed to enumerate /dev/media5 (-2)
atticus@rospi:~  
$ media-ctl -p -d 6
Failed to enumerate /dev/media6 (-2)
atticus@rospi:~  
$ media-ctl -p -d 7
Failed to enumerate /dev/media7 (-2)
atticus@rospi:~  
$ media-ctl -p -d 8
Failed to enumerate /dev/media8 (-2)
atticus@rospi:~  
$ media-ctl -p -d 9
Failed to enumerate /dev/media9 (-2)
atticus@rospi:~  
$ media-ctl -p -d 10
Failed to enumerate /dev/media10 (-2)
naushir commented 1 year ago

As @6by9 mentioned, this looks like the sensor probe has not fully completed (likely due waiting for dw9817 to enumerate), and the media device is not fully registered.

6by9 commented 1 year ago

5.15 is pretty old in our book. https://github.com/torvalds/linux/commit/517fd2b6a058bc4f23735ab9a9e6b0d5c56876d1 to add v4l2-async/pending_async_subdevices was added in 5.12, so that implies that nothing is registering for v4l2-async.

lsmod should include at least imx708, bcm2835_unicam, videobuf2_dma_contig, videobuf2_memops, videobuf2_v4l2, videodev, videobuf2_common, v4l2_async, dw9807_vcm. Not having a unicam Media Controller node registered implies that bcm2835_unicam isn't loading, let alone the rest.

Sorry, but this is getting to the stage of being Ubuntu specific and therefore probably better to be asking Canonical about. Or switch to the rpi-6.1.y kernel and our standard defconfig to ensure you've built everything necessary.

atticusrussell commented 1 year ago

Thanks for all the help. I'm pretty new to messing with the kernel, so have a few questions about how to proceed with updating to a newer kernel.

I'm intentionally on Ubuntu 22.04 LTS for compatibility with ROS Humble.

AFAIK the kernel goes under any distro-specific customization, so in theory could I simply compile 6.1y from raspberrypi/linux and apply the .deb patches to Ubuntu?

Thus far I have been copying changes from raspberrypi/linux over to the Ubuntu provided linux-raspi kernel on the branch applied/ubuntu/jammy-updates 5.15.0-1035.38 (patches applied).

Can I run a kernel newer than 5.15 with ubuntu 22.04 (jammy)? I notice that there's a 6.2.X kernel in the ubuntu rpi-kernel repo tagged with mantic (23.10) and lunar (23.04). If so, does it matter whether I get the newer kernel from raspberrypi/linux or rpi-kernel, and would either choice be better?

Thanks again for all your help.

6by9 commented 1 year ago

Potentially you can take the kernel package from the later Ubuntu release, but I'm not involved in packaging to give details.

Largely the kernel version is independent of almost all userspace stuff as the kernel should offer a stable userspace ABI, but there are sometimes glitches in that.

atticusrussell commented 1 year ago

@6by9 I managed to update my kernel to 6.2.0-1004-raspi using a package from Ubuntu Lunar, as detailed in this askubuntu post I made, however my issues with libcamera and the Raspberry Pi Camera Module 3 persist.

I think I have the correct drivers now. I have now reproduced the issue you predicted with imx708 as a pending_async_subdevice.

atticus@rospi:~  
$ uname -a
Linux rospi 6.2.0-1004-raspi #5-Ubuntu SMP PREEMPT Mon Apr  3 11:15:14 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

atticus@rospi:~  
$ sudo cat /sys/kernel/debug/v4l2-async/pending_async_subdevices
imx708:
 [fwnode] dev=10-000c, node=/soc/i2c0mux/i2c@1/dw9817@c
unicam fe801000.csi:

atticus@rospi:~  
$ libcamera-hello 
Preview window unavailable
[0:13:33.922153143] [5185]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0+19-960d0c1e
[0:13:33.961853643] [5186] ERROR V4L2 v4l2_device.cpp:93 'imx708': Failed to open V4L2 device '': No such file or directory
[0:13:33.961984865] [5186] ERROR RPI vc4.cpp:209 Failed to register camera imx708: -22
ERROR: *** no cameras available ***

Not sure what my next step should be. How do I get dw9817 to enumerate, like you mentioned.

Also I have manually specified the sensor:

atticus@rospi:~  
$ cat /boot/firmware/config.txt 
[all]
kernel=vmlinuz
cmdline=cmdline.txt
initramfs initrd.img followkernel

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Enable the audio output, I2C and SPI interfaces on the GPIO header. As these
# parameters related to the base device-tree they must appear *before* any
# other dtoverlay= specification
dtparam=audio=on
dtparam=i2c_arm=on
dtparam=spi=on

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Comment out the following line if the edges of the desktop appear outside
# the edges of your display
disable_overscan=1

# If you have issues with audio, you may try uncommenting the following line
# which forces the HDMI output into HDMI mode instead of DVI (which doesn't
# support audio output)
#hdmi_drive=2

# Enable the serial pins
enable_uart=1

# Autoload overlays for any recognized cameras that are attached
# to the CSI port. Please note this is for libcamera support, *not* for
# the legacy camera stack
camera_auto_detect=0
dtoverlay=imx708

l Automatically load overlays for detected DSI displays
display_auto_detect=1

# Config settings specific to arm64
arm_64bit=1
dtoverlay=dwc2

# Display on fan hat
dtoverlay=gpio-fan,gpiopin=14,temp=60000
gpu_mem=128

# add pi shutdown switch (manual tweak)
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up,debounce=1000

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable the USB2 outputs on the IO board (assuming your CM4 is plugged into
# such a board)
dtoverlay=dwc2,dr_mode=host
atticusrussell commented 1 year ago

looks like I may not have the necessary driver in this kernel but I'll look into it further:

atticus@rospi:~  
$ sudo modprobe dw9817
[sudo] password for atticus: 
modprobe: FATAL: Module dw9817 not found in directory /lib/modules/6.2.0-1004-raspi

edit:

I think it's because of the lack of the dw9807 module:

atticus@rospi:~  
$ ls /lib/modules/6.2.0-1004-raspi/kernel/drivers/media/i2c/
ad5398_vcm.ko         cs5345.ko    imx296.ko      max9271.ko  ov5647.ko   sony-btf-mpx.ko  tw9903.ko
adv7170.ko            cs53l32a.ko  imx319.ko      max9286.ko  ov5648.ko   st-vgxy61.ko     tw9906.ko
adv7175.ko            cx25840      imx334.ko      msp3400.ko  ov5693.ko   tc358743.ko      uda1342.ko
adv7180.ko            dw9768.ko    imx335.ko      mt9m111.ko  ov7251.ko   tc358746.ko      vp27smpx.ko
ar0521.ko             hi556.ko     imx355.ko      mt9v011.ko  ov7640.ko   tda1997x.ko      vpx3220.ko
arducam_64mp.ko       hi846.ko     imx412.ko      og01a1b.ko  ov7670.ko   tda7432.ko       wm8739.ko
arducam-pivariety.ko  hi847.ko     imx477.ko      ov02a10.ko  ov8865.ko   tda9840.ko       wm8775.ko
bt819.ko              imx208.ko    imx519.ko      ov08d10.ko  ov9282.ko   tea6415c.ko
bt856.ko              imx214.ko    imx708.ko      ov08x40.ko  rdacm20.ko  tea6420.ko
bt866.ko              imx219.ko    ir-kbd-i2c.ko  ov13b10.ko  rdacm21.ko  tlv320aic23b.ko
ccs                   imx258.ko    irs1125.ko     ov2311.ko   saa7110.ko  tvaudio.ko
ccs-pll.ko            imx274.ko    isl7998x.ko    ov2640.ko   saa7115.ko  tvp5150.ko
cs3308.ko             imx290.ko    ks0127.ko      ov4689.ko   saa7185.ko  tw2804.ko

and in /drivers/media/i2c/dw9807-vcm.c of kernel src:

/*
 * DW9807 is a 10-bit DAC driver, capable of sinking up to 100mA.
 *
 * DW9817 is a bidirectional 10-bit driver, driving up to +/- 100mA.
 * Operationally it is identical to DW9807, except that the idle position is
 * the mid-point, not 0.
 */
naushir commented 1 year ago

@atticusrussell any particular reason you are using Ubuntu and not a Raspberry Pi OS image? In the latter, Camera v3 will "just work" as intended.

6by9 commented 1 year ago

The VCM driver is dw9807_vcm. It supports multiple compatible strings to differentiate between dw9807 and dw9817

pi@raspberrypi:~ $ modinfo dw9807-vcm 
filename:       /lib/modules/6.1.32-v8+/kernel/drivers/media/i2c/dw9807-vcm.ko.xz
license:        GPL v2
description:    DW9807 VCM driver
author:         Chiang, Alan
srcversion:     1F6C21AE82A3684591E1B1D
alias:          of:N*T*Cdongwoon,dw9817-vcmC*
alias:          of:N*T*Cdongwoon,dw9817-vcm
alias:          of:N*T*Cdongwoon,dw9807-vcmC*
alias:          of:N*T*Cdongwoon,dw9807-vcm
depends:        v4l2-async,videodev,mc
intree:         Y
name:           dw9807_vcm
vermagic:       6.1.32-v8+ SMP preempt mod_unload modversions aarch64
atticusrussell commented 1 year ago

@naushir

any particular reason you are using Ubuntu and not a Raspberry Pi OS image? In the latter, Camera v3 will "just work" as intended.

If your question is about why as an OS, I am using Ubuntu in order to have compatibility with ROS as this computer is for my robot.

If you're asking about why I'm not trying to use a Raspberry pi kernel like from the raspberrypi/linux repo, I am still open to trying that. The reason I have not yet is that I was able to install the ubuntu 6.2.X kernel without compiling it myself (which is slightly tedious), and that I was slightly apprehensive to mix kernels and userspaces (although the kernel intended for raspian should be fine to run Ubuntu I think).

atticusrussell commented 1 year ago

@6by9

The VCM driver is dw9807_vcm. It supports multiple compatible strings to differentiate between dw9807 and dw9817

Ah as I was suspecting. Thanks for confirming! I'll first try enabling it in menuconfig when recompiling the Ubuntu kernel 6.2.x, and if that fails I'll look for any recompiled raspberrypi/linux 6.1y .deb files, and failing that I'll try to compile raspberrypi/linux and install that kernel.

That order of operations seem sane?

naushir commented 12 months ago

Any further updates on this issue? If not, I'll close this shortly.

atticusrussell commented 12 months ago

I took a bit of a break from trying to solve this issue and focused on just using a USB webcam I have. I still intend to try with a different kernel version, but I might not get around to it for a week or so. If there is a more relevant place for me to file an issue I would say go ahead and close the issue after I re-file it, but otherwise might be good to leave open in case others come across this issue.

naushir commented 11 months ago

I'll close this one now. Please do create another issue if you still run into problems when you revisit this.