Raspberry Pi Touch Display 2 - Rotate screen

I read about this problem here in the forum. Try searching, I’m sure someone had the same problem.

The original Touch Display 2 is calibrated by factory, so you don’t need and should not try to calibrate it. Call up the Zynpad or Pattern editor and you may find the touch is rotated, which is a problem of the Zynthian software not offering a touch rotate independent of Wiring (V5 turns touch upside down, even if it should not for HDMI). Did you see the documentation: https://www.raspberrypi.com/documentation/accessories/touch-display-2.html#install
You can add the config.txt commands into Webconf->Hardware->Display(Advanced view)->Config. Choose Display Custom Device and fill in all the fields. Framebuffer is /dev/fb0 or leave empty.

Hi everyone,

I’m having some real problems with the Touch Display 2. It works fine in the non-rotated position, but when I follow the instructions above, the touch screen stops working. This is despite trying to add in the changes to config.txt.

The touch screen is still detecting touch - evtest /dev/input/event1 shows data when I touch the screen, but it isn’t resulting in any response on the UI. Any hints would be greatly appreciated!

Just to reply to my own question, I managed to fix it.

I have been using DSI-1 in contrast to others above who used DSI-2 for the screen. I found I needed to explicitly set this in the display config settings (which get added to config.txt):

lcd_rotate=2
dtoverlay=vc4-kms-dsi-ili9881-7inch,dsi0,swapxy,invy

(note dsi0 is DSI-1 and dsi1 would be DSI-2 - see here for info: https://forums.raspberrypi.com/viewtopic.php?t=380866 )

I also have the /usr/share/X11/xorg.conf.d/90-monitor.conf file in place:

Section “Monitor”
Identifier “DSI-1”
Option “Rotate” “left”
EndSection

and all functions as expected. Touch still works after waking from sleep as well.