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.

2
6

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

1
  • 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

2
  • 1
    This works for me temporarily, but doesn't stick.
    – Jobu
    May 27 '20 at 4:37
  • While I couldn't use the standard Displays tool in Settings, I could use nvidia-settings, too.
    – Jobu
    May 27 '20 at 5:04
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>
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. Jun 13 '20 at 21:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.