how to rotate display

I have just spent an entire day trying to install dietpi for the first time on my RPI 3B+

The challenge has been that my HDMI screen is upside down, so I have to read everything upside down to work through the screens. And also the font was too small.
Well eventually I can rotate the screen 180 deg by using rotate_hdmi_display=2 BUT ONLY if I disable the line dtoverlay=vc4-fkms-v3d. But if I do that, the KODI won’t run, giving an error unable to create GUI. Exiting.

So, is there another way to do this so that I can both rotate the display 180 deg AND run KODI? (the font size issue I managed to fix)

I am on the latest versions of everything, having just installed and updated it all today, using the ARMv8 64bit installation image.


I’m wondering if you did just a typo in this post, but the command should be display_hdmi_rotate=, not rotate_hdmi_display=

You could try to do a vertical and horizontal flip and look if kodi likes this more…


And what if you boot with dtoverlay=vc4-fkms-v3d and try to rotate via screen config in the system preferences menu?

Yes, typo, sorry. As I said, it works fine if I comment out that other line.

Yes, I tried doing the rotation by dietpi-config and on the desktop GUI. No difference. If I enable the dtoverlay Kodi runs but upside down. If I diasable the dtoverlay Kodi exits with an error, but the display is the right way up .

Any other suggestions?

what does that dtoverlay do? Would a different installation image work better? Or an older version of Kodi?

Ultimately I want to be able to connect to my bluetooth car radio so that I can play the music through my speakers. Am I going to be able to achieve that?



hmm you could ask on Kodi forum if it is possible for Kodi to rotate at all. Maybe Kodi don’t like this.

dtoverlay sets the graphic driver, you are using.
So you could try in dietpi-config → Display Options → Display Resolution to set another driver (vc4-kms-v3d, without the f) or just 1080p (which should be legacy mode maybe? I’m not sure, I don’t use a display).
I’m not sure which driver is selected when dtoverlay is disabled in the config.txt, maybe this is the legacy one?

I just searched the web a bit for your problem and somebody had the same issue, but there is suggested that Kodi ignores all of these flipping options, so maybe there is no solution until it’s fixed in Kodi itself.

I also found a thread where somebody claimed another HDMI cable worked for him :smiley:

And somewhere else the solution was to increase GPU memory (I can’t fidn the link right now)
dietpi-config → Display Options → GPU/RAM Memory Split.

So I have no real solution for you, just some trail-and-error suggestions.
Definetly it’s very odd, that the picture is upside down. My first try would be to try another cable and / or display, if possible.

Eventually I gave up and did a fresh install of Raspbian Buster and using the raspi-config menu was able to get the screen rotated.

Then I followed the directions on to get my speakers connect.

Finally everything is working!

Since raspi-config does not have an explicit display rotation option, how did you achieve it?

The display_hdmi_rotate setting works with legacy display driver only, default on RPi models prior to RPi 4 on Buster and no default on any RPi models since Bullseye.

With KMS (modern display driver), rotation for X applications (Kodi on Buster) to be done manually with xrandr:

xrandr --output HDMI-1 --rotate normal
xrandr --output HDMI-1 --rotate left
xrandr --output HDMI-1 --rotate right
xrandr --output HDMI-1 --rotate inverted

Although I remember there was a way to achieve it with xorg.conf settings.

For console it can be done via /boot/cmdline.txt, adding e.g.:


But I’m not 100% sure whether this works for KMS applications like Kodi on Bullseye.