Configure 3 screens/dual graphic/rotated screens Ubuntu 15.10

configurationgraphicsunityxorg

I have a PC with 2x AMD Radeon R5 230 graphics cards, one with 2x 1920×1080 screens plugged (HTMI and DVI) and another with 1x 1920×1080 screen (HDMI).

I have the two screens in the first graphics card rotated to portrait mode and the screen on the second graphics card in landscape mode.

I configured the desktop using the unity UI tools (System Settings -> Screen Display) and got the screens set up as I want them, however when I set the second screen on graphics card 1 to rotate, both portrait screens get their resolution cut by about 400 pixels.

Looking at xrandr -q I see the following:

Screen 0: minimum 320 x 200, current 4920 x 1515, maximum 16384 x 16384
HDMI-0 connected 1080x1920+0+12 left (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+  50.00    59.94    24.00    23.98  
   1920x1080i    60.00    50.00    50.00    59.94  
   1600x1200     60.00  
   1680x1050     59.88  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1440x900      74.98    59.90  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.08    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DVI-0 connected 1080x1920+3000+0 left (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+ 144.00   119.98   109.95    99.93    59.94  
   1600x1200     60.00  
   1680x1050     59.88  
   1280x1024    120.00   100.00    75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1152x864      75.00  
   1024x768     119.99    99.97    75.08    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 connected primary 1920x1080+1080+435 531mm x 299mm
   1920x1080     60.00*+  50.00    59.94    24.00    23.98  
   1920x1080i    60.00    50.00    50.00    59.94  
   1600x1200     60.00  
   1680x1050     59.88  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1440x900      74.98    59.90  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.08    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DVI-1-1 disconnected
VGA-1-1 disconnected

As you can see from the output above, even though all screens are set to their highest resolution, the size of Screen 0 is set to 4920×1515 instead of 4920×1920. I have been trying to change that screen size without success. What I tried:

preichert@2015-PC-19:~/.config$ cvt 4920 1920 60
# 4920x1920 59.97 Hz (CVT) hsync: 119.28 kHz; pclk: 808.25 MHz
Modeline "4920x1920_60.00"  808.25  4920 5312 5848 6776  1920 1923 1933 1989 -hsync +vsync
preichert@2015-PC-19:~/.config$ xrandr --newmode "4920x1920_60.00"  808.25  4920 5312 5848 6776  1920 1923 1933 1989 -hsync +vsync
preichert@2015-PC-19:~/.config$ xrandr --screen 0 --size 4920x1920
Size 4920x1920 not found in available modes

I haven't tried yet to create a custom xorg.conf file as I see that as a last resort thing and I don't know how to configure my two graphics cards on that. This is what they look like:

preichert@2015-PC-19:~/.config$ lspci
...
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Caicos HDMI Audio [Radeon HD 6400 Series]
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]
02:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Caicos HDMI Audio [Radeon HD 6400 Series]
...

And:

preichert@2015-PC-19:/usr/share/X11/xorg.conf.d$ xrandr --listproviders
Providers: number : 3
Provider 0: id: 0xa6 cap: 0x9, Source Output, Sink Offload crtcs: 4 outputs: 3 associated providers: 2 name:radeon
Provider 1: id: 0x46 cap: 0x6, Sink Output, Source Offload crtcs: 4 outputs: 3 associated providers: 2 name:radeon
Provider 2: id: 0x46 cap: 0x6, Sink Output, Source Offload crtcs: 4 outputs: 3 associated providers: 2 name:radeon

Best Answer

sudo xrandr --addmode VGA-1 4920x1920_60.00
Related Question