Page 1 of 1
Change Display Rotation
Posted: Wed Aug 24, 2022 9:44 am
by leadgtr7
Hi All,
Anyone know how I can change the rotation of the HDMI output?
I tried ssh'n into the pi and using sudo nano on the config.txt file but when i try to save my edits I get an error saying I can't write to the file.
For ref i was following this guide
https://linuxhint.com/rotate-screen-in- ... 20Display.
Re: Change Display Rotation
Posted: Mon Jan 26, 2026 4:25 pm
by wabbastang
I realize this is very old, replying mostly so that this info is recorded somewhere. But here's what you needed to do:
Run the following, ignore inside the brackets:
sudo mount -o remount,rw /boot [makes the file system writable]
sudo nano /boot/config.txt [edit the config file]
add:
display_rotate=1 (1 does 90 degrees, 2=180, 3=270)
Save & close.
If you have a touchscreen, also edit this file to rotate the input:
sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
Scroll down to the section with the identifier "libinput touchscreen catchall"
Depending on your rotation, add one of these lines to the list, minus what I have in brackets:
[ For 90°] Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"
[ For 180°] Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1"
[For 270] Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
When you are done editing:
sudo mount -o remount,ro /boot [mounts file system as read only]
sudo reboot [resets the machine]
Re: Change Display Rotation
Posted: Mon Feb 09, 2026 6:40 pm
by samlevy0515
You need to edit with sudo. Try sudo nano /boot/config.txt. The guide you used probably skipped the sudo part.
Re: Change Display Rotation
Posted: Tue Feb 10, 2026 9:34 am
by Doug
I think the filesystem is read only. You have to remount it to be read/write in order to save changes.
Be careful. Making the wrong changes could result in disaster.
Doug