Multiple GPUs with Multiple displays.

I’m running Ubuntu Studio and my system has 4 GPUS. 2 gtx 1080 and 2 gtx 1070s. I dual boot windows 10 and run the 1080s in sli. Currently I have three screens connected to my computer. 1 to a 1070 and 2 to a 1080. I’m trying to get all three screens to show in ubuntu, but currently only the screen connected to the 1070 shows. They work with xinerama, but I want the ability to maxmimize a window to a single monitor. How would I get the screens connected to the 1080 to show. I don’t plan on running sli in linux, but I can if it’ll make the screens work.

My Setup is a bit different, but I was able to get 2 Nvidia GPUs running across 3 monitors. Although I can’t drag application windows across screens, they do maximize on the screen where I put them (Usually, sometimes need to futz with $DISPLAY or command line screen parameter, and Firefox is an idiot). When running multi-GPU and multi-monitor, its best not to depend too heavily on automagical GUI configuration tools.

Slackware64-14.2 Xfce 4.12
GTX 1060 on 4K monitor0
GTX 660 on 1080p monitor1, monitor2
Nvidia 430.50

Obviously no SLI, and xinerama is disabled. All monitors are separate X screens. This took careful crafting of the /etc/X11/xorg.conf.d/xorg.conf (a lost art these days).

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 1920 0
    Screen      1  "Screen1" 0 0
    Screen      2  "Screen2" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Samsung"
    ModelName      "Samsung U28E590"
    HorizSync       135.0 - 135.0
    VertRefresh     40.0 - 60.0
    Option         "DPMS"
    Option         "UseEdidDpi" "TRUE"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "LG"
    ModelName      "LG Electronics E2360"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
    Option         "UseEdidDpi" "TRUE"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor2"
    VendorName     "Viewsonic"
    ModelName      "ViewSonic VA2448 SERIES"
    HorizSync       24.0 - 82.0
    VertRefresh     50.0 - 75.
    Option         "DPMS"
    Option         "UseEdidDpi" "TRUE"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1060 6GB"
    BusID          "PCI:3:0:0"
    Option         "Coolbits" "12"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 660"
    BusID          "PCI:4:0:0"
    Screen          0
    Option         "Coolbits" "12"
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 660"
    Screen          1
    BusID          "PCI:4:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-6"
    Option         "metamodes" "3840x2160 +0+0 {AllowGSYNCCompatible=On}; nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DVI-I-1: 1920x1080_60 +0+0 {AllowGSYNC=Off}; DVI-I-1: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DVI-D-0: 1920x1080_60 +0+0 {AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

I have the screens on, X screen 0 is working fine, but X screen 1 and 2 are on, but only show black. Here’s my config file.

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 435.21

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 1080 0
    Screen      1  "Screen1" 0 900
    Screen      2  "Screen2" RightOf "Screen1"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Gateway HX2000"
    HorizSync       31.0 - 83.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Asus"
    ModelName      "Ancor Communications Inc VG248"
    HorizSync       30.0 - 160.0
    VertRefresh     50.0 - 150.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor2"
    VendorName     "Asus"
    ModelName      "Ancor Communications Inc VG248"
    HorizSync       30.0 - 160.0
    VertRefresh     50.0 - 150.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1070"
    BusID          "PCI:2:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080"
    BusID          "PCI:4:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080"
    BusID          "PCI:4:0:0"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-4"
    Option         "metamodes" "nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-4"
    Option         "metamodes" "DP-2: 1920x1080_144 +0+0 {AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DP-4: 1920x1080_144 +0+0 {AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

You should be able to start something on them by prepending the proper DISPLAY setting, e.g.
DISPLAY=0.1 nvidia-settings
or
DISPLAY=1.1 nvidia-settings
Otherwise, use Xinerama and a Xinerama aware window manager. xfwm might work.

how would I use Display=0.1 or Display=1.1? I’m new to Ubuntu, but I am familiar with the xorg.conf file and terminal commands.

open a terminal and prepend it to the application to start like in my example with nvidia-settings.