10

I've been an ubuntu user for a few years now, and this may be my first problem ever (or at least the first I couldn't figure out quickly by myself).

I have a 3 monitor setup with monitor '2' on the left rotated 90 degrees, and monitors 1 and 3 in landscape mode.

Video card is a GTX 1060 6GB and I'm running nvidia-driver-440 (I also tested this with 390)

I updated to 20.04 today from 19.10 - all went smoothly, except monitor 2 will not rotate. If I try and rotate it, the screen refreshes, and it shows up overlapping my other monitors.

Will try the Nouveau drivers as well, but open to other ideas.

Alan
  • 273
  • 1
    For reference: This reddit post has links to the corresponding bug reports in the comments:
    • https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1874217
    • https://gitlab.gnome.org/GNOME/mutter/-/issues/1263
    • https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/974
    – Christian Jun 02 '20 at 08:56
  • While I faced the same issue using the standard display settings, I was able to do it via Nvidia X Server Settings. – Pouya Nov 24 '20 at 07:47

3 Answers3

7

I did a fresh install yesterday and got the same issue. I was able to reconfigure the mess via the Nvidia configurator but it only last for the current session (i.e. I have to redo it all over again each time I reboot).

Here a workaround :

First create a bash script, assuming your 3 monitors are in 1920x1080 mode (if not, you will have to adjust the "--pos" offset accordingly) and the primary is the middle one :

#!/bin/bash
xrandr --output [Your monitor "2" ID] --pos 0x0 --rotate left --mode 1920x1080 
xrandr --output [Your monitor "1" ID] --primary --pos 1080x360 --mode 1920x1080 
xrandr --output [Your monitor "3" ID] --pos 3000x360 --mode 1920x1080 

(the 360 y-offset put your monitor 1 and 3 roughly at the middle of the left one, adjust it as you please)

Then make it executable and add it in your startup app list. At this point, when you boot, the script may kick in before the GUI is ready (so it does nothing). Open ~/.config/autostart/[your_script_entry_name].desktop in an editor and add the line

X-GNOME-Autostart-Delay=1

(For some reason, putting a "sleep" command in the bash script does not work, but the startup delay does...) That did the trick for me, I hope it helps

  • I created a bash file like this and could add it to start up via the Ubuntu application "Startup Applications" that you can find by searching for it in Unity. – embe Jun 13 '20 at 11:34
5

After pondering a little longer, I tried rotating the screen via the shell with xrandr (xrandr --output DVD-I-1 --rotate right), and I'm up and running.

Weird bug, but hopefully the changes stick

Alan
  • 273
2

I have a solution inspired by this comment#25 in the mutter bug.

First, we create a ~/.config/monitors.xml file for the layout (we can experiment a layout with xrandr). My monitors.xml is attached below.

Then, copy the monitors.xml to /var/lib/gdm3/.config/ and change file owner:

sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/
sudo chown gdm:gdm /var/lib/gdm3/.config/monitors.xml

The monitor layout will persist across restarts and screen locks.

<monitors version="2">
  <configuration>
    <logicalmonitor>
      <x>1440</x>
      <y>0</y>
      <scale>1</scale>
      <primary>yes</primary>
      <monitor>
        <monitorspec>
          <connector>HDMI-0</connector>
        </monitorspec>
        <mode>
          <width>3840</width>
          <height>1600</height>
          <rate>59.993923187255859</rate>
        </mode>
      </monitor>
    </logicalmonitor>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>1</scale>
      <transform>
        <rotation>left</rotation>
        <flipped>no</flipped>
      </transform>
      <monitor>
        <monitorspec>
          <connector>HDMI-1</connector>
        </monitorspec>
        <mode>
          <width>2560</width>
          <height>1440</height>
          <rate>59.950550079345703</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>
</monitors>
Liang
  • 21
  • 1
  • I have found an easy way to generate monitors.xml with help of arandr and display settings If you don't have it yet, install using sudo apt install arandr. Run arandr from terminal or Activities. Edit config there, visual editor works without any glitches (you can also save layout as shell script for future use).

    Open display menu in settings.
    Change scale to 200%, apply, keep changes. Change scale back to 100%, apply, keep changes. This will update your ~/.config/monitors.xml. After that follow command from the answer above.

    – Anton Matosov Jun 13 '20 at 21:24