Rotate the Raspberry Pi’s screen!
11/14/2018 (2832x read)
If your Raspberry Pi’s monitor image is displayed the wrong way round, the screen can be easily rotated in a settings-file. The best way to rotate the Raspberry’s screen is via the configuration file „config.txt“: Here you can rotate the screen by 90°, 180° or 270 degree.
To do this you log on to the Raspberry Pi: either directly with keyboard and mouse or via SSH. Then you switch the user and log in as root. Now you can also edit the configuration file, for example with the nano editor:
nano /boot/config.txt
Jump to the end of the file and add the following line:
display_rotate = 2
This rotates a screen by 180° if it is connected with an HDMI cable. If you want to rotate the official Raspberry display, please look further down. If you want to rotate the screen 90° to the left or right or mirror the image on the monitor instead, you have to enter a different value for „display_rotate“:
- display_rotate = 0: Normal value
- display_rotate = 1: Rotated 90° (clockwise)
- display_rotate = 2: Rotated 180° (upside down)
- display_rotate = 2: Rotated 270° (or counterclockwise)
- display_rotate = 0x10000: Image horizontal mirrored
- display_rotate = 0x20000: Picture vertically mirrored
rotate screen with the official 7″ Raspberry Pi display
If you want to rotate the display of the official 7″ Raspberry Pi display instead of a HDMI monitor, enter „lcd_rotate“ instead of „display_rotate“: The value „2“ rotates the image 180°, the value „1“ rotates the image 90° clockwise and the value „3“ rotates the image 90° counterclockwise to the left.
lcd_rotate=2