HowTo: rotate Raspberry Pi 7″ touchscreen

Just a quick write up on how get the touch & screen of the official Raspberry Pi display working upside down.

Edit /boot/config.txt and add the following line:

display_rotate=2

2 means rotating the screen 180°.
90° would be 1 and 270° would be 3.

It is important that there no blanks around the =-sign.
Some howtos have that wrong.

Next do a

sudo apt-get -y install xinput evtest

and add the following line to /etc/X11/Xsession

DISPLAY=:0 xinput --set-prop ‘FT5406 memory based driver’ 'Evdev Axis Inversion' 1 1

After another reboot you can use your RasPi-Display-combination with the power connectors facing up, which is quite handy when using the contraption without a dedicated stand.