1. Rotate the Screen

Use the Screen Configuration tool on Raspbian to rotate the display by following these steps:

Go to:

Preferences => Screen Configuration

Then navigate to:

Configure => Screens => Orientation => Choose your orientation

2. Rotate the Touch Input

Edit the 40-libinput.conf file by running:

bash

sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf

Locate the section that starts with:

Identifier "libinput touchscreen catchall"

Then add the following line right after it to rotate the touch input:

config

Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"  # 270 Degrees

More CalibrationMatrix options for different rotation angles:

config

Option "CalibrationMatrix" "1 0 0 0 1 0 0 0 1"     # 0° (normal)
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"    # 90°
Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"   # 180°
Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"    # 270°

Powered by

nextjs-icon