2024-03-03 01:43:58 -03:00

2.0 KiB

How i installed the 3.5" (A) type of screen on RaspberryOS Bookworm (Debian 12)

preview

!!! abstract "Disclaimer" This is based on my own experience, and it's provided for general information and does not constitute as advice of any kind.

Initial install

This screens connect to the GPIO they were usually installed via repositories named LCD-show (1, 2), however in the bookworm release there is a simpler solution

sudo nano /boot/firmware/config.txt

at the bottom add:

dtoverlay=piscreen,drm

???+ info in this context drm stands for Direct Rendering Manager

Close the nano editor using ctrl+x (exit), then y for yes (save).

sudo reboot

Wrong colors or graphical corruption

Some screens will not behave correctly and/or display wrong colors, this usually due to the wrong SPI speed In my case the maximum i could achieve is 22.22Mhz (400mhz core / 18)

dtoverlay=piscreen,drm,speed=22222222

As you may predict speed has a big impact in usability as it dictates how often the display will refresh

reboot to test any changes.

Rotation

!!! bug The current Rpi Kernel v6.1.77 has a bug in the dtb and rotate doesn't work, fix has been merged in v6.6 you can copy the dtb from the new kernel into the old one if needed

You can rotate the screen adding a rotate line with the degrees [0, 90, 180, 270]

dtoverlay=piscreen,drm,rotate=180

Screen rotation will require adjusting the touch matrix see Touch issues

Console

To make the console work:

sudo nano /boot/firmware/cmdline.txt

add at the start or end:

fbcon=map:11

!!! warning "Important" Do not add newlines to the file, it must be 1 line with the options separated by spaces