Facebook Twitter Instagram Pinterest YouTube
    Trending
    • Pi Pico W Launched
    • Add Kodi to RetroPie Menu
    • Disable Auto-login in Raspberry Pi OS
    • Raspberry Pi Cloud Storage with MEGA
    • RetroPie Temperature Monitor from Menu
    • Pi Pico Pinout and Power Pins
    • Install Arduino IDE on Raspberry Pi
    • Raspberry Pi 400 SSD Upgrade
    Facebook Twitter Instagram Pinterest YouTube RSS
    Raspberry Pi SpyRaspberry Pi Spy
    • Home
    • Categories
      • General
      • Hardware
      • Programming
      • Python
      • Software
      • Tutorials & Help
    • BerryClip
      • BerryClip Instructions
      • BerryClip Plus Instructions
      • Videos & Reviews
    • Buy
      • Buy Pi
      • Buy Pi Accessories
      • Buy Books
    • Tools
      • Ultimate Raspberry Pi Alexa Skill
      • Pi Power Estimator App
      • Pi-Lite 14×9 LED Matrix Sprite Editor
      • RPiREF Pin-out Reference App
      • Simple Ohm’s Law Calculator
      • Web Sites & Links
    • Tutorials & Help
        Featured
        November 9, 20200

        Raspberry Pi Temperature Monitoring

        Recent
        May 6, 2022

        Add Kodi to RetroPie Menu

        February 26, 2022

        Disable Auto-login in Raspberry Pi OS

        February 2, 2022

        Raspberry Pi Cloud Storage with MEGA

      1. Contact Us
      2. Site Map
      Raspberry Pi SpyRaspberry Pi Spy
      You are at:Home»Tutorials & Help»How to Rotate the Raspberry Pi Display Output
      Rotate Raspberry Pi screen

      How to Rotate the Raspberry Pi Display Output

      12
      By Matt on November 6, 2017 Tutorials & Help

      If you are building a Raspberry Project with screen there may be times you need to rotate the screen. This fairly easy to do in Raspbian.

      Step 1 – Edit Config.txt

      Start by editing the config.txt file :

      sudo nano /boot/config.txt

      Add one of the following lines to the bottom of the file :

      display_rotate=0
      display_rotate=1
      display_rotate=2
      display_rotate=3

      0 is the normal configuration. 1 is 90 degrees. 2 is 180 degress. 3 is 270 degrees.

      If you are using the Official Raspberry Pi touch screen you can use “lcd_rotate” rather than “display_rotate”.

      Save the file by using CTRL-X, Y then ENTER.

      Step 2 – Reboot

      Then reboot using :

      sudo reboot

      When the Pi restarts the display should be rotated.


      I used this technique in my Retro Arcade Table project where the monitor was mounted up-side-down in order to improve the viewing angle. The monitor looked much better when viewed from the top and being able to rotate the screen was a massive improvement.

      Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
      Previous ArticleHalloween Pumpkin with Servo Controlled Eyes
      Next Article Building My Raspberry Pi Arcade Table

      Related Posts

      Add Kodi to RetroPie Menu

      Disable Auto-login in Raspberry Pi OS

      Raspberry Pi Cloud Storage with MEGA

      12 Comments

      1. Skywaller on May 18, 2019 6:28 pm

        Had the same isue with my arcade table, when you put the monitor up side down. the view angle is the same as you would stand in front of it, better contrast .
        Thanks

        Reply
      2. Milan Jurkulak on October 6, 2019 1:26 pm

        Yes but if you have touch display, the touch events does not accept it

        Reply
        • Random User on January 24, 2020 11:16 pm

          use lcd_rotate=2 instead

          Reply
          • Amit on January 9, 2021 10:57 am

            Thanks this solution worked on my official display. display_rotate did not work.

            Reply
      3. JS on November 29, 2019 10:17 am

        Thank you for your instructions!

        The display also rotates correctly with “display_rotate = 3” because my screen hangs on the wall in portrait format
        but the desktop is no longer displayed only “Welcom to the Raspberry Pi Dersktop”

        What can I do?

        Reply
      4. Magnus Berglund on January 12, 2020 11:05 am

        Warning. The display_rotate doesn’t work with Raspberry Pi 4B.

        Reply
      5. Martin-Gilles Lavoie on March 15, 2020 9:33 pm

        Any way to dynamically rotate the display without a reboot?

        Reply
      6. Rushikesh Bute on April 19, 2020 3:37 pm

        I have rotated the screen using ‘display_rotate ‘ as my 7″ screen is unofficial. But now the touch axis is not working properly. please guide me on this issue.

        Reply
        • Matt on May 20, 2020 6:56 pm

          There is a post on the Official Forum that explains how to rotate touch interface using “xinput”:
          https://www.raspberrypi.org/forums/viewtopic.php?f=108&t=120793

          Reply
      7. LUIS on June 9, 2020 12:40 pm

        short and precise instructions … as it should be, it works perfectly, thanks

        Reply
      8. Javi3rgc on April 21, 2021 4:42 pm

        For non official HDMI touchscreen (7″ 1024×600):

        – Rotate display:
        sudo nano /boot/config.txt
        Add at the end:
        hdmi_force_hotplug=1
        hdmi_cvt 1024 600 60 3 0 0 0
        hdmi_group=2
        hdmi_mode=88
        hdmi_drive=1

        – Rotate touchscreen:
        https://www.instructables.com/Rotate-Raspberry-Pi-Display-and-Touchscreen/

        Edit cd /usr/share/X11/xorg.conf.d/40-libinput.conf (or similar file *libinput*)
        Search the Section with one line called “libinput touchscreen catchall”
        In this section add:
        90° = Option “TransformationMatrix” “0 -1 1 1 0 0 0 0 1”
        180° = Option “TransformationMatrix” “-1 0 1 0 -1 1 0 0 1”
        270° = Option “TransformationMatrix” “0 1 0 -1 0 1 0 0 1”

        Reply
        • mikael udin on November 2, 2021 9:26 am

          thx bro you..

          Reply

      Leave A Reply Cancel Reply

      This site uses Akismet to reduce spam. Learn how your comment data is processed.

      Recent Posts
      June 30, 2022

      Pi Pico W Launched

      May 6, 2022

      Add Kodi to RetroPie Menu

      February 26, 2022

      Disable Auto-login in Raspberry Pi OS

      February 2, 2022

      Raspberry Pi Cloud Storage with MEGA

      January 7, 2022

      RetroPie Temperature Monitor from Menu

      Categories
      • 1-wire
      • 3D Printing
      • Add-ons
      • BBC Micro:bit
      • BerryClip
      • Books
      • Camera Module
      • Cases
      • Events
      • General
      • Hardware
      • I2C
      • Infographics
      • Interfaces
      • Minecraft
      • Model A+
      • Model B+
      • News
      • Pi Models
      • Pi Pico
      • Pi Zero
      • Power
      • Programming
      • Python
      • Raspberry Pi OS
      • Raspbian
      • RetroGaming
      • Robotics
      • Sensors
      • Software
      • SPI
      • Tutorials & Help
      Tags
      3D Printing Arduino audio battery berryclip Birthday bluetooth cambridge camera CamJam DigiMakers display games GPIO I2C interface Kickstarter LCD LED Linux media Minecraft Model A Model B motionEyeOS PCB photography photos Pi-Lite portable power python Raspberry Jam Raspberry Pi Bootcamp raspbian Retrogaming retroPie screen SD card security sensor SPI temperature ultrasonic video
      Raspberry PI Related
      • Adafruit Blog
      • Average Maker
      • Official RaspBerry Pi Site
      • Raspberry Pi Pod
      • RasPi.tv
      • RaspTut
      • Stuff About Code
      Tech Resources
      • MattsBits – Pi Resources
      • Microbit Spy
      • Technology Spy
      Archives
      About

      Unofficial site devoted to the Raspberry Pi credit card sized computer offering tutorials, guides, resources,scripts and downloads. We hope to help everyone get the most out of their Pi by providing clear, simple articles on configuring, programming and operating it.

      Popular Posts
      September 19, 2014

      Top 5 Reasons The Raspberry Pi Sucks

      July 27, 2012

      16×2 LCD Module Control Using Python

      October 20, 2013

      Analogue Sensors On The Raspberry Pi Using An MCP3008

      Recent Posts
      June 30, 2022

      Pi Pico W Launched

      May 6, 2022

      Add Kodi to RetroPie Menu

      February 26, 2022

      Disable Auto-login in Raspberry Pi OS

      Facebook Twitter Instagram Pinterest YouTube RSS

      Entries RSS | Comments RSS

      This site is not associated with the official Raspberrypi.org site or the Raspberry Pi Foundation. Raspberry Pi is a trademark of the Raspberry Pi Foundation.

      Copyright © 2022 - All Rights Reserved - Matt Hawkins

      Type above and press Enter to search. Press Esc to cancel.