Rotate Raspberry Pi screen image

I am using the server software on a raspberry pi 3 touch screen. It works great, however the screen is upside down. Can I rotate it anywhere in the settings? I can remount the screen, but don't really want to do that. Is it somewhere in the terminal application I can do this?

Thanks very much.


  • From image documentation:

    Rotate Display

    Depending on how you have mounted the display, you may need to rotate the screen. To do this, login and run

    sudo nano /boot/config.txt

    and search for a line

    # Rotate screen 180°

    A value of 0 is no rotation, 2 = 180°.

  • Any idea how to do this to the output of the pi camera to repetier-host on the pi using ffmpeg?  

  • Webcam settings have a rotation settings in printer settings.
  • That only fixed displaying in repetier but also needed the web ui oriented correct.  After going through the webcamd daemon I was pointed to /boot/octopi.txt which allowed me to add the correct mjpg switches.
  • How do I log in to execute the command on the touch screen?
  • You login over ssh in commandline:
    ssh pi@ipnumber
    Since windows 10 even windows has the command natively on board, otherwise use putty.
    Password is raspberry

  • Hi, if I have the screen connected by HDMI, how can I rotate the screen? :/
  • With latest buster os there are several solutions to set in /boot/config.txt

    # Flips the display using the LCD's inbuilt flip functionality. Rotation: 0 = normal, 1 = 90°, 2 = 180°, 3 = 270°
    # lcd_rotate=0
    # Rotate in gpu instead. 90 and 270° require extra memory!
    # display_hdmi_rotate=0
    # For legacy drivers, same as display_hdmi_rotate
    # display_lcd_rotate=0
    # Deprecated, for backward compatibility
    # display_rotate=0

    Which of them work depends on the display. display_hdmi_rotate should work on all since it is rotated on gpu already, but then you might also need to invert touch driver positions. Not sure if they change automatically.
  • The display_hdmi_rotate option does not appear :/
  • Just add it - in the example they are all commented out either. That is the list I will have predefined in next release as that were all settings I could find on pi foundation home page as possible options.
  • It doesn't work, the operating system is raspbian? How can I access the desktop? From settings you can
  • Yes we use the official raspbian lite with some extra configurations. But the image it self has no full featured desktop to save ram and cpu. If you need a extra program on display login via ssh and set
    export DISPLAY=:0

    and then call the program you want on desktop. It will then open in front of the chromium browser.

  • Okay thanks
Sign In or Register to comment.