5

I tried following this guide which apparently worked back in 2016. Is there an equivalent method that might work with Wayland? I saw somewhere that Gnome now supports it but my display settings only show a way to set the screen orientation manually.

vince
  • 88
  • 7

1 Answers1

-1

The good old xrandr -o [rotation] won't work in Ubuntu 18.

The working command to rotate screen in Ubuntu 18 is

xrandr --output [display port] --rotate [rotation]

with

  • [rotation] being, as before, one of normal, left, right or inverted;
  • [display port]: unless you already know yours (HDMI, DP, eDP...), you can

    • run xrandr alone and read through what it says to find the one which is said to be connected;

      or

    • run xrandr | egrep -o '^.+ connected' | cut -d " " -f 1 to have Shell bring it to you.

      With the two commands put together, you have:

      o=$(xrandr | egrep -o '^.+ connected' | cut -d " " -f 1); xrandr --output $o --rotate [rotation]
      

      or

      xrandr --output $(xrandr | egrep -o '^.+ connected' | cut -d " " -f 1) --rotate [rotation]
      
KiriSakow
  • 823
  • 1
  • 7
  • 19