You have to rotate the Calibration Matrix with udev rules.
Look for the touch screen here:
cat /proc/bus/input/devicesAnd see which event it is using. Then…
udevadm info -a -p /sys/class/input/event4 | grep nameThis 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.rulesAdd 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 restartBy 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.
 
					