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

display_rotate=0

But for the official touch screen (because it’s connected via on-board graphics slot and not HDMI), the setting is this:

lcd_rotate=2

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:
Recommended
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
03 Sep 2024

macOS Sequoia 15.0

02 Sep 2024

Video: Has This Worked Before?

24 Mar 2024

Homelab: Mac Pro 2013 32GB

Recent Tweets