xorg, xrandr, 4 monitors and two nvidia graphics cards. Does not work in the desired configuration

What I have

  1. Two video cards. nvidia 1050 and nvidia 1050 Ti
  2. Four monitors. One is 4k, one is Full HD, and two are 1920x1200. The last two are in portrait mode. The setup is like this

How it works now

All monitors are connected to the 1050 Ti. It works. The configuration is as follows: xorg:

# Managed by ansible. Editing is useless
# Sheridan

      
Section "Device"
  Identifier "Device_nvidia_corporation_geforce_gtx_1050_ti__gp107_"
  Driver     "nvidia"
  VendorName "NVidia Corporation"
  BoardName  "GeForce GTX 1050 Ti (GP107)"



  Option     "NoRenderExtension"    "off"
  Option     "IndirectMemoryAccess" "on"
  Option     "IgnoreEDID"           "off"
  Option     "UseEDID"              "on"
  Option     "NoLogo"               "off"
  Option     "RandRRotation"        "on"
  Option     "MultiGPU"             "off"
  Option     "SLI"                  "off"
  Option     "AllowSHMPixmaps"      "on"


  BusID      "PCI:01:00:0"
EndSection

      
Section "Device"
  Identifier "Device_nvidia_corporation_geforce_gtx_1050__gp107_"
  Driver     "nvidia"
  VendorName "NVidia Corporation"
  BoardName  "GeForce GTX 1050 (GP107)"



  Option     "NoRenderExtension"    "off"
  Option     "IndirectMemoryAccess" "on"
  Option     "IgnoreEDID"           "off"
  Option     "UseEDID"              "on"
  Option     "NoLogo"               "off"
  Option     "RandRRotation"        "on"
  Option     "MultiGPU"             "off"
  Option     "SLI"                  "off"
  Option     "AllowSHMPixmaps"      "on"


  BusID      "PCI:08:00:0"
EndSection



        
# center: LG 27UL500-W -> 3840x2160@60
# first: NVidia Corporation GeForce GTX 1050 Ti (GP107) @ DP-0
Section "Monitor"
  Identifier    "Monitor_lg_27ul500_w_first_dp_0"
  VendorName    "LG"
  ModelName     "27UL500-W"
  Option        "DPMS"
EndSection

Section "Screen"
  Identifier   "Screen_nvidia_corporation_geforce_gtx_1050_ti__gp107__lg_27ul500_w_first_dp_0"
  Device       "Device_nvidia_corporation_geforce_gtx_1050_ti__gp107_"
  Monitor      "Monitor_lg_27ul500_w_first_dp_0"
  DefaultDepth  24
  SubSection   "Display"
    Depth       24
  EndSubSection
EndSection

        
# top: LG 22MP55 -> 1920x1080@60
# first: NVidia Corporation GeForce GTX 1050 Ti (GP107) @ DVI-D-0
Section "Monitor"
  Identifier    "Monitor_lg_22mp55_first_dvi_d_0"
  VendorName    "LG"
  ModelName     "22MP55"
  Option        "DPMS"
EndSection

Section "Screen"
  Identifier   "Screen_nvidia_corporation_geforce_gtx_1050_ti__gp107__lg_22mp55_first_dvi_d_0"
  Device       "Device_nvidia_corporation_geforce_gtx_1050_ti__gp107_"
  Monitor      "Monitor_lg_22mp55_first_dvi_d_0"
  DefaultDepth  24
  SubSection   "Display"
    Depth       24
  EndSubSection
EndSection

        
# left: Iiyama ProLite XU2395WSU-B1 -> 1920x1200@60
# first: NVidia Corporation GeForce GTX 1050 Ti (GP107) @ HDMI-1
Section "Monitor"
  Identifier    "Monitor_iiyama_prolite_xu2395wsu_b1_first_hdmi_1"
  VendorName    "Iiyama"
  ModelName     "ProLite XU2395WSU-B1"
  Option        "DPMS"
EndSection

Section "Screen"
  Identifier   "Screen_nvidia_corporation_geforce_gtx_1050_ti__gp107__iiyama_prolite_xu2395wsu_b1_first_hdmi_1"
  Device       "Device_nvidia_corporation_geforce_gtx_1050_ti__gp107_"
  Monitor      "Monitor_iiyama_prolite_xu2395wsu_b1_first_hdmi_1"
  DefaultDepth  24
  SubSection   "Display"
    Depth       24
  EndSubSection
EndSection

        
# right: Iiyama ProLite XU2395WSU-B1 -> 1920x1200@60
# first: NVidia Corporation GeForce GTX 1050 Ti (GP107) @ HDMI-0
Section "Monitor"
  Identifier    "Monitor_iiyama_prolite_xu2395wsu_b1_first_hdmi_0"
  VendorName    "Iiyama"
  ModelName     "ProLite XU2395WSU-B1"
  Option        "DPMS"
EndSection

Section "Screen"
  Identifier   "Screen_nvidia_corporation_geforce_gtx_1050_ti__gp107__iiyama_prolite_xu2395wsu_b1_first_hdmi_0"
  Device       "Device_nvidia_corporation_geforce_gtx_1050_ti__gp107_"
  Monitor      "Monitor_iiyama_prolite_xu2395wsu_b1_first_hdmi_0"
  DefaultDepth  24
  SubSection   "Display"
    Depth       24
  EndSubSection
EndSection

Xrandr initialization script:

#!/bin/bash

xrandr --setprovideroutputsource 1 0

# center: LG 27UL500-W -> 3840x2160@60
# top: LG 22MP55 -> 1920x1080@60
# left: Iiyama ProLite XU2395WSU-B1 -> 1920x1200@60
# right: Iiyama ProLite XU2395WSU-B1 -> 1920x1200@60


xrandr --verbose --dpi 96 \
    --output "DP-0" --mode 3840x2160 --rate 60  --primary  \
    --output "DVI-D-0" --mode 1920x1080 --rate 60  --above "DP-0"  \
    --output "HDMI-1" --mode 1920x1200 --rate 60  --left-of "DP-0" --rotate right \
    --output "HDMI-0" --mode 1920x1200 --rate 60  --right-of "DP-0" --rotate left \

At the start, the X's receive information about the maps and monitors. Next, at the start of the window manager, the xrandr initialization script is executed and the monitors are deployed and lined up in the positions I need.

What I want

  • Connect a 4k monitor to a 1050 Ti
  • Connect the remaining monitors to 1050 That is, I want to unload the main video card.

What I tried

I switch three monitors to the second video card naturally.

Changing the initialization script does not give results. xrandr doesn't want to rotate the monitors. The error is as follows: xrandr: output HDMI-1-0 cannot use rotation "right" reflection "none" Moreover, if you remove the rotation option , the monitors still won't start. Only the 4k monitor connected to the main graphics card is active. In attempts to find the ends-I dug up only randr: failed to create shared pixmap in the xorg server log.

I tried to configure it via nvidia-settings, using xinerama. The monitors started up, and the side monitors turned in the right direction. But as soon as you start something using opengl (yes, the same google chrome) - lags begin. Load on the main card, the second video card is kept in the region of 85-100%, if it is loaded, then sometimes a little.

Please tell me what else I can try? What did I forget? what didn't you take into account? Where's my joint?

Axis-Gentoo linux

Author: Sheridan, 2020-12-01