11. screen and touch

Video introduction to this chapter:

../../_images/video.png

“28-Screen and touch settings”

https://www.bilibili.com/video/BV1S14y1D7qB/

All LubanCat-RK series boards support the display of mipi screen and hdmi screen, and some boards also support dual mipi screens.

11.1. rotating touch screen

Reference article Touch calibration

Reference article Rotate touch direction

Configure touch rotation direction

1
2
# 1. View touch input devices
xinput list

As shown in the picture below, you can see the Goodix Capacitive TouchScreen device. Goodix Capacitive TouchScreen is a Embedfire 1080p touch screen, if the screen used is a Raspberry Pi 5-inch screen, it will display fts_ts

Because the touch screen is a pointing device, so our touch screen is to carry slave pointer

未找到图片
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# List variables by name
xinput list-props 'pointer:Goodix Capacitive TouchScreen' | grep "Coordinate Transformation Matrix"

# List variables by id
xinput list-props 10 | grep "Coordinate Transformation Matrix"


#Modify the touch direction (can be modified according to the name) Default direction
xinput set-prop 10 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1

#Modify the touch direction (can be modified according to the name) 90 degrees to the left
xinput set-prop 10 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1

#Modify the touch direction (can be modified according to the name) 90 degrees to the right
xinput set-prop 10 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1

#Modify the touch direction (can be modified according to the name) Rotate 180 degrees
xinput set-prop 10 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1

11.2. Touch screen binding screen

1
2
# 1.View touch input devices
xinput list

As shown in the picture below, you can see the Goodix Capacitive TouchScreen device. Goodix Capacitive TouchScreen is a Embedfire 1080p touch screen, if the screen used is a Raspberry Pi 5-inch screen, it will display fts_ts

Because the touch screen is a pointing device, so our touch screen is to carry slave pointer

未找到图片
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#view current screen
xrandr -q

DSI-1:mipi screen
HDMI-1:HDMI screen
eDP-1:edp screen

The editor is using DSI-1, and later use DSI-1 as the screen to modify the configuration

#It is known that the id number of the above Goodix Capacitive TouchScreen touch screen is 10
#Then bind the screen through the id number of the touch screen

xinput map-to-output 10 DSI-1

After completion, you can see that touch screen mapping can be supported.

11.3. Rotate screen orientation

11.3.1. Command line configuration

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#view current screen
xrandr -q

DSI-1:mipi screen
HDMI-1:HDMI screen

The editor is using DSI-1, and later use DSI-1 as the screen to modify the configuration

#Rotate Screen - Normal
xrandr --output DSI-1 --rotate normal

#Rotate screen - 90 degrees left
xrandr --output DSI-1 --rotate left

#Rotate screen - 90 degrees right
xrandr --output DSI-1 --rotate right

#Rotate Screen - Rotate 180 degrees
xrandr --output DSI-1 --rotate inverted

11.3.2. Desktop configuration

Open the Display software on the desktop, and then configure it as shown in the picture below.

未找到图片

11.4. Board screen configuration

LubanCat screen-RK series screen configuration

Board

MIPI-DSI

HDMI

Different display on multiple screens

LubanCat-Zero series

support

MINI-HDMI

not support

LubanCat-1 series

support

Standard HDMI

not support

LubanCat-2 series

support

Standard HDMI

support

注意

mipi-dsi接口不支持热插拔,请勿在上电的时候安装或者卸载屏幕, 上电时安装和卸载可能会导致板卡短路, 轻则板卡保护关机,重则损坏芯片的接口或者烧坏芯片

The maximum screen parameters supported by LubanCat-RK series are as follows

未找到图片

11.5. screen interface

Currently our LubanCat-RK series boards support two screens

  • Embedfire mipi screen - 1080P

  • Raspberry Pi 5-inch screen (need to be used with an adapter board)

Raspberry Pi screen purchase link

In addition to this merchant, other Raspberry Pi 5-inch screens with the same parameters may also be within our adaptation range, and readers need to try.

11.5.1. mipi-dsi interface

  • The mipi interface types of the LubanCat-RK series boards are all the same, and they all use 30pin fpc sockets, as shown in the figure below.

未找到该图片

The connection with the mipi screen is as follows

未找到该图片

注意

The mipi-dsi interface does not support hot swapping, please do not install or uninstall the screen when powering on. Installing and uninstalling when powering on may cause a short circuit of the board. In the lightest case, the board protection shuts down, and in the severe case, the interface of the chip is damaged or the chip is burned out.

11.5.2. HDMI interface

HDMI interface supports hot plugging

The HDMI of LubanCat-RK series boards has two HDMI interfaces:

  • MINI-HDMI: Equipped with LubanCat-Zero series boards, with exquisite appearance and small size.

  • HDMI: LubanCat-1 and LubanCat-2 series boards are equipped with standard HDMI interface, and most of the monitors on the market are equipped with standard HDMI interface.

The comparison figure is as follows.

未找到该图片

注意

The interface size and shape of HDMI and MINI-HDMI are quite different. So they cannot be directly connected together. If you want to use HDMI and MINI-HDMI connection. You need to buy an HDMI to MINI-HDMI conversion port to use it normally

11.6. Screen switching

LubanCat-RK series boards use the device tree plug-in to switch screens. The location of the device tree configuration plug-in is in the /boot/uEnv/ directory. If you want to open the corresponding plug-in, you need to find your own board card’s uEnv file, then modify it

未找到该图片

11.6.1. mipi screen

11.6.1.1. rk3566 Chip Series Settings

This section is suitable for LubanCat-0 series and LubanCat-1 series boards. Here we take LubanCat-1 as an example, as shown in the figure below.

未找到该图片

You can see that there are three types of screens can be configured, of which only the Embedfire mipi screen and the Raspberry Pi 5-inch screen are currently supported.

注意

Since the rk3566 does not support the dual-screen display function, the device tree plug-in of the screen display part does not support multiple openings. When the mipi screen is turned on, the hdmi display function will also be turned off.

  • Embedfire mipi screen on

未找到该图片
  • Raspberry Pi 5-inch screen turned on

未找到该图片

11.6.1.2. rk3568 chip series settings

This section is suitable for LubanCat-2 series boards. Here we take LubanCat-2 as an example, as shown below.

未找到该图片

You can see that there are three types of screens can be configured, of which only the Embedfire mipi screen and the Raspberry Pi 5-inch screen are currently supported.

注意

Since rk3568 supports dual-screen display function, hdmi can also be displayed normally after the mipi screen is turned on, but only one of the two mipi screens can be turned on at the same time.

  • Turn on Embedfire mipi screen

未找到该图片
  • Raspberry Pi 5-inch screen turned on

未找到该图片

11.6.2. hdmi

11.6.2.1. rk3566 chip series setting method

HDMI is turned on by default (the screen device tree plug-in is not turned on), and when any screen device tree plug-in is turned on, HDMI will be automatically turned off.

11.6.2.2. rk3568 chip series setting method

HDMI is enabled by default. If you want to disable HDMI, you can enter the device tree configuration file to open the device tree with HDMI disabled. As shown in the figure below.

未找到该图片

11.6.3. Different display on multiple screens

Currently only LubanCat-2 series support, support to open HDMI and mipi screen at the same time, the setting method is shown in the above section.

11.7. Turn off desktop login and keep screen on

Generally, screen opening and desktop login will be bound together. When you open the screen, the screen will be used as a new terminal. The following will teach you how to close the screen terminal while using the screen.

1
2
3
4
5
6
7
8
9
#Close the GUI and log in with tty.

sudo systemctl set-default multi-user.target
sudo reboot

#Start the graphical user interface.

sudo systemctl set-default graphical.target
sudo reboot