You are not logged in.

#1 2019-11-02 11:52:08

Badgy
Member
Registered: 2019-10-27
Posts: 3

[SOLVED] Only one X screen is active with multi Nvidia GPU setup

I have for the past week or so been trying to create a setup using two different Nvidia GPUs. With my current config, all monitors are loaded, however the X screen connected to the secondary GPU is inactive in a sense; I can move my cursor there and see it, however the cursor is displayed as an 'X'. I can't launch any applications on on the secondary GPU's screen without doing so from a terminal using

DISPLAY=:1 application

and even then I can't interact with the application. I am using i3wm and the proprietary Nvidia driver.

GPUs:

$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)
03:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] (rev a1)

Where the GTX 960 is the primary, running two monitors on one X screen fine, and the GTX 1060 is the secondary running a second X screen with my TV as the only monitor.

Xorg config:

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

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 3840 0
    Screen      1  "Screen1" LeftOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
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      "Samsung SMS27A550H"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: unknown, VertRefresh source: unknown
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "SAMSUNG"
    HorizSync       0.0 - 0.0
    VertRefresh     0.0
    Option         "DPMS"
EndSection

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

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1060 3GB"
    BusID          "PCI:3:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "HDMI-0: 1920x1080 +0+0, DVI-I-1: 1280x1024 +1920+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" "nvidia-auto-select +0+0 {AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Xrandr output:

$ xrandr
Screen 0: minimum 8 x 8, current 3200 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1280x1024+1920+0 (normal left inverted right x axis y axis) 376mm x 301mm
   1280x1024     60.02*+  75.02  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      74.98    59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

$ xrandr --screen 1
Screen 1: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
DVI-D-0 disconnected primary (normal left inverted right x axis y axis)
HDMI-0 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 1872mm x 1053mm
   3840x2160     30.00*+  59.94    50.00    29.97    25.00    23.98  
   4096x2160     59.94    50.00    29.97    25.00    24.00    23.98  
   1920x1080     60.00    59.94    50.00    29.97    25.00    23.98    60.00    50.04  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1366x768      59.79  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

Xrandr providers:

$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x1b8 cap: 0x0 crtcs: 4 outputs: 9 associated providers: 0 name:NVIDIA-0

$ xrandr --screen 1 --listproviders
Providers: number : 1
Provider 0: id: 0x37c cap: 0x0 crtcs: 4 outputs: 8 associated providers: 0 name:NVIDIA-1

Xorg log

What I have tried so far:

  • Enabling Base Mosaic - this completely disabled the X screen running on the secondary GPU.

  • Enabling SLI Mosaic - same as above.

  • Compacting to a singular X screen using a similar setup as the one suggested by SheepReaper here. I have also tried this without explicit GPU UUIDs - same as above.

  • Enabling Xinerama - this resulted in all monitors flickering between black and white on boot, and prevented Arch from booting - this may be due to a faulty config, however I read somewhere that Xinerama disables 3D acceleration, and did not proceed further with this.

  • Launching a second X session with

    xinit /usr/bin/i3 -- :1

    and

    startx /usr/bin/i3 -- :1

    these both successfully launched a new session, however these sessions were both contained to the monitors on the primary GPU, with the same issues on the secondary GPU monitor.

It currently feels as though I have tried everything, and I would greatly appreciate any assistance in making this setup function.

Last edited by Badgy (2019-11-02 16:40:15)

Offline

#2 2019-11-02 14:41:11

seth
Member
Registered: 2012-09-03
Posts: 51,143

Re: [SOLVED] Only one X screen is active with multi Nvidia GPU setup

I read somewhere that Xinerama disables 3D acceleration

PSA: the internet is full of bullshit.

Your GPU combo isn't eligible for BaseMoasic so you'll have to go either with seperate screens (but it's "DISPLAY=:0.1"), SLI (that implies a hardware connection between the GPUs!) or xinerama (which doesn't break HW GL acceleration, but indeed conflicts w/ xrandr - which some clients may blindly rely on)
The seperate screens imply that windows cannot be moved around freely and there *may* be issues w/ passing around the focus (what may fit your initial pragraph) - having a (not necessarily the same) WM on both screens can mitigate that problem, ideally the WM would be multihead aware (one process operating on two screens)

tl;dr:
A single screen will require a physical SLI setup or xinerama (no randr, but still HW acceleration, maybe not across screens).
If neither is acceptable you need to run two seperate screens (the posted config should provide that) and we'd need to focus on getting a WM (eg. openbox) running there.

nb. that you do NOT NEED A SECOND xinit! - It's still the same X11 server, just try eg. "DISPLAY=:0.1 i3", but idk. how well i3 behaves w/ multiscreen layouts.

https://wiki.archlinux.org/index.php/Multihead

Offline

#3 2019-11-02 16:39:54

Badgy
Member
Registered: 2019-10-27
Posts: 3

Re: [SOLVED] Only one X screen is active with multi Nvidia GPU setup

Thanks for your reply, seth.

In the meantime, in frustration, I decided to switch over to nouveau and made an equivalent Xorg config, as there was no particular reason for me to use the proprietary drivers. This however did not fix it.

Now, "DISPLAY=:0.1 i3" did the trick and was exactly what I needed, and presumably it will work with proprietary drivers as well. It does seem like i3 does not handle multiple instances very well - a second instance with the same config breaks any modifier keybinds, and a separate config breaks keybinds on the first instance.

Marking as solved. Thanks.

Offline

Board footer

Powered by FluxBB