How to rotate the Raspberry Pi screen

Rotating the screen output of the Raspberry Pi is a task often asked when handling cases for a full-fledged Raspberry Pi touchscreen. This only involves a few relatively simple steps and can be completed in a matter of minutes.

There are various instances where you will need to rotate the display output of your Raspberry Pi. The ability to rotate the monitor output is useful when you are using the monitor vertically or the monitor mounted upside down.

Rotating the screen output of the Raspberry Pi is a task often asked when handling cases for a full-fledged Raspberry Pi touchscreen. This only involves a few relatively simple steps and can be completed in a matter of minutes.

1. Rotate the screen from the desktop

In this section, TipsMake.com will guide you on how to use the display configuration tool on Raspbian to rotate the screen.

If you have 3D graphics driver disabled, you will need to try the Terminal method for Raspberry Pi 3 screen rotation.

Using the Screen Configuration tool is thus far a simpler way to rotate the screen for the Raspberry Pi 4.

Step 1. To access the Screen Configuration tool on the Raspberry Pi, you need to click on the Pi icon in the top left corner of the screen.

Step 3. In the pop-up menu, click 'Screen Configuration'.

Picture 1 of How to rotate the Raspberry Pi screen

Step 4. When the utility is opened, right-click on the screen you want to modify.

Hover over 'Orientation' , then click how you want to rotate the screen.

When you are satisfied with the new direction, click the button marked green.

Picture 2 of How to rotate the Raspberry Pi screen

Step 5. To confirm the changes, you need to click the 'OK' button within 10 seconds.

Picture 3 of How to rotate the Raspberry Pi screen

This timer helps you avoid messing with your display settings and will automatically revert back to its original settings after the 10 seconds have elapsed.

2. Rotate the screen from Terminal

In this section, the article will guide you through the steps to rotate the screen using Terminal.

There are two different methods for screen rotation. One part is for Raspberry Pi 4, the other method is for other Pies, and for those who have 3D drivers disabled on Pi 4.

Screen rotation for Raspberry Pi 4

Due to the new video driver used by the Raspberry Pi 4, you cannot rotate the screen using the old /boot/config.txt method .

If you want to rotate the screen on the Pi 4, you should use the Screen Configuration tool as it is much easier to use.

Instead, you'll need to use the xrandr command .

In the Raspberry Pi's Terminal, run one of the following commands.

If you want the rotation to affect the second HDMI slot, try using HDMI-2 instead of HDMI-1 in the commands below.

DISPLAY=:0 xrandr --output HDMI-1 --rotate normal

This command resets the rotation back to normal.

DISPLAY=:0 xrandr --output HDMI-1 --rotate left

The above command rotates the monitor output to the left. This is the equivalent of rotating 90 degrees.

DISPLAY=:0 xrandr --output HDMI-1 --rotate right

This command rotates the screen to the right. This command is like rotating the screen 270 degrees.

DISPLAY=:0 xrandr --output HDMI-1 --rotate inverted

This last command will flip the screen. This behavior is like rotating the screen 180 degrees.

Screen rotation for Raspberry Pi 3 and earlier models

Step 1. In Terminal on Raspberry Pi, start editing the boot configuration file by running the following command.

sudo nano /boot/config.txt

Step 2. In this file is where you can change the screen rotation.

First, you have to decide how you want to rotate the screen.

Numbers 0 through 4 represent each rotation that the Raspberry Pi can support. 90 degrees is 1, 180 degrees is 2 and 270 degrees is 3.

Based on how you want the screen to rotate, enter one of the following lines at the end of the file.

If you want to rotate the direction of the LCD connection, you can use display_lcd_rotate instead of display_hdmi_rotate.

display_hdmi_rotate=0

This setting will reset the Pi screen rotation to normal. This setting represents the default behavior.

display_hdmi_rotate=1

Using this setting will rotate the screen 90 degrees. This option is equivalent to rotating the screen to the right.

display_hdmi_rotate=2

With this option, you will rotate the monitor's output 180 degrees. This is the same behavior as reversing the screen.

display_hdmi_rotate=3

Changing this option to 3 will rotate the screen 270 degrees. This will be like rotating your screen to the left.

Step 3. Once you have entered the command you want, please save the file by pressing CTRL + X , then pressing Y , then press ENTER.

Step 4. For the new rotation setting to take effect, you need to restart your Raspberry Pi. You can restart your Raspberry Pi easily using the command below.

sudo reboot

Once done, you have now successfully rotated the display output on your Raspberry Pi

Update 20 October 2020
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile