Rotating Image on Raspberry Touch Screen

Raspberry Pi 4 - FLIRC case Raspberry Pi 4 with FLIRC case

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.

See Also

Contact Me

Follow me on Facebook, Twitter or Telegram:
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!
Recent Articles
24 Mar 2024

Homelab: Mac Pro 2013 32GB

30 Sep 2023

macOS Sonoma 14.0

26 Sep 2023

Video: What Browser Do You Use?

Recent Tweets