bash script for screen and touchscreen rotation
Tested on Ubuntu 20 & Linux Mint 20!
(if problems verify xinput id of touchscreen input).
sudo ./autorotate.sh