I have a default install of ubuntu 18.04, plus i3 installed. i3 probably not relevant, but providing it for context as having the screen rotated in the window manager is 90% of what i need.

Looking at the man gdm3, i see it will load /etc/gdm3/Init/Default (I have no display file). I tried adding the correct command (use arandr to generate the necessary xrandr command string).

  • adding the xrandr command to the end of /etc/gdm3/Init/Default --> nothing changes, gdm3 loads find BUT without the rotation changed, and I can log in.
  • adding it to /etc/gdm3/PreSession/Default --> After entering my password on gdm, something crashes and i'm bounced back to the gdm logon screen.

if i run this same xrandr line from after i log into an i3 session, it works as expected.

  • for reference, arandr gave me:

    xrandr --output DVI-D-0 --off --output HDMI-0 --off --output DP-5 --off --output DP-4 --mode 3840x2160 --pos 6000x1680 --rotate normal --output DP-3 --off --output DP-2 --mode 3840x2160 --pos 2160x1680 --rotate normal --output DP-1 --off --output DP-0 --mode 3840x2160 --pos 0x0 --rotate left

  • one vertical 4k monitor to the left of two horizontal 4k's.

Ideally, how do I get my monitors rotated "from the get go" (eg, GDM displays rotated correctly). Alternatively, where can i run that xrandr to get the i3 session correctly rotated?

I tried google, man for both, and the i3 user guide, but couldn't find an answer to this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.