Skip to content

Instantly share code, notes, and snippets.

@plut0nium
Last active January 11, 2026 15:50
Show Gist options
  • Select an option

  • Save plut0nium/6b4ed95129ae22a8576bd4e5ac42b4b7 to your computer and use it in GitHub Desktop.

Select an option

Save plut0nium/6b4ed95129ae22a8576bd4e5ac42b4b7 to your computer and use it in GitHub Desktop.
Installing a 3.5" TFT screen on a Raspberry Pi 4b

Pi TFT 3.5"

Most of the online documentation ask for running the infamous GoodTFT LCD-Show scripts.

I have issues running scripts from untrusted sources as root, and a quick look at the LCD35-Show script did not really convince me, as they:

  • are poorly written (imho)
  • call sudo on every command
  • will move/replace/erase existing config files without asking for user permission
  • may try to fetch other things from the net, using wget and/or git
  • are not up to date for latest versions of Raspberry Pi OS (e.g. some files have moved from /boot/ to /boot/firmware/)
  • if encountering an error, will fail and leave your system in an unknow state
  • ...

So I looked for more information, and it is summarized below. It is worth noting that most information available online is several years old, but is still true and applicable. There is no willingness to improve in GoodTFT's authors.

Enabling the screen

In order to get the screen working, you'll have to do the following:

  1. Copy a DT overlay to /boot/overlays/
  2. Enable the overlay
  3. Add the correct framebuffer parameters to the kernal command line

DeviceTree Overlay

The function of this file is very well explained on Will Price's website.

I used the overly from GoodTFT repository, but it is also available from waveshare.

rm -rf LCD-show
git clone https://github.com/goodtft/LCD-show.git
cd LCD-show
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo

Enable the Overlay

Use sudo raspi-config to enable the SPI interface (under Interface Options). Some sources recommend enabling I²C and UART too, but SPI should be enough for this display.

Using your favorite text editor (nvim), edit /boot/firmware/config.txt and make the following changes:

  • Comment the lines
    # dtoverlay=vc4-kms-v3d
    # max_famebuffers=2
    
  • Add the following lines at the end of the file (or uncomment applicable lines if present in the file):
    dtparam=spi=on
    dtoverlay=tft35a:rotate=90
    hdmi_force_hotplug=1
    max_usb_current=1
    hdmi_group=2
    hdmi_mode=1
    hdmi_mode=87
    hdmi_cvt 480 320 60 6 0 0 0
    hdmi_drive=2
    

Update kernel command line

Using your favorite text editor (nvim, again), edit /boot/firmware/cmdline.txt:

  • Add the following parameters at the end of the existing command line (without line break): fbcon=map:10 fbcon=font:ProFont6x11

At this point, you should be able to reboot yout Pi and have a console displayed on the screen.

Running X

TODO

Sources

  • LCD Wiki - 3.5inch RPi Display
  • LCD-Show (Git Repository)
  • Will Price - Adventures with SPI TFT screens for the Raspberry Pi
  • Avik Das - Setting up an LCD screen on the Raspberry Pi, 2019 edition
  • Waveshare - 3.5inch RPi LCD (A)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment