Skip to main content

Working with Raspberry Pi

note

If you purchased the 21.5inch FHD Monitor (B) or 21.5inch FHD Monitor (C) all-in-one model, skip the setup steps: it works as soon as it is powered on, with no installation required.

Hardware Connection​

  1. Use pliers or a similar tool to cut open the Raspberry Pi reserved port cover:

    Raspberry Pi reserved port cover

  2. Install the Raspberry Pi into the mounting holes, connect the HDMI adapter board, and plug the 5V power cable into the Raspberry Pi:

    Installing the Raspberry Pi and connecting the adapter board

Software Setup​

Supports the Raspberry Pi OS / Ubuntu / Kali and Retropie systems on a Raspberry Pi. When the LCD works with these Raspberry Pi systems, the resolution must be set manually; otherwise the display resolution is incorrect and the experience suffers.

  1. Download the latest image from the Raspberry Pi official website

  2. Download the archive to a PC and extract it to obtain the .img file

  3. Connect the TF card to the PC and format it with the SDFormatter software

  4. Open the Win32DiskImager software, select the system image prepared in step 1, and click write to flash the system image

  5. After writing, open the config.txt file in the TF card root directory, add the following code at the end of config.txt, save it, and safely eject the TF card

    hdmi_force_hotplug=1
    max_framebuffer_height=1080
    hdmi_group=2
    hdmi_mode=87
    hdmi_timings=1920 0 88 44 148 1080 0 4 5 36 0 0 0 60 0 148500000 0
    config_hdmi_boost=10
  6. Insert the TF card into the Raspberry Pi, and connect the Touch interface of the screen to a USB connector of the Raspberry Pi. Connect the 12V 3A power adapter to the Power interface of the screen, and the display appears normally after a few seconds

Linux Software Brightness Control​

Version differences

Early shipping versions of the 21.5inch FHD Monitor defaulted to portrait orientation and did not support DDC/CI brightness control; the currently shipping version defaults to landscape orientation and supports DDC/CI brightness control.

Before using software brightness control, enable DDC/CI in the OSD menu of the display, and connect the screen to the Raspberry Pi over HDMI.

The following uses Raspberry Pi OS and ddcutil as an example. When running the commands, connect only one display so as not to affect other displays.

  1. Install ddcutil:

    sudo apt update
    sudo apt install -y ddcutil
  2. Set the brightness. The following command sets the brightness to 50:

    sudo ddcutil setvcp 0x10 50

    You can replace 50 in the command with the brightness value you need.

If the display is not detected or brightness control has no effect, refer to DDC/CI Brightness Control Troubleshooting.

Display Rotation​

If you are using a Bullseye/Buster system, you can rotate the display as follows:

  1. Go to Screen Configuration.

21

  1. Set the rotation as shown below.

21

21

21

If you are using another system version, rotate the display as follows:

  1. Add the statement to the config.txt file (the config file is in the TF card root directory, that is, in /boot):

    display_rotate=1 #1: 90; 2: 180; 3: 270
  2. Save the file and restart the Raspberry Pi

    sudo reboot

Touch Rotation​

Because the touch direction no longer matches after rotation, rotate the touch input as follows:

  1. Install libinput

    sudo apt-get install xserver-xorg-input-libinput

    If you are using Ubuntu or a Jetson Nano, the installation command is

    sudo apt install xserver-xorg-input-synaptics
  2. Create the xorg.conf.d directory under /etc/X11/ (if it already exists, go straight to step 3)

    sudo mkdir /etc/X11/xorg.conf.d
  3. Copy the 40-libinput-conf file into the directory just created

    sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
  4. Edit that file

    sudo nano /etc/X11/xorg.conf.d/40-libinput.conf

    Find the touchscreen section, add the following statement in it, and save

    Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"

Similar to the position shown below:

Touch rotate

  1. Restart the Raspberry Pi

    sudo reboot

    After completing the steps above, the 90-degree rotation is in effect.
    Note:
    90-degree rotation: Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
    180-degree rotation: Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
    270-degree rotation: Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"

Keeping the Screen Always On​

Some customers want the display not to be affected by the screen saver. The screen saver can be disabled as follows.
Open lightdm.conf

sudo nano /etc/lightdm/lightdm.conf

Edit lightdm.conf, find "xserver-command" under the [SeatDefaults] section, uncomment it, and change it to the following:

#xserver-command=X

Change it to

xserver-command=X -s 0 -dpms
  • -s # – disables the screen saver
  • dpms disables power saving management

Restart

sudo reboot

Turning the Screen Off and On​

Users can turn the screen off and on with the following commands.

vcgencmd display_power 0
vcgencmd display_power 1