I just got my new Raspberry Pi 4 and I'm trying to rotate the screen. Usually on previous Raspberry versions I did that simply by putting display_rotate=1 to config.txt, but when doing this on Raspberry 4 the screen is partly black and it's not rotated properly. Any ideas? Thanks in advance.


3 Answers 3


There is a workaround. When I ran into the same issue with the blackbox, I tried using xrandr but kept getting the error "can't open display". After some searching I found that if you're using the VC4 FKMS V3D driver (this is the default on the Raspberry Pi 4), then 90 and 270 degree rotations are not supported. So I commented out the "dtoverlay=vc4-kms-v3d" in /boot/config.txt and now I get the full screen in portait mode. Guess this is not the proper way, but it seems to work.

  • After applying this to my RetroPie build on a Pi 4, I get 'Error creating SDL window! Could not initialize EGL", and retropie will no longer run.
    – tomh
    Commented Feb 9, 2023 at 23:02

On the Raspberry Pi 4, the screen rotation is (finally !) handled via RandR:

DISPLAY=:0 xrandr --output HDMI1 --rotate left 
DISPLAY=:0 xrandr --output HDMI1 --rotate inverted
DISPLAY=:0 xrandr --output HDMI1 --rotate normal
  • 2
    Asking from 2021... what is the proper process to make this change permanent / happen at boot?
    – John U
    Commented Aug 20, 2021 at 12:00

For Raspberry 4 as of Nov 2020:

  1. Click Raspberry Logo in the top left corner (open application menu)
  2. Select "Preferences" -> "Screen Configuration". A new window "Screen Layout Editor" will be opened.
  3. In the new window menu, select "Configure" -> "Screen" -> "HDMI-1" -> Orientation

Not the answer you're looking for? Browse other questions tagged or ask your own question.