I'm rebuilding my Raspberry Pi called becky, it's a centralised RSyslog server and a home office monitoring station. This system has the official Raspberry Pi 7" touch screen attached to it, and it has a strange issue: out of the box, with a fresh Raspbian OS install, the image on the display appears upside down. I thought I must have physically connected the display incorrectly, but short research confirmed I wasn't the only one with such a weird issue.
How To Rotate Display Image on Raspberry
Like many other RPi things, settings for the display or touch screen are configured in the /boot/config.txt file.
For external (HDMI) displays, the setting is
But for the official touch screen (because it's connected via on-board graphics slot and not HDMI), the setting is this:
For both of these variables, value means the desired rotation (but somehow for me only values 0 and 2 work):
- 0 – no rotation
- 1 – 90 degrees rotation
- 2 – 180 degrees rotation (that's why it's turning picture upside down)
- 3 – 270 degrees rotation
To apply the setting, you need to edit the /boot/config.txt file, add (or change value) for the lcd_rotate parameter, save the file and then reboot your Raspberry Pi.