Install xinput:
sudo apt-get install xinputRotate the display by editing config.txt:
sudo nano /boot/config.txt.. add this to the buttom of the file:
display_rotate=1Use Ctrl X, Yes to Save
Create a script to rotate the touchscreen:
nano /home/pi/touch_rotate.sh.. add the following command
xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1Make the script executable:
chmod +x touch_rotate.shMake the script run when the GUI starts by editing autostart:
sudo nano ~/.config/lxsession/LXDE-pi/autostart.. add this to the bottom to run your script
@/home/pi/touch_rotate.shReboot:
sudo reboot
Thank you !! I've spent way too many time on this until I found your post !
ReplyDeleteNice!
ReplyDeleteThis comment has been removed by the author.
ReplyDeletehmmmm
ReplyDeleteInteresting... Was this on stretch? I wonder if the structure has changed.
ReplyDeleteHell Yeah! Thank you! Works well. / Testet on Raspi3&Raspi 7" Touchmonitor. Only working solution in 2018 sofar.
ReplyDeleteI found somewhere how to set the matrix for 270degree rotation:
ReplyDeletexinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1
Anyone have a clue why this would work at first and then revert to the previous behavior?
ReplyDeleteAbout to redo my whole install if I can't figure out why it seems to be loading a new instance wiping out these changes.
I cannot get this to work, but the reason may be that I dont have a FT5406 memory based driver, but a real HP USB Mouse.....
ReplyDeleteso what do I do to get mouse rotation to work with an Olimex A20 and the same problem, and a normal USB mouse connected to it?
Not a clue... Sorry
Delete