Installing IMX519 libcamera drivers on RPi breaks RPi cam functionality

  1. Where did you get the camera module(s)?
    via kickstarter campaign → imx519, via raspberry pi foundation → imx219

  2. Model number of the product(s)?
    imx519, imx219

  3. What hardware/platform were you working on?
    Raspberry Pi 3B+ and Raspberry Pi 4

  4. Instructions you have followed. (link/manual/etc.)
    Raspberry Pi libcamera Guide - Arducam

  5. Problems you were having?
    I attach one camera at a time. The Arducam IMX519 works as expected. But after installing the custom drivers for the Arducam, the original pi camera does not work. In my use case, I need to have ONE raspbian image/setup, which supports both cameras (one at a time)

  6. The dmesg log from your hardware?
    [email protected]:~ $ dmesg

… CROPED because of limited characters in forum

[ 1.550694] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.552402] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.555451] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 1.557157] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.569054] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[ 1.569978] Waiting for root device PARTUUID=51894f34-02…
[ 1.626572] mmc1: new high speed SDIO card at address 0001
[ 1.670456] mmc0: new ultra high speed DDR50 SDHC card at address 59b4
[ 1.671393] mmcblk0: mmc0:59b4 USDU1 14.7 GiB
[ 1.673587] mmcblk0: p1 p2
[ 1.696470] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. O pts: (null)
[ 1.696538] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[ 1.697998] devtmpfs: mounted
[ 1.708245] Freeing unused kernel memory: 2048K
[ 1.737068] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[ 1.747350] Run /sbin/init as init process
[ 1.747365] with arguments:
[ 1.747380] /sbin/init
[ 1.747394] splash
[ 1.747408] with environment:
[ 1.747422] HOME=/
[ 1.747436] TERM=linux
[ 1.919712] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcd Device= 4.21
[ 1.919733] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 1.919751] usb 1-1: Product: USB2.0 Hub
[ 1.921698] hub 1-1:1.0: USB hub found
[ 1.922011] hub 1-1:1.0: 4 ports detected
[ 2.111380] systemd[1]: System time before build time, advancing clock.
[ 2.215980] NET: Registered protocol family 10
[ 2.217429] Segment Routing with IPv6
[ 2.294118] systemd[1]: systemd 247.3-6+rpi1 running in system mode. (+PAM +A UDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUT LS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default -hierarchy=unified)
[ 2.295002] systemd[1]: Detected architecture arm.
[ 2.297599] systemd[1]: Set hostname to .
[ 3.005671] systemd[1]: /lib/systemd/system/plymouth-start.service:16: Unit c onfigured to use KillMode=none. This is unsafe, as it disables systemd’s process lifecycle management for the service. Please update your service to use a safer KillMode=, such as ‘mixed’ or ‘control-group’. Support for KillMode=none is dep recated and will eventually be removed.
[ 3.205545] systemd[1]: Queued start job for default target Graphical Interfa ce.
[ 3.207253] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.209670] systemd[1]: Created slice system-getty.slice.
[ 3.210038] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.211040] systemd[1]: Created slice system-modprobe.slice.
[ 3.211178] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.212122] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[ 3.212955] systemd[1]: Created slice User and Session Slice.
[ 3.213525] systemd[1]: Started Forward Password Requests to Wall Directory W atch.
[ 3.214622] systemd[1]: Set up automount Arbitrary Executable File Formats Fi le System Automount Point.
[ 3.215392] systemd[1]: Reached target Slices.
[ 3.215627] systemd[1]: Reached target Swap.
[ 3.216648] systemd[1]: Listening on Syslog Socket.
[ 3.217501] systemd[1]: Listening on fsck to fsckd communication Socket.
[ 3.217977] systemd[1]: Listening on initctl Compatibility Named Pipe.
[ 3.219116] systemd[1]: Listening on Journal Audit Socket.
[ 3.219907] systemd[1]: Listening on Journal Socket (/dev/log).
[ 3.220894] systemd[1]: Listening on Journal Socket.
[ 3.227347] systemd[1]: Listening on udev Control Socket.
[ 3.228202] systemd[1]: Listening on udev Kernel Socket.
[ 3.229085] systemd[1]: Condition check resulted in Huge Pages File System be ing skipped.
[ 3.233764] systemd[1]: Mounting POSIX Message Queue File System…
[ 3.239495] systemd[1]: Mounting RPC Pipe File System…
[ 3.245767] systemd[1]: Mounting Kernel Debug File System…
[ 3.252811] systemd[1]: Mounting Kernel Trace File System…
[ 3.253295] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped.
[ 3.264193] systemd[1]: Starting Restore / save the current clock…
[ 3.272928] systemd[1]: Starting Set the console keyboard layout…
[ 3.279445] systemd[1]: Starting Create list of static device nodes for the c urrent kernel…
[ 3.286477] systemd[1]: Starting Load Kernel Module configfs…
[ 3.293820] systemd[1]: Starting Load Kernel Module drm…
[ 3.301690] systemd[1]: Starting Load Kernel Module fuse…
[ 3.310473] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[ 3.316704] systemd[1]: Starting File System Check on Root Device…
[ 3.333425] systemd[1]: Starting Journal Service…
[ 3.349020] systemd[1]: Starting Load Kernel Modules…
[ 3.356389] systemd[1]: Starting Coldplug All udev Devices…
[ 3.363342] fuse: init (API version 7.32)
[ 3.385971] systemd[1]: Mounted POSIX Message Queue File System.
[ 3.386800] systemd[1]: Mounted RPC Pipe File System.
[ 3.393244] systemd[1]: Mounted Kernel Debug File System.
[ 3.394279] systemd[1]: Mounted Kernel Trace File System.
[ 3.396211] systemd[1]: Finished Restore / save the current clock.
[ 3.403665] systemd[1]: Finished Create list of static device nodes for the c urrent kernel.
[ 3.405733] systemd[1]: [email protected]: Succeeded.
[ 3.407696] systemd[1]: Finished Load Kernel Module configfs.
[ 3.413249] systemd[1]: [email protected]: Succeeded.
[ 3.426270] systemd[1]: Finished Load Kernel Module fuse.
[ 3.429295] systemd[1]: [email protected]: Succeeded.
[ 3.430673] systemd[1]: Finished Load Kernel Module drm.
[ 3.439050] systemd[1]: Mounting FUSE Control File System…
[ 3.450027] systemd[1]: Mounting Kernel Configuration File System…
[ 3.454959] i2c /dev entries driver
[ 3.468029] systemd[1]: Started File System Check Daemon to report status.
[ 3.504789] systemd[1]: Finished Load Kernel Modules.
[ 3.505843] systemd[1]: Mounted FUSE Control File System.
[ 3.506532] systemd[1]: Mounted Kernel Configuration File System.
[ 3.538203] systemd[1]: Starting Apply Kernel Variables…
[ 3.626510] systemd[1]: Finished File System Check on Root Device.
[ 3.628728] systemd[1]: Finished Apply Kernel Variables.
[ 3.634714] systemd[1]: Starting Remount Root and Kernel File Systems…
[ 3.686965] systemd[1]: Started Journal Service.
[ 3.872830] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 3.941335] systemd-journald[136]: Received client request to flush runtime j ournal.
[ 4.054898] systemd-journald[136]: File /var/log/journal/6863a4a704a449d0b339 7f55bec3e7ce/system.journal corrupted or uncleanly shut down, renaming and repla cing.
[ 6.118741] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Reg isters at 0xfeb00000 length 0x00010000
[ 6.127158] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised : Registers at 0xfeb10000 length 0x00001000
[ 6.131468] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Reg isters at 0xfeb20000 length 0x00010000
[ 6.132076] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Regis ters at 0xfeb30000 length 0x00010000
[ 6.317627] vc_sm_cma: module is from the staging directory, the quality is u nknown, you have been warned.
[ 6.320385] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.330015] mc: Linux media interface: v0.10
[ 6.337134] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 6.337162] [vc_sm_connected_init]: start
[ 6.359082] bcm2835_audio bcm2835_audio: card created with 8 channels
[ 6.396340] videodev: Linux video capture interface: v2.00
[ 6.401927] [vc_sm_connected_init]: installed successfully
[ 6.437784] bcm2835_mmal_vchiq: module is from the staging directory, the qua lity is unknown, you have been warned.
[ 6.440188] bcm2835_mmal_vchiq: module is from the staging directory, the qua lity is unknown, you have been warned.
[ 6.448057] bcm2835_v4l2: module is from the staging directory, the quality i s unknown, you have been warned.
[ 6.454140] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.467619] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev /video13
[ 6.468123] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /de v/video14
[ 6.473845] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /de v/video15
[ 6.475005] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/ video16
[ 6.475037] bcm2835-isp bcm2835-isp: Register output node 0 with media contro ller
[ 6.475062] bcm2835-isp bcm2835-isp: Register capture node 1 with media contr oller
[ 6.475085] bcm2835-isp bcm2835-isp: Register capture node 2 with media contr oller
[ 6.475108] bcm2835-isp bcm2835-isp: Register capture node 3 with media contr oller
[ 6.484736] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev /video20
[ 6.485786] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /de v/video21
[ 6.486473] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /de v/video22
[ 6.486768] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/ video23
[ 6.486797] bcm2835-isp bcm2835-isp: Register output node 0 with media contro ller
[ 6.486835] bcm2835-isp bcm2835-isp: Register capture node 1 with media contr oller
[ 6.486858] bcm2835-isp bcm2835-isp: Register capture node 2 with media contr oller
[ 6.486880] bcm2835-isp bcm2835-isp: Register capture node 3 with media contr oller
[ 6.487515] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[ 6.514851] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.544542] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ 6.544590] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[ 6.546892] brcmstb-i2c fef04500.i2c: @97500hz registered in polling mode
[ 6.550597] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[ 6.550643] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[ 6.553020] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 6.553029] brcmstb-i2c fef09500.i2c: @97500hz registered in polling mode
[ 6.556016] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[ 6.556061] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[ 6.577283] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[ 6.577339] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[ 6.594474] Registered IR keymap rc-cec
[ 6.594676] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 6.594917] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input0
[ 6.647596] i2c i2c-22: Added multiplexed i2c bus 0
[ 6.649585] i2c i2c-10: Failed to register i2c client imx519 at 0x1a (-16)
[ 6.649620] i2c i2c-10: of_i2c: Failure registering /soc/i2c0mux/[email protected]/imx519 @1a
[ 6.649652] i2c i2c-10: Failed to create I2C device for /soc/i2c0mux/[email protected]/im [email protected]
[ 6.650247] i2c i2c-22: Added multiplexed i2c bus 10
[ 6.737966] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 6.740649] Registered IR keymap rc-cec
[ 6.740841] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 6.741066] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input1
[ 6.780253] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 1
[ 6.876110] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 6.922963] Registered IR keymap rc-cec
[ 6.923160] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 6.923392] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input2
[ 6.991590] cfg80211: Loading compiled-in X.509 certificates for regulatory d atabase
[ 7.068664] cfg80211: Loaded X.509 cert ‘sforshee: 00b28ddf47aef9cea7’
[ 7.091927] cfg80211: loaded regulatory.db is malformed or signature is missi ng/invalid
[ 7.156437] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 7.167135] brcmfmac: F1 signature read @0x18000000=0x15264345
[ 7.186157] Registered IR keymap rc-cec
[ 7.186278] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio f or chip BCM4345/6
[ 7.186364] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 7.186614] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input3
[ 7.187166] usbcore: registered new interface driver brcmfmac
[ 7.362134] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 7.390171] Registered IR keymap rc-cec
[ 7.390364] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 7.390634] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input4
[ 7.439102] random: crng init done
[ 7.439118] random: 7 urandom warning(s) missed due to ratelimiting
[ 7.446973] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio f or chip BCM4345/6
[ 7.447163] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio f or chip BCM4345/6
[ 7.461934] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Jan 4 2021 19:56:29 version 7.45.229 (617f1f5 CY) FWID 01-2dbd9d2e
[ 7.915413] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 7.945229] Registered IR keymap rc-cec
[ 7.945469] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 7.945804] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input5
[ 7.955130] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops [vc4])
[ 8.020566] Registered IR keymap rc-cec
[ 8.020788] rc rc1: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1
[ 8.021069] input: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1/input6
[ 8.028968] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops [vc4])
[ 8.029406] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4])
[ 8.029762] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.030073] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.030477] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.030774] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.031129] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.032735] [drm] No displays found. Consider forcing hotplug if HDMI is atta ched
[ 8.032853] vc4-drm gpu: bound fe600000.firmwarekms (ops vc4_fkms_ops [vc4])
[ 8.133247] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 0
[ 8.134096] vc4-drm gpu: [drm] Cannot find any crtc or sizes
[ 8.187252] 8021q: 802.1Q VLAN Support v1.8
[ 8.261349] uart-pl011 fe201000.serial: no DMA platform data
[ 8.528928] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:1 02396k SSFS
[ 8.582722] ov5647: probe of 10-0036 failed with error -121
[ 8.648553] bcmgenet fd580000.ethernet: configuring instance for external RGM II (RX delay)
[ 8.650978] bcmgenet fd580000.ethernet eth0: Link is Down
[ 8.708773] imx477 10-001a: xclk frequency not supported: 25000000 Hz
[ 8.708814] imx477: probe of 10-001a failed with error -22
[ 8.751684] imx219 10-0010: xclk frequency not supported: 25000000 Hz
[ 8.751723] imx219: probe of 10-0010 failed with error -22
[ 8.948859] ak7375: loading out-of-tree module taints kernel.
[ 9.229089] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[ 14.915740] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 15.903490] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_ dai_startup on i2s-hifi: -19
[ 15.904399] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_ dai_startup on i2s-hifi: -19
[ 16.343979] ICMPv6: process `dhcpcd’ is using deprecated sysctl (syscall) net .ipv6.neigh.wlan0.retrans_time - use net.ipv6.neigh.wlan0.retrans_time_ms instea d
[ 16.361601] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_ dai_startup on i2s-hifi: -19
[ 16.362002] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_ dai_startup on i2s-hifi: -19
[ 16.362356] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_ dai_startup on i2s-hifi: -19
[ 16.387428] hdmi-audio-codec hdmi-audio-codec.6.auto: ASoC: error at snd_soc_ dai_startup on i2s-hifi: -19
[ 16.388865] hdmi-audio-codec hdmi-audio-codec.6.auto: ASoC: error at snd_soc_ dai_startup on i2s-hifi: -19
[ 16.406445] hdmi-audio-codec hdmi-audio-codec.6.auto: ASoC: error at snd_soc_ dai_startup on i2s-hifi: -19
[ 16.406748] hdmi-audio-codec hdmi-audio-codec.6.auto: ASoC: error at snd_soc_ dai_startup on i2s-hifi: -19
[ 16.407523] hdmi-audio-codec hdmi-audio-codec.6.auto: ASoC: error at snd_soc_ dai_startup on i2s-hifi: -19
[ 16.420466] Bluetooth: Core ver 2.22
[ 16.420541] NET: Registered protocol family 31
[ 16.420549] Bluetooth: HCI device and connection manager initialized
[ 16.420567] Bluetooth: HCI socket layer initialized
[ 16.420580] Bluetooth: L2CAP socket layer initialized
[ 16.420598] Bluetooth: SCO socket layer initialized
[ 16.436837] Bluetooth: HCI UART driver ver 2.3
[ 16.436849] Bluetooth: HCI UART protocol H4 registered
[ 16.436911] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 16.440107] Bluetooth: HCI UART protocol Broadcom registered
[ 19.686220] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 19.686229] Bluetooth: BNEP filters: protocol multicast
[ 19.686241] Bluetooth: BNEP socket layer initialized
[ 19.709275] NET: Registered protocol family 38
[ 19.751221] cryptd: max_cpu_qlen set to 1000
[ 19.917235] Bluetooth: RFCOMM TTY layer initialized
[ 19.917252] Bluetooth: RFCOMM socket layer initialized
[ 19.917273] Bluetooth: RFCOMM ver 1.11
[ 31.837096] imx519_vddl: disabling
[ 31.837116] imx519_vdig: disabling
[ 31.837133] cam-dummy-reg: disabling
[ 31.837157] imx519_vana: disabling

  1. Troubleshooting attempts you’ve made?
  • reinstalling the latest bullseye image
  • changing the camera module (imx219)
  • changing the raspberry pi between 3 and 4
  1. What help do you need?
    I need to be able to run both cameras (not at the same time) on one Raspberry Pi.
1 Like

Hi @Openscan

Check this:
libcamera - switch back to the official camera.pdf (102.7 KB)

1 Like

You are great! Thank you very much for your fast reply and overall great development service!!
I will immediately try your solution

I have checked and it works perfectly!

I am currently implementing a firmware to support as many cameras as possible. The user can change between the following:

dtoverlay=imx519
#dtoverlay=imx219
#dtoverlay=ov5647
#dtoverlay=imx477
#dtoverlay=imx290,clock-frequency=74250000
#dtoverlay=imx290,clock-frequency=74250000
#dtoverlay=imx378
#dtoverlay=ov9281

but I wonder if there are more cameras from Arducam that I could add, if so, please let me know which sensors are supported by the libcamera library (given the install link from my first post)

We also have a series called Pivariety, which currently supports IMX230, IMX298, IMX462, OV9281, OV2311, AR0234, etc., but they share the same driver, just need to add dtoverlay=arducam in /boot/config.txt: