Fix Inverted Touch Screen Ubuntu 24.04

You have to rotate the Calibration Matrix with udev rules.

Look for the touch screen here:

cat /proc/bus/input/devices

And see which event it is using. Then…

udevadm info -a -p /sys/class/input/event4 | grep name

This will return something like this:

ATTRS{name}=="Multi touch...."

Copy the line above and create or add to the following file:

sudo vim /etc/udev/rules.d/99-calibration.rules

Add this line there for left rotation screen:

ATTRS{name}=="Multi touch....", ENV{LIBINPUT_CALIBRATION_MATRIX}="0.000000 1.000000 0.000000 -1.000000 0.000000 1.000000 0.000000 0.000000 1.000000"

Or, add this line there for right rotation screen:

ATTRS{name}=="Multi touch....", ENV{LIBINPUT_CALIBRATION_MATRIX}="0.000000 -1.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000"

Then, reboot your system, or if you prefer, restart services:

sudo udevadm control --reload-rules
sudo udevadm trigger
sudo service udev restart

By using this method, you will have your touch screen working on vertical or portrait mode, and touch mode works.

If you need a landscape screen again, you will have to delete this file (99-calibration.rules) and reboot or restart the services.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.