chilipie-kiosk icon indicating copy to clipboard operation
chilipie-kiosk copied to clipboard

How to rotate screen with Pi4 buster ?

Open yanisla35 opened this issue 4 years ago • 11 comments

HI,

I'm looking for a way to rotate screen with the PI4, but there is no way to use 'display_rotate' because of "vc4-fkms-v3d'. But I really need this driver to run...

Then, what is the solution to rotate the screen without deactivating "vc4-fkms-v3d" ?

Thank you in advance.

yanisla35 avatar Nov 16 '19 11:11 yanisla35

I wasn't aware of the rotation not working on Pi 4.

I'd be happy to hear of any solution you might come up with!

jareware avatar Nov 28 '19 14:11 jareware

https://github.com/futurice/chilipie-kiosk/issues/61#issuecomment-531467096 seems related.

jareware avatar Dec 04 '19 10:12 jareware

Can confirm that you need to disable the line

dtoverlay=vc4-fkms-v3d

in /boot/config.txt if you want this to work on Rpi4.

jareware avatar Mar 10 '20 16:03 jareware

I'll update the relevant part of the first-boot doc at least. Better than nothing.

jareware avatar Mar 10 '20 16:03 jareware

I just found out that you do not need to disable dtoverlay by inserting a line into the .xsession file

xrandr --output HDMI-1 --rotate left

I tried a lot of things, but this seems to work. Tried it on a fresh install without changing anything else. Here is how the beginning of the file looks:

#!/bin/bash

export DISPLAY=:0.0

# Start cursor at the top-left corner, as opposed to the default of dead-center
# (so it doesn't accidentally trigger hover styles on elements on the page)
xdotool mousemove 0 0

# Set some useful X preferences
xset s off # don't activate screensaver
xset -dpms # disable DPMS (Energy Star) features.
xset s noblank # don't blank the video device

# Rotate screen 90 degrees
xrandr --output HDMI-1 --rotate left

# Set X screen background
sudo nitrogen --set-centered background.png

# Hide cursor afer 5 seconds of inactivity
unclutter -idle 5 -root &
[...]

@jareware If this could make it into the docs, that would be awesome, because i spent days until i figured this out.

wujood avatar Aug 01 '20 01:08 wujood

Definitely! And feel free to send a PR for the docs if you have time!

jareware avatar Oct 08 '20 10:10 jareware

Rotate screen 90 degrees

xrandr --output HDMI-1 --rotate left

Tried adding ^ to .xsession file It did not work. Is there any other configuration required ?

marutimuthu avatar Dec 03 '20 08:12 marutimuthu

Could you provide more context? Where did you add the line? Did you change anything else?

wujood avatar Dec 03 '20 11:12 wujood

I added the line in the .xsession file. No other changes. This worked for me: xrandr --rotate left

marutimuthu avatar Dec 04 '20 06:12 marutimuthu

Does it also work if you use HDMI-2 as output? There are two outputs on the raspberry so you would need to change that accordingly

wujood avatar Dec 04 '20 14:12 wujood

I guess for that you will have to export DISPLAY=:0.1 corresponding to HDMI-2

marutimuthu avatar Dec 05 '20 11:12 marutimuthu