# Unable to Install Driver for Waveshare 3.5-Inch Touchscreen on BalenaOS

**URL:** <https://forums.balena.io/t/unable-to-install-driver-for-waveshare-3-5-inch-touchscreen-on-balenaos/372405>\
**Category:** Product support\
**Tags:** docker, raspberrypi4, lcd\
**Created:** [November 3, 2024, 4:28pm UTC](https://forums.balena.io/t/unable-to-install-driver-for-waveshare-3-5-inch-touchscreen-on-balenaos/372405 "2024-11-03T16:28:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cemothy](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Cemothy](https://forums.balena.io/u/Cemothy)\
**Post date:** [November 3, 2024, 4:28pm UTC](https://forums.balena.io/t/unable-to-install-driver-for-waveshare-3-5-inch-touchscreen-on-balenaos/372405/1 "2024-11-03T16:28:44Z")

</div>

Hello Balena Community,

I’m working on setting up a Waveshare 3.5-inch touchscreen display on my Raspberry Pi with BalenaOS, and I’m having difficulty installing the driver and configuration. I’m new to working with microcontrollers and Balena, so any help would be greatly appreciated!

Here’s a summary of my setup, the steps I’ve taken, and the issues I’m running into.

### Setup and Context

- **Display** : Waveshare 3.5-inch touchscreen
- **Additional Hardware** : MCP2515 CAN controller over SPI, which requires its own device tree overlay.
- **Image Tested** : I’ve loaded a standard Raspberry Pi OS image from Waveshare, and the display works as expected, so I believe the hardware is fully functional.

### Configurations and Attempts

Following the[Waveshare Wiki instructions](https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)), I initially tried to install the driver on BalenaOS using Git. Since I couldn’t get Git working directly on the Host OS, even through Docker, I attempted to set things up manually by copying the `waveshare35a.dtbo` file into the `overlays` folder and modifying `config.txt` to include the necessary display and CAN configuration parameters.

I also tried setting up the display through Balena Cloud configuration variables, including `BALENA_HOST_CONFIG_dtoverlay=waveshare35a` and various display settings, but the display still doesn’t function.

This is my config.txt file

```auto
# Display Configuration for Waveshare 3.5 inch Display
hdmi_cvt=480 320 60 6 0 0 0
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87

# I2C, SPI, Audio, and UART Configuration
dtparam=i2c_arm=on
dtparam=spi=on
dtparam=audio=on
enable_uart=1

# GPU Memory Allocation
gpu_mem=16

# CAN Bus Configuration for MCP2515
dtoverlay=mcp2515-can0
dtparam=oscillator=12000000
dtparam=interrupt=25
dtparam=spi1-1cs
dtparam=spimaxfrequency=100000

# Waveshare LCD Overlay
dtoverlay=waveshare35a

```

Is there a way to enable Git directly on the Host OS, or could anyone suggest a reliable method for accessing `resin-boot` on BalenaOS? Alternatively, if there’s a different approach to install and persist the Waveshare touchscreen driver, I’d be grateful for any guidance.

Thank you in advance for your help!

---

<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:** [November 4, 2024, 8:52pm UTC](https://forums.balena.io/t/unable-to-install-driver-for-waveshare-3-5-inch-touchscreen-on-balenaos/372405/2 "2024-11-04T20:52:13Z")

</div>

Hello, the OS is [read only by design](https://balena-os.pages.dev/architecture/#stateless-and-read-only-rootfs) so you can’t install Git on the OS, but you can install it in your container. I would try the display first without any configuration if you haven’t already. I’ve found that many work out of the box with the drivers already included in the OS.

If you find that you need to add an overlay though, see [this section of our docs](https://docs.balena.io/reference/OS/advanced/#setting-device-tree-overlays-dtoverlay-and-parameters-dtparam) for more details. Also, you should only modify the config.txt file before the first boot. After the device has been provisioned, you can use the configuration tab on the dashboard. (More details [here](https://docs.balena.io/reference/OS/advanced/#modifying-configtxt-using-configuration-variables))

Finally, here are some other threads with similar questions and answers:

> [@Waveshare DSI LCD Touchscreen support](https://forums.balena.io/t/waveshare-dsi-lcd-touchscreen-support/369634):
>
> I have a waveshare 10.1 inch DSI LCD and I am trying to get it to work with a rasberry pi using balenaos. They seem to require their own drivers but for the life of me, I cannot see how to get these installed. Please see [https://www.waveshare.com/wiki/10.1inch\_DSI\_LCD\_(C)](https://www.waveshare.com/wiki/10.1inch_DSI_LCD_(C)) I manage to get the driver software on the boot partition, but obviously it will not run as the system is read only. root@d972945:/mnt/boot/screen\_drivers# bash ./WS\_xinchDSI\_MAIN.sh 101C I2C1 SCREEN\_type=8,I2C\_bus=1 The rasp…

> [@HyperPixel 2.1 Round Display Support](https://forums.balena.io/t/hyperpixel-2-1-round-display-support/356783):
>
> Hey all, I’m trying to get this display working with Balena OS, together with the browser block. Disclaimer: I’m still very new to Balena. Since the device overlays for the hyperpixel2r are not yet available in Balena OS, I compiled them on my Mac OS X to the .dtbo format and then copied it before provisioning the device into /mnt/overlays. You need to do this straight after flashing the image, otherwise it won’t be persisted. Based on [this comment](https://forums.balena.io/t/pi-zero-w-hyperpixel4/231033/7), I then based most of my next steps. I suc…
