Pi Flux - Display Configuration

Pi Flux - Display Configuration

Introduction

The 5-DSI-TOUCH-A is a portrait touchscreen LCD display designed for interactive projects such as tablets, entertainment systems, and information dashboards.

Features

  • 5-inch DSI touch screen, ten-point capacitive touch control
  • IPS display panel with hardware resolution of 720×1280
  • Optical bonding toughened glass panel, clearer picture quality
  • Toughened glass capacitive touch panel, hardness up to 6H
  • Drive the LCD through the DSI interface, with a refresh rate of up to 60Hz
  • Supports software control of backlight brightness
  • Aluminium alloy back cover design, pure passive cooling design

Interfaces

5-DSI-TOUCH-A-details-11.png

Working with Raspberry Pi

Pi5/CM5/CM4/CM3+/CM3 Hardware Connection

1. Use the "FFC Cable 22PIN 200mm (opposite direction)" to connect the DSI port of the display to the 22PIN DSI port of the Raspberry Pi motherboard.
2. Use the "GPIO cable" to connect the power connector of the display to the 5V GND pin header of the Raspberry Pi motherboard.

300px-Gpio-connection.png

3. Secure the Raspberry Pi to the display with M2.5 screws.

The installation effect is as follows:
5-DSI-TOUCH-A-details-3.jpg

Note: Make sure that the DSI cable is connected in correct direction and 5V power is supplied through the GPIO pins.

Software Settings

Method 1: Flash Latest Bookworm System

1. Connect the TF card to the PC, download and use Raspberry Pi Imager to flash the corresponding system image.
800x480-DSI-LCD-0.png
2. After the image flashing is completed, open the config.txt file in the root directory of the TF card, add the following code at the end of the config.txt, save and safely eject the TF card.

Note: Since Pi5/CM5/CM4/CM3+/CM3 has two mipi DSI interfaces, please note that the correct DSI interfaces and commands are used, DSI1 is recommended by default.
dtoverlay=vc4-kms-v3d
#DSI1 Use
dtoverlay=vc4-kms-dsi-waveshare-panel-v2,5_0_inch_a
#DSI0 Use
# dtoverlay=vc4-kms-dsi-waveshare-panel-v2,5_0_inch_a,dsi0

3. Insert the TF card into the Raspberry Pi, power on the Raspberry Pi, and generally wait for about 30 seconds to enter the display state. The touch function can be used normally after the system boots.

Method 2: Flash Pre-installed Image

1. Select the pre-installed image, download and unzip it as .img file

2. After the image flashing is completed, connect the TF card to the Raspberry Pi, start the Raspberry Pi, and wait for about 30 seconds for it to be displayed and touched normally.

Adjust Backlight Brightness

Graphical Interface Backlight Adjustment

The following steps are based on the Trixie system:

  • 1. Click the menu in the upper left corner, then go to Preferences → Control Center, and select Screens;

800px-8inch dsi lcd -1.png

  • 2. Go to "Screen" -> "DSI-2" -> "Brightness", check and adjust the desired backlight brightness, and finally click Apply to save the settings.

800px-8inch dsi lcd -2.png

In the Bookworm system, this setting entry is located at Screen Configuration → Screen.

Use the Waveshare Backlight Adjustment Application

You can also use the graphical backlight adjustment tool provided by Waveshare (this program is only for Trixie, Bookworm, and Bullseye systems):

wget https://files.waveshare.com/wiki/common/Brightness.zip
unzip Brightness.zip
cd Brightness
sudo chmod +x install.sh
./install.sh

After the installation is completed, you can open the demo in the Start Menu -> Accessories -> Brightness, as shown below: 43H-800480-IPS-CT-details-13.gif

Adjust Backlight Brightness Using Terminal

echo X | sudo tee /sys/class/backlight/*/brightness

Where X represents any number from 0 to 255. 0 means the darkest backlight, and 255 means the brightest backlight. For example:

echo 100 | sudo tee /sys/class/backlight/*/brightness
echo 0 | sudo tee /sys/class/backlight/*/brightness
echo 255 | sudo tee /sys/class/backlight/*/brightness

Trixie/Bookworm Display Rotation

GUI Interface Rotation

The following steps are based on the Trixie system:

  • 1. Click the menu in the upper left corner, then go to Preferences → Control Center, and select Screens;

800px-8inch dsi lcd -5.png

  • 2. Go to Screen - > DSI-1 - > Touchscreen and check "10-0014 Goodix Capacitive TouchScreen";

800px-8inch dsi lcd -6.png

  • 3. Go to Screen -> DSI-2 -> Orientation, check the direction you need to rotate, and finally click "Apply" to complete the display and touch synchronous rotation.

800px-8inch dsi lcd -7.png

  • In the Bookworm system, this setting entry is located at Screen Configuration → Screen.
Note: Only Trixie/Bookworm systems support the above synchronous rotation methods. For Bullseye/Butser systems, after displaying rotation, touch rotation needs to be manually set separately.

lite Version Display Rotation

sudo nano /boot/firmware/cmdline.txt
#Add the display resolution and rotation commands at the beginning of the cmdline.txt file to take effect after a reboot
#For example, the DSI-1 display has a 720x1280 resolution and the display rotation is 90 degrees
video=DSI-1:720x1280M@60,rotate=90
#For example, the DSI-1 display has a 720x1280 resolution and the display rotation is 180 degrees
video=DSI-1:720x1280M@60,rotate=180
#For example, the DSI-1 display has a 720x1280 resolution and the display rotation is 270 degrees
video=DSI-1:720x1280M@60,rotate=270

Notes:

  • 1. Based on actual display resolution.
  • 2. If using Pi5/CM5, use the actual DSI display number identified, for example, "DSI-2".
  • 3. Unable to rotate DSI monitor and HDMI monitor separately using cmdline.txt. When you use both DSI and HDMI simultaneously, they share the same rotation value.

Touch Rotation

If you use the graphical interface for rotation, you can tick "Touchscreen" in the screen layout editor window to synchronize the touch rotation. Please refer to the previous introduction for how to rotate the screen. For the command line rotation method, please refer to the following text:
1. Create a new file named 99-waveshare-touch.rules

sudo nano /etc/udev/rules.d/99-waveshare-touch.rules

2. Add the following lines as needed:

#90°:
ENV{ID_INPUT_TOUCHSCREEN}=="1", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 -1 1 1 0 0"

#180°:
#ENV{ID_INPUT_TOUCHSCREEN}=="1", ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 0 -1 1"

#270°:
#ENV{ID_INPUT_TOUCHSCREEN}=="1", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"

3. Save and reboot

sudo reboot

Touch Mode Selection

The systems after Bookworm support two touch modes, which can be switched in the Screen Configuration > Touchscreen menu:
800px-DSI-Touch-Bookworm-Keyboard-04.png

  • 1. Mouse Emulation (default)
Click = Left mouse button function
Long press = Right mouse button function
Supports double-click
Does not support page swiping and multi-touch functionality

Note: This mode is suitable for scenarios that require mouse operation, such as double clicking to open the file manager and long pressing to achieve right-click functionality.

  • 2. Multitouch
Supports multi-touch functionality
Supports swiping pages
Does not support double-click and long-press right-click functions

Note: This mode is suitable for touch-optimized scenarios, such as web browsing and scrolling lists.

Use Touchscreen Virtual Keyboard

Raspberry Pi OS Bookworm and later versions include Squeekboard on-screen keyboard by default.

  • The keyboard system will automatically pop up when text input is available and automatically hide when text input is not available.
  • It can also be shown or hidden manually via the keyboard icon in the top right corner of the taskbar

800px-8inch dsi lcd -3.png
You can also permanently set the display or hiding of the on-screen keyboard through the menu Preferences → Control Centre → Display in the upper left corner.
800px-8inch dsi lcd -4.png
In the Bookworm system, you can set the keyboard to be displayed or hidden via Raspberry Pi Configuration → Display or raspi-config → Display.
DSI-Touch-Bookworm-Keyboard-02.png

  • Note:

For older versions of Raspberry Pi OS before Bookworm, please use matchbox-keyboard. If you are using the Wayfire desktop compositor, use wvkbd.

Previous post