# Can't get libcamera to work with new 'Camera Module v3'

**URL:** <https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977>\
**Category:** Project help\
**Tags:** picamera, raspberrypi4\
**Created:** [February 28, 2023, 1:40pm UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977 "2023-02-28T13:40:31Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jessseee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jessseee/32/9672_2.png) [@Jessseee](https://forums.balena.io/u/Jessseee)\
**Post date:** [February 28, 2023, 1:40pm UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/1 "2023-02-28T13:40:31Z")

</div>

I am currently trying to get a project started using the Raspberry Pi 4B and the [camera module v3](https://www.raspberrypi.com/products/camera-module-3/). However, I cannot get it to detect the camera. I am on [balenaOS 2.108.27](https://github.com/balena-os/meta-balena/blob/master/CHANGELOG.md) and using the [balena-io-experimental/libcamera-apps](https://github.com/balena-io-experimental/libcamera-apps) repo. I set all the configuration variables in the dashboard and I tried running with local mode on/off. I also tried to set `RESIN_HOST_CONFIG_dtoverlay: "vc4-kms-v3d", "imx708"` for the new sensor type. The setup worked fine without Balena on RaspbianOS Bullseye 64bit. Any help is very much appreciated!

---

<div class="post-metadata">

**Author:** ![Jessseee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jessseee/32/9672_2.png) [@Jessseee](https://forums.balena.io/u/Jessseee)\
**Post date:** [March 4, 2023, 2:58pm UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/2 "2023-03-04T14:58:39Z")

</div>

Well, I think I found the problem… The imx708 overlay is not yet included in the kernel used by BalenaOS 2.108.27. I could have guessed as much. The current kernel version is `5.15.34-v8` and if I am right the imx708 overlay should be included in kernel version `5.15.84`.  
 ![image](https://global.discourse-cdn.com/balena/original/2X/f/f188ea5bc0bd5d0a1a6186ce9ef18ba8035d3b0d.png)

---

<div class="post-metadata">

**Author:** ![Jessseee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jessseee/32/9672_2.png) [@Jessseee](https://forums.balena.io/u/Jessseee)\
**Post date:** [March 9, 2023, 10:31am UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/3 "2023-03-09T10:31:32Z")

</div>

I created a pull-request on meta-raspberrypi. Hopefully this speeds things up.

> <https://github.com/agherzan/meta-raspberrypi/pull/1158>
>
> I would like to see support for the Raspberry Pi Camera Module v3 which uses the… imx708 sensor. Therefore, I added the required device tree overlay and config. I am not able to test this right now but it would be great if an admin could verify this patch.

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [March 9, 2023, 12:10pm UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/6 "2023-03-09T12:10:28Z")

</div>

Hello @Jessseee thank you for adding the support of the Camera Module v3 for Raspberry Pi and prepare the PR!

I pinged internally the balenaOS team to see if we can accept the PR. We will keep you updated 🙂

Let us know if we can help you more!

---

<div class="post-metadata">

**Author:** ![Jessseee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jessseee/32/9672_2.png) [@Jessseee](https://forums.balena.io/u/Jessseee)\
**Post date:** [March 9, 2023, 12:33pm UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/7 "2023-03-09T12:33:29Z")

</div>

Awesome, thank you! 👍 Once the PR is merged I’ll test it as soon as possible and I’ll let you know if everything works as expected.

---

<div class="post-metadata">

**Author:** ![imashin](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imashin/32/8831_2.png) [@imashin](https://forums.balena.io/u/imashin)\
**Post date:** [March 11, 2023, 11:38am UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/9 "2023-03-11T11:38:35Z")

</div>

Thank you for your investigating this.

Do you know the workaround to use camera module v3 with the current version BalenaOS?

I put [imx708.dtbo](https://github.com/raspberrypi/firmware/blob/master/boot/overlays/imx708.dtbo) on /mnt/boot/overlays and set dtoverlay config, but it does not detect the camera module.

---

<div class="post-metadata">

**Author:** ![Jessseee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jessseee/32/9672_2.png) [@Jessseee](https://forums.balena.io/u/Jessseee)\
**Post date:** [April 3, 2023, 6:28am UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/14 "2023-04-03T06:28:00Z")

</div>

@mpous any updates on the Raspberry Pi Camera Module v3 support?

---

<div class="post-metadata">

**Author:** ![Jessseee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jessseee/32/9672_2.png) [@Jessseee](https://forums.balena.io/u/Jessseee)\
**Post date:** [April 3, 2023, 7:02am UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/15 "2023-04-03T07:02:13Z")

</div>

@imashin I think the dts files have to be there at build time to be added as proper dtoverlays. Based on PR [#798](https://github.com/balena-os/balena-raspberrypi/pull/798) on balena-os/balena-raspberrypi.

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [April 5, 2023, 10:15am UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/17 "2023-04-05T10:15:51Z")

</div>

Hello @Jessseee a colleague just received this camera and he will be testing how to run the Camera Module v3 with balena.

Stay tunned and let us know if you had any successful experience.

---

<div class="post-metadata">

**Author:** ![Jessseee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jessseee/32/9672_2.png) [@Jessseee](https://forums.balena.io/u/Jessseee)\
**Post date:** [April 17, 2023, 5:59pm UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/20 "2023-04-17T17:59:53Z")

</div>

My [pull-request](https://github.com/agherzan/meta-raspberrypi/pull/1158) on meta-raspberrypi got merged. Hopefully that will help getting the Camera Module v3 to work on BalenaOS.

---

<div class="post-metadata">

**Author:** ![Jessseee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jessseee/32/9672_2.png) [@Jessseee](https://forums.balena.io/u/Jessseee)\
**Post date:** [April 29, 2023, 11:12am UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/21 "2023-04-29T11:12:46Z")

</div>

Unfortunately I did not notice meta-balena uses the Kirkstone branch of meta-raspberrypi. I created a [new pull-request](https://github.com/agherzan/meta-raspberrypi/pull/1172) for the same changes to be applied to kirkstone.

---

<div class="post-metadata">

**Author:** ![Jessseee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jessseee/32/9672_2.png) [@Jessseee](https://forums.balena.io/u/Jessseee)\
**Post date:** [July 6, 2023, 12:39pm UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/22 "2023-07-06T12:39:48Z")

</div>

Due to the device tree overlay missing from kernel 5.10, I had to create a compatibility layer in the Kirkstone branch of meta-raspberrypi. Here is the [latest pull-request](https://github.com/agherzan/meta-raspberrypi/pull/1197).

---

<div class="post-metadata">

**Author:** ![rapha](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/rapha/32/1239_2.png) [@rapha](https://forums.balena.io/u/rapha)\
**Post date:** [October 17, 2023, 3:17pm UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/23 "2023-10-17T15:17:12Z")

</div>

Hey @Jessseee glad to hear you are on it. Very much looking forward to it.  
Thanks ❤

---

<div class="post-metadata">

**Author:** ![rapha](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/rapha/32/1239_2.png) [@rapha](https://forums.balena.io/u/rapha)\
**Post date:** [March 4, 2024, 5:08pm UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/24 "2024-03-04T17:08:07Z")

</div>

@Jessseee was there any further movement anywhere? I saw a few back and forth on the PR, but that was it.

@mpous is there a scheduled upgrade from kirkstone anytime soon? @Jessseee Which meta-raspberrypi branch is your change in?

---

<div class="post-metadata">

**Author:** ![Jessseee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jessseee/32/9672_2.png) [@Jessseee](https://forums.balena.io/u/Jessseee)\
**Post date:** [March 4, 2024, 5:48pm UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/25 "2024-03-04T17:48:49Z")

</div>

The original option to enable the device-tree overlay was in this [pull-request](https://github.com/agherzan/meta-raspberrypi/pull/1158) and was merged into `master`. However, because of the older 5.10 kernel in Kirkstone the dt-overlay files are completely missing and need to be added for which I wrote a backport that you can find in the still open [pull-request](https://github.com/agherzan/meta-raspberrypi/pull/1197). So for this to be included in balena-raspberrypi it either needs to update to a meta-raspberrypi version that no longer requires support for kernel 5.10 or the backport has to be merged into the Kirkstone branch. @mpous did you colleague end up having time to test the Raspberry Pi camera V3?

---

<div class="post-metadata">

**Author:** ![PaintedSnipe](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@PaintedSnipe](https://forums.balena.io/u/PaintedSnipe)\
**Post date:** [March 5, 2024, 4:16am UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/26 "2024-03-05T04:16:34Z")

</div>

hi @Jessseee on the [pr-1197](https://github.com/agherzan/meta-raspberrypi/pull/1197) there is an unresolved conversation and a failed check. I hope that changes will be merged once you resolved these. Can you please look in to it.

---

<div class="post-metadata">

**Author:** ![Jessseee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jessseee/32/9672_2.png) [@Jessseee](https://forums.balena.io/u/Jessseee)\
**Post date:** [March 5, 2024, 7:09am UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/27 "2024-03-05T07:09:21Z")

</div>

@PaintedSnipe the unresolved conversation is not directed at me and the failed check is not related to my code changes. There is not much I can do at this moment to get this to be merged. We will simply have to wait on **[@agherzan](https://github.com/agherzan)**.

---

<div class="post-metadata">

**Author:** ![ahmet](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@ahmet](https://forums.balena.io/u/ahmet)\
**Post date:** [December 4, 2024, 10:43am UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/28 "2024-12-04T10:43:48Z")

</div>

Hi, I have a project in mind using cam module v3 and stumbled on this topic. Just would like to ask if it’s supporting now or else we still need to wait ?

---

<div class="post-metadata">

**Author:** ![alanb128](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/alanb128/32/2839_2.png) [@alanb128](https://forums.balena.io/u/alanb128)\
**Post date:** [December 24, 2024, 9:21pm UTC](https://forums.balena.io/t/cant-get-libcamera-to-work-with-new-camera-module-v3/366977/29 "2024-12-24T21:21:59Z")

</div>

Hello @ahmet I can confirm that I was able to detect Camera Module v3 on a Pi 4 running balenaOS, using this example: [GitHub - balena-io-experimental/libcamera-apps: Example repo to showcase Raspberry Pi's new libcamera stack on balenaOS](https://github.com/balena-io-experimental/libcamera-apps)
