How to Rotate the Raspberry Pi Display Output


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 :


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.


Leave A Reply