linuxraspberry-piraspbian

Screen Rotation on a CLI only system


I am building a Raspberry Pi ZeroW Raspi-based CLI-only system and I need to rotate my screen 90 degrees.

I am struggling to find a way of doing it or even if it is possible. Some suggestions are to set "display_hdmi_rotate=1" or "display_lcd_rotate=1" in config.txt. This does not seem to work in Raspian anymore and there was the suggestion that it is no longer supported.

Everything else I can find seems to relate to rotating the screen from the CLI/console for use in a desktop but since I am not using a desktop, that does not apply.

I have the option to dump Raspi and try another distro if other distros can rotate the CLI.

Can it be done, if so can anyone tell me how?

Thanks


Solution

  • After much digging I found the answer.

    echo 1 | sudo tee /sys/class/graphics/fbcon/rotate

    will rotate the screen 90 degrees. Adding it to /etc/rc.local rotates the screen during boot.

    https://askubuntu.com/questions/237963/how-do-i-rotate-my-display-when-not-using-an-x-server. .