Skip to content

Instantly share code, notes, and snippets.

Last active August 19, 2021 07:25
  • Star 7 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Framebuffer on ST7735s (1.44inch LCD HAT)

Enable modules in Kernel

In raspi-config

Enable SPI under "Interfacing options"

Add modules

$ sudo nano /etc/modules

Append two modules (in two lines) :


Create FBTFT configuration

# /etc/modprobe.d/fbtft.conf
options fbtft_device name=adafruit18_green gpios=reset:27,dc:25,cs:8,led:24 speed=40000000 bgr=1 fps=60 custom=1 height=128 width=128 rotate=180

Check /dev/fb1 is present

  1. Reboot you Raspberry Pi

    $ sudo reboot
  2. Once rebooted, check if new fb device is present

    $ sudo ls /dev # /dev/fb1 must appear
    $ sudo apt-get install fbset # framebuffer utility
    $ sudo fbset -i -fb /dev/fb1 # should return information of screen.

Change options in /boot/config.txt

Add or modify the following options in the file:

hdmi_cvt=128 128 60 1 0 0 0

#disable uart to boost boot speed

Then reboot:

$ sudo reboot

Synchroneous copy between fb0 and fb1

In order to display console and other things on the screen.

Compile fbcp

$ sudo apt-get install cmake
$ git clone
$ cd rpi-fbcp/
$ mkdir build
$ cd build/
$ cmake ..
$ make
$ sudo install fbcp /usr/local/bin/fbcp

Test it

$ fbcp

Right now you should see the content of the screen on the pHAT screen.

Launch automatically at startup

Edit the file /etc/rc.local. Add before the exit 0 line:



Copy link

Hi, i dont get fb1 on my list. followed all the instructions, raspbian lite on pi zero w

Copy link

Hi @tomohgee, that would mean that the fbtft configuration didn't work. Are you sure you're using an ST7735S controller and not another? Among the forks of this Gist, there is this one by @GautamBose that seems to have been modified to accommodate a ST7735R controller. The last letter is actually quite important!

If you indeed use a ST7335S, then maybe something else went wrong. This gist is 2 years old now, I would expect something not working anymore. But if so, you should find some information in the syslog I think?

Copy link

tomohgee commented Nov 20, 2020

I did manage to get fb1 to show up, but my screen is still white.
I am sure, that its the S version.

Copy link

Martenz commented Nov 24, 2020

I did manage to get fb1 to show up, but my screen is still white.
I am sure, that its the S version.

Exactly the same issue ... Amazon says S .. but still white screen and no way to see fb1 also for me..

Copy link

I am having the same problem with no luck. I'm doing everythign right i think.I'm following all the tutorials which more or less say the same thing. Still a white screen.

Copy link

badjano commented Feb 28, 2021

I got it working, but the screen goes blank after some time and won´t go back on.
Also couldn´t make it 128 x 128, it stays at 720 x 480

Edit: I got some info from my seller, he sent me this link:

you can translate it using chrome

Copy link

badjano commented Feb 28, 2021

I just noticed your cmake command is missing some arguments:

#1.3inch LCD HAT
#1.44inch LCD HAT

mine had a channel error, which made me change 5 to 7 and 6 to 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment