37

Recently I booted Ubuntu 18.04 Live USB and I faced annoying problem. Screen was rotated and there was no rotate options in settings. I had to search not so obvious places in Internet, so I share this Q&A.

muru
  • 197,895
  • 55
  • 485
  • 740
Qback
  • 1,103

2 Answers2

62

You should use xrandr command. xrandr -o normal takes your screen back to normal (landscape) rotation.

Ubuntu 22:

instead of xrandr -o normal you should use xrandr -orientation normal

Qback
  • 1,103
9

You can use these commands:

xrandr --output $(xrandr |grep eDP|cut -d" " -f1) --rotate left
xrandr --output $(xrandr |grep eDP|cut -d" " -f1) --rotate normal

also right and inverted

I created a script here: https://gist.github.com/rubo77/d43cc5b3ff65d6df28b8b8c3c089f23b

with that script, you can simply call

rotatescreen.sh -r
rotatescreen.sh -l
rotatescreen.sh -i
rotatescreen.sh -n

Alternative, you can use CTRL+F8 to rotate using

gsettings set org.gnome.mutter.keybindings rotate-monitor "['XF86RotateWindows', '<Control>F8']"

see https://askubuntu.com/a/1184316/34298

rubo77
  • 32,486