# Rasperry PI Device Configuration BALENA\_HOST\_CONFIG Bug?

**URL:** <https://forums.balena.io/t/rasperry-pi-device-configuration-balena-host-config-bug/375060>\
**Category:** Product support\
**Created:** [November 7, 2025, 9:55pm UTC](https://forums.balena.io/t/rasperry-pi-device-configuration-balena-host-config-bug/375060 "2025-11-07T21:55:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![efe](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@efe](https://forums.balena.io/u/efe)\
**Post date:** [November 7, 2025, 9:55pm UTC](https://forums.balena.io/t/rasperry-pi-device-configuration-balena-host-config-bug/375060/1 "2025-11-07T21:55:48Z")

</div>

Hi all, I am getting some odd behavior from the Balena Cloud Device Configuration page.

The document located at [Advanced boot settings | balena](https://docs.balena.io/reference/OS/advanced/) indicates the following behavior:

BALENA\_HOST\_CONFIG\_dtoverlay = i2c-rtc,ds1307 shall result in

```auto
dtoverlay=i2c-rtc,ds1307

```

in the /mnt/bott/config.txt file, and oddly enough, before I made a change in the Custom configuration section to try to set the above value to things did seem to work based on the original value which was set as “vc4-kms-v3d,cma-320” this resulted in properly in config.txt as dtoverlay=vc4-kms-v3d,cma-320.

After I made the addition under Custom Config to obtain the behavior of

dtoverlay=vc4-kms-dsi-waveshare-panel,4\_0\_inch

first using

BALENA\_HOST\_CONFIG\_dtoverlay = vc4-kms-dsi-waveshare-panel,4\_0\_inch

when that didn’t work using:  
BALENA\_HOST\_CONFIG\_dtoverlay = “vc4-kms-dsi-waveshare-panel,4\_0\_inch”

(notice the ““ because that syntax is also mentioned in the doc)

I am getting the following in the actual host

root@691f313:~# cat /mnt/boot/config.txt  
avoid\_warnings=1  
disable\_overscan=1  
disable\_splash=1  
dtparam=audio=on  
dtparam=i2c\_arm=on  
dtparam=spi=on  
dtparam=audio=on  
enable\_uart=0  
gpu\_mem=16  
dtoverlay=vc4-kms-dsi-waveshare-panel  
dtparam=4\_0\_inch

And if I delete my custom config parameter to go back to the original, I now started getting:

root@691f313:~# cat /mnt/boot/config.txt  
avoid\_warnings=1  
disable\_overscan=1  
disable\_splash=1  
dtparam=audio=on  
dtparam=i2c\_arm=on  
dtparam=spi=on  
dtparam=audio=on  
enable\_uart=0  
gpu\_mem=16  
dtoverlay=vc4-kms-v3d  
dtparam=cma-320

So please help me out here, how do i get balena to give me a properly edited config.txt file? One other clue here, until I edited the Custom Configs section it looked like balena was actually putting a default config.txt on the host device because it had a bunch of lines commented out in it after the change to Custom Configs section my config.txt only has the values set under the Device Congfiguration section, as shown in the cloud.

---

<div class="post-metadata">

**Author:** ![efe](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@efe](https://forums.balena.io/u/efe)\
**Post date:** [November 9, 2025, 6:07am UTC](https://forums.balena.io/t/rasperry-pi-device-configuration-balena-host-config-bug/375060/2 "2025-11-09T06:07:48Z")

</div>

> [@efe](#):
>
> dtoverlay=vc4-kms-dsi-waveshare-panel  
> dtparam=4\_0\_inch

Let me also add that it looks like a previous response from the Balena team member ( [Problems adding dtparam and dtoverlay variables in /boot/config.txt - #3 by shaunmulligan1](https://forums.balena.io/t/problems-adding-dtparam-and-dtoverlay-variables-in-boot-config-txt/370976/3) ) indicates that the **dtparam=4\_0\_inch** on a separate line should be equivalent to **dtoverlay=vc4-kms-dsi-waveshare-panel,4\_0\_inch** , however this is not the case for the screen I am trying to get working which is documented here [https://www.waveshare.com/wiki/4inch\_DSI\_LCD](https://www.waveshare.com/wiki/4inch_DSI_LCD).

If i just use a vanilla install on raspberry pi (not using balena) and use **dtoverlay=vc4-kms-dsi-waveshare-panel,4\_0\_inch** in config.txt the screen functions as it should.

---

<div class="post-metadata">

**Author:** ![rahul-thakoor](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@rahul-thakoor](https://forums.balena.io/u/rahul-thakoor)\
**Post date:** [November 10, 2025, 3:21pm UTC](https://forums.balena.io/t/rasperry-pi-device-configuration-balena-host-config-bug/375060/3 "2025-11-10T15:21:58Z")

</div>

Hello @efe

Which device type and `balenaOS` version are you using?

> Let me also add that it looks like a previous response from the Balena team member ( [Problems adding dtparam and dtoverlay variables in /boot/config.txt - #3 by shaunmulligan1](https://forums.balena.io/t/problems-adding-dtparam-and-dtoverlay-variables-in-boot-config-txt/370976/3) ) indicates that the **dtparam=4\_0\_inch** on a separate line should be equivalent to **dtoverlay=vc4-kms-dsi-waveshare-panel,4\_0\_inch** , however this is not the case for the screen I am trying to get working which is documented here [https://www.waveshare.com/wiki/4inch\_DSI\_LCD](https://www.waveshare.com/wiki/4inch_DSI_LCD).

Yes,

```auto
dtoverlay=vc4-kms-dsi-waveshare-panel
dtparam=4_0_inch

```

should be equivalent to `dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch` as per the official Raspberry Pi Foundation documentation: [https://www.raspberrypi.com/documentation/computers/configuration.html#part3.2](https://www.raspberrypi.com/documentation/computers/configuration.html#part3.2)

> If i just use a vanilla install on raspberry pi (not using balena) and use **dtoverlay=vc4-kms-dsi-waveshare-panel,4\_0\_inch** in config.txt the screen functions as it should.

[As per the documentation you shared](https://www.waveshare.com/wiki/4inch_DSI_LCD), it seems that you require both `dtoverlay=vc4-kms-v3d` and `dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch`, so the correct value for the config value should be:

`BALENA_HOST_CONFIG_dtoverlay = "vc4-kms-v3d", “vc4-kms-dsi-waveshare-panel,4_0_inch”` which should result in:

```auto
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dsi-waveshare-panel
dtparam=4_0_inch

```

if you are using balena supervisor version 16+. [This is highlighted in the docs](https://docs.balena.io/reference/OS/advanced/#:~:text=As%20of%20Supervisor%20v16%252B%252C%20the%20above%20will%20translate%20to%253A).

Hope this helps. Let u know how it goes!

---

<div class="post-metadata">

**Author:** ![efe](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@efe](https://forums.balena.io/u/efe)\
**Post date:** [November 10, 2025, 5:02pm UTC](https://forums.balena.io/t/rasperry-pi-device-configuration-balena-host-config-bug/375060/4 "2025-11-10T17:02:05Z")

</div>

> [@rahul-thakoor](#):
>
> “vc4-kms-v3d”, “vc4-kms-dsi-waveshare-panel,4\_0\_inch”

Rahul,

Thank you for your response. I agree with your recommendation and expectation of how balena should function in terms of creating the config.txt.

Let me start with providing a direct response regarding the OS level, i am currently using: balenaOS 6.5.50+rev3

As you suggested, I have the same expectations based on the documentation provided, I have set the values as you have also suggested (please see the attached images), but the output i am getting still looks like the following leading me to believe that there is a bug with the sub system parsing the strings from balena cloud UI and actually creating the config.txt files.

root@c5da87f:~# cat /mnt/boot/config.txt  
avoid\_warnings=1  
disable\_overscan=1  
disable\_splash=1  
dtparam=audio=on  
dtparam=i2c\_arm=on  
dtparam=spi=on  
dtparam=audio=on  
enable\_uart=0  
gpu\_mem=16  
dtoverlay=vc4-kms-dsi-waveshare-panel  
dtparam=4\_0\_inch

 ![RESIN_HOST_CONFIG_dtoverlay_2](https://global.discourse-cdn.com/balena/original/2X/6/63a75c23945473f581b42dbc5bfde51fa5b9da2c.png)

 ![RESIN_HOST_CONFIG_dtoverlay](https://global.discourse-cdn.com/balena/original/2X/b/b808f24b207c3709de4b2e92210e74728c7cb4fb.png)

---

<div class="post-metadata">

**Author:** ![efe](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@efe](https://forums.balena.io/u/efe)\
**Post date:** [November 11, 2025, 3:58am UTC](https://forums.balena.io/t/rasperry-pi-device-configuration-balena-host-config-bug/375060/5 "2025-11-11T03:58:00Z")

</div>

@rahul to clarify my previous note the part of the documentation that doesn’t seem to be working is the section in the [document](https://docs.balena.io/reference/OS/advanced/#:~:text=As%20of%20Supervisor%20v16%252B%252C%20the%20above%20will%20translate%20to%253A) you also referenced. Towards the end the [document](https://docs.balena.io/reference/OS/advanced/#:~:text=As%20of%20Supervisor%20v16%252B%252C%20the%20above%20will%20translate%20to%253A) states:

”_This parsing will only be done if the value is a valid string, so if it doesn’t begin with a quote `"`, the value will be parsed as a single string and not split into several lines. For instance `BALENA_HOST_CONFIG_dtoverlay = i2c-rtc,ds1307` will translate to: **dtoverlay=i2c-rtc,ds1307** _”

Even if i set my string without “ as **vc4-kms-dsi-waveshare-panel,4\_0\_inch** this does not translate into dtoverlay=vc4-kms-dsi-waveshare-panel,4\_0\_inch which is the behavior I am explicitly seeking. And it looks like my device requires.

 ![RESIN_HOST_CONFIG_dtoverlay_3](https://global.discourse-cdn.com/balena/original/2X/e/efc6bec1088b2d8b8c8481b61889f45bbeb809ea.png)

From the manufacturers doc, I need to be able to produce _ **dtoverlay=vc4-kms-dsi-waveshare-panel,4\_0\_inch** _ in the actual config.txt, if i do this manually than the screen will work, how do I accomplish this using Balena cloud?

---

<div class="post-metadata">

**Author:** ![rahul-thakoor](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@rahul-thakoor](https://forums.balena.io/u/rahul-thakoor)\
**Post date:** [November 11, 2025, 7:59am UTC](https://forums.balena.io/t/rasperry-pi-device-configuration-balena-host-config-bug/375060/6 "2025-11-11T07:59:02Z")

</div>

Hello @efe

Thanks for the additional context.

Just to confirm, I tried to reproduce this on a Raspberry Pi 4 running balenaOS `6.5.50+rev7` and supervisor version `17.0.3`

When I use `BALENA_HOST_CONFIG_dtoverlay = "vc4-kms-v3d", "vc4-kms-dsi-waveshare-panel,4_0_inch"`,

the following gets applied **as expected** :

```auto
root@4f9794b:~# cat /mnt/boot/config.txt 
avoid_warnings=1
disable_splash=1
dtparam=i2c_arm=on
dtparam=spi=on
dtparam=audio=on
enable_uart=0
gpu_mem=16
otg_mode=1
dtoverlay=vc4-kms-v3d
dtparam=cma-320
dtoverlay=vc4-kms-dsi-waveshare-panel
dtparam=4_0_inch

```

However, I did try to add `BALENA_HOST_CONFIG_dtoverlay = vc4-kms-dsi-waveshare-panel,4_0_inch`, no “quotes” and indeed, I’m still seeing

```auto
root@4f9794b:~# cat /mnt/boot/config.txt 
avoid_warnings=1
disable_splash=1
dtparam=i2c_arm=on
dtparam=spi=on
dtparam=audio=on
enable_uart=0
gpu_mem=16
otg_mode=1
dtoverlay=vc4-kms-dsi-waveshare-panel
dtparam=4_0_inch

```

which is a different behaviour from what’s described in the docs. I’m looking further into this and will get back.

Can you please confirm the following:

- which device type are you using?
- is only `dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch` required for the display to function? or do you also need `vc4-kms-v3d`? in your tests it seems you are only adding `vc4-kms-dsi-waveshare-panel`
- have you tested with

```auto
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dsi-waveshare-panel
dtparam=4_0_inch

```

on a vanilla Raspberry Pi OS setup and confirm that it does not work?

- The reason I ask the above is because the documentation from the Raspberry Pi foundation mention that it should functionally be the same as `dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch`
- did the manufacturer, waveshare, explicitly confirm that the dtoverlay definition should be on the same line? I’m not convinced of this because the raspberry pi firmware would interprete the separate `dtparam` line accordingly and setup the dtoverlay in the same way as `dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch`

Thanks

---

<div class="post-metadata">

**Author:** ![efe](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@efe](https://forums.balena.io/u/efe)\
**Post date:** [November 11, 2025, 4:13pm UTC](https://forums.balena.io/t/rasperry-pi-device-configuration-balena-host-config-bug/375060/7 "2025-11-11T16:13:47Z")

</div>

@rahul-thakoor Thank you again for the follow-up and validating the behavior on your end, let me respond to your questions in line:

Can you please confirm the following:

- which device type are you using?  
_[response] Raspberry Pi 3 (using 64bit OS) + [waveshare 4inch DSI LCD](https://www.waveshare.com/wiki/4inch_DSI_LCD). I do also have a Raspberry Pi 4 available but the behavior there doesn’t seem to be any different. I have reproduced the issue using Supervisor_ _17.2.0 and 17.0.3 on balenaOS 6.5.50+rev3. I also tried this on 2 instances spinning up a brand new device from scratch._

- is only `dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch` required for the display to function? or do you also need `vc4-kms-v3d`? in your tests it seems you are only adding `vc4-kms-dsi-waveshare-panel`  
_[response] only `dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch` is required. I do not need `vc4-kms-v3d`_

- have you tested with

```auto
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dsi-waveshare-panel
dtparam=4_0_inch

```

on a vanilla Raspberry Pi OS setup and confirm that it does not work?

_[response] yes i have tried both do **not** work on vanilla Raspberry Pi OS_

```auto
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dsi-waveshare-panel
dtparam=4_0_inch

```

and

```auto
dtoverlay=vc4-kms-dsi-waveshare-panel
dtparam=4_0_inch

```

- The reason I ask the above is because the documentation from the Raspberry Pi foundation mention that it should functionally be the same as `dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch `  
_[response] I agree in that I would have expected this to work but it seems like it does not_

- did the manufacturer, waveshare, explicitly confirm that the dtoverlay definition should be on the same line? I’m not convinced of this because the raspberry pi firmware would interprete the separate `dtparam` line accordingly and setup the dtoverlay in the same way as `dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch`  
_[response I have reached out to Waveshare and have also created a ticket with them, and I am currently waiting for a response. I would again agree that if they are functionally equal (using dtparam vs ,) that it should be working. But this doesn’t seem to be the case. However, I again want to point out the Balena documentation explicitly states you should be able to make the config.txt contain `dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch`by not using quotes “, but this doesn’t seem to be working. Thank you for your follow-up on this issue._

---

<div class="post-metadata">

**Author:** ![rahul-thakoor](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@rahul-thakoor](https://forums.balena.io/u/rahul-thakoor)\
**Post date:** [November 14, 2025, 10:46am UTC](https://forums.balena.io/t/rasperry-pi-device-configuration-balena-host-config-bug/375060/8 "2025-11-14T10:46:29Z")

</div>

hello @efe

> _However, I again want to point out the Balena documentation explicitly states you should be able to make the config.txt contain `dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch`by not using quotes “, but this doesn’t seem to be working. Thank you for your follow-up on this issue._

thanks for highlighting this issue. I have tested on my end and this behaviour is no longer applicable when using supervisor v16+. Even if you use a single overlay that has params, it will be added in the following format.

```auto
dtoverlay=
dtparam=

```

However, the above method is the recommended way of adding dtoverlays, and we have not seen any other reports as to this not working or causing compatibily issues.

Thanks for highlighting the errata in our docs, I will fix that.

* * *

So I want to circle back and confirm whether we are missing other things?

In particular you mention:

> _ **is only dtoverlay=vc4-kms-dsi-waveshare-panel,4\_0\_inch required for the display to function? or do you also need vc4-kms-v3d? in your tests it seems you are only adding vc4-kms-dsi-waveshare-panel** _  
> [response] only dtoverlay=vc4-kms-dsi-waveshare-panel,4\_0\_inch is required. I do not need vc4-kms-v3d

I checked the dtoverlay doc here: [linux/arch/arm/boot/dts/overlays/README at 3829e1b98f3d2750b8b38abfdb4a142a0d8e4590 · raspberrypi/linux · GitHub](https://github.com/raspberrypi/linux/blob/3829e1b98f3d2750b8b38abfdb4a142a0d8e4590/arch/arm/boot/dts/overlays/README#L5663)

it mentions:  
`Requires vc4-kms-v3d to be loaded.`

 ![image](https://global.discourse-cdn.com/balena/original/2X/d/d9035a1b03b477d115795696121415cee8db48fe.png)

The docs from waveshare also include `vc4-kms-v3d`

 ![image](https://global.discourse-cdn.com/balena/original/2X/6/65bf4317031c15a28f61e558ff678c333e2e6c04.png)

So, can you please try again, but with the following  
`BALENA_HOST_CONFIG_dtoverlay = "vc4-kms-v3d", "vc4-kms-dsi-waveshare-panel,4_0_inch"`

 ![image](https://global.discourse-cdn.com/balena/original/2X/f/f42c399a596b08cd77dac1e915af30dd00d657e3.png)

Also, please make sure you are using **DSI1** interface.  
Otherwise, you will have to adjust the dtoverlay to the following if you are using DSI0:

`BALENA_HOST_CONFIG_dtoverlay = "vc4-kms-v3d", "dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch,dsi0"`

Hope this helps.  
Rahul

---

<div class="post-metadata">

**Author:** ![efe](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@efe](https://forums.balena.io/u/efe)\
**Post date:** [November 14, 2025, 3:43pm UTC](https://forums.balena.io/t/rasperry-pi-device-configuration-balena-host-config-bug/375060/9 "2025-11-14T15:43:50Z")

</div>

> [@rahul-thakoor](#):
>
> BALENA\_HOST\_CONFIG\_dtoverlay = “vc4-kms-v3d”, “vc4-kms-dsi-waveshare-panel,4\_0\_inch”

Thank you for the response. Waveshare also responded. Using the string above, you suggested has resulted in my LCD screen functioning.

Thank you again
