Dual dedicated GPU each with its own monitor.

runta

New Member
Joined
Nov 9, 2021
Messages
4
Reaction score
2
Credits
68
I have a GT 710 and a 6800 XT, each has a monitor connected.

When I use nouveau drivers along with amdgpu drivers I get the desired behavior of the 710 driving the desktop and DRI_PRIME=1 activating the 6800 XT.
Unfortunately the nouveau drivers on the 710 are awful. They freeze the system when resizing windows and just perform poorly in general. Reverse Prime also works with nouveau but the monitor with connected to the 710 has problems rendering panels.

Trying to fix this issue I installed the proprietary Nvidia drivers but for some reason when using these drivers DRI_PRIME=1 does not work.

The 6800 XT shows up in the list of providers but can't be used with Prime.

Code:
xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x278 cap: 0x1, Source Output crtcs: 4 outputs: 3 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x2bb cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 4 associated providers: 1 name:AMD Radeon RX 6800 XT @ pci:0000:0b:00.0

Trying to set the offload sink returns an error.

Code:
xrandr --setprovideroffloadsink 0 1

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  34 (RRSetProviderOffloadSink)
  Value in failed request:  0x278
  Serial number of failed request:  16
  Current serial number in output stream:  17

Same for xrandr --setprovideroffloadsink 1 0. xrandr --auto does not help either.

DRI_PRIME=1 glxinfo -B and glxinfo -B returns the 710.

This is the xorg.conf I'm using. Probably incorrect, I'm pretty new to this just throwing stuff at it hoping something will work.

Code:
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    Screen      1  "Screen1" RightOf "Screen0"
    Inactive       "Device1"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
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"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID           "PCI:4:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "amdgpu"
    VendorName     "AMD"
    BusID           "PCI:11:0:0"
    Option          "DRI"  "3"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Is there any way I can make this work?
I would also be fine with running two separate xorg sessions per GPU/monitor, if that is even possible I would appreciate advice on how to make it work. I read about something like this being possible but can't find information on how to do it.
Thanks for any help.
 


OP
R

runta

New Member
Joined
Nov 9, 2021
Messages
4
Reaction score
2
Credits
68
Thanks for anyone who read this and or tried to help but I'm giving up on Linux.
So many great advancements in gaming is what made me want to try but the abysmal multi-GPU/muli-monitor support is too much of a down side for me. Maybe in the future things will be better but right now its just one issue after another trying to get this to work.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
3,880
Reaction score
2,623
Credits
28,033
I read your topic but since I have no experience with dual-GPU's I don't have any advice on that. Why are you actually using an AMD grpu and an Nvidia gpu, usually when people use dual-GPU they use two of the same vendor and identical GPU's for SLI or Crossfire. Although I remember reading somewhere that Nvidia doesn't support SLI anymore. I can understand your choice although there are enough people from the community around to try and help you work through your problems, so I hope you could GNU/Linux another chance at some point.
 
OP
R

runta

New Member
Joined
Nov 9, 2021
Messages
4
Reaction score
2
Credits
68
I read your topic but since I have no experience with dual-GPU's I don't have any advice on that. Why are you actually using an AMD grpu and an Nvidia gpu, usually when people use dual-GPU they use two of the same vendor and identical GPU's for SLI or Crossfire. Although I remember reading somewhere that Nvidia doesn't support SLI anymore. I can understand your choice although there are enough people from the community around to try and help you work through your problems, so I hope you could GNU/Linux another chance at some point.

Got the 710 to hold me over until I could get my hands on a better card some time ago but kept using it to run a secondary monitor afterwards. No intention to use it for SLI or anything like that.

The benefit of this over just connecting both monitors to the 6800 is that on Windows I can force the 710 to hardware accelerate Firefox for example. Windows has all sorts of problems when things are rendering on both monitors at the same time when using a single GPU and this mitigates the issue.

Thanks for the input.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
3,880
Reaction score
2,623
Credits
28,033
I did find two Archwiki pages about Hybrid(dual-gpu) and Prime but I thought it would be too complicated for a beginner such as yourself and since I have no experience with dual-monitor I would have hard time trying to help you out with it. If you had two AMD gpu's or two Nvidia gpu's I would suspect you would have an easier time because of being able to use the same drivers for both cards. Been gaming for quite some time on GNU/Linux myself and this year I switched from team green to team red, I'm currently using an RX 6700XT. Enjoy your gaming on Windows and hope to see you back at some point!
 
Last edited:
OP
R

runta

New Member
Joined
Nov 9, 2021
Messages
4
Reaction score
2
Credits
68
I found some free time and because I'm a masochist I tried to figure this out on my own even though I'm not going to use Linux at this point. I'm hoping maybe this helps someone out or maybe pushes someone to fix some of these issues.

Everything about multi-monitor/multi-GPU set ups is incredibly poorly documented and outdated. I'm begging the Linux community to improve this.

Reverse Prime with an AMD GPU as the main GPU and a secondary Nvidia GPU while using the Nvidia proprietary drivers is possible by using the kernel parameter nvidia-drm.modeset=1.
However this cuts the performance of the AMD GPU down to a third of its actual capabilities(disabling compositing makes no difference). It also causes the Nvidia GPU to constantly run at 40% utilization for some reason.
Its also impossible to access the hardware acceleration of the Nvidia GPU(For example Firefox falls back to software rendering if the Nvidia GPU is specified with "__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia").
Basically its buggy and broken. Admittedly this is probably just another Nvidia problem in a long line of Nvidia problems oh well.

What I have been able to get working is bordering on insanity.
Edit: Should mention in this set up each screen is independent and windows cannot be moved between screens.

Keep in mind that I had this almost same exact configuration above but it did not work because of the "Screen 0/1" line under the Device section. I couldn't find documentation on how this works anywhere...

Code:
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    Screen      1  "Screen1" LeftOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
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 "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "amdgpu"
    VendorName     "AMD"
    BusID           "PCI:11:0:0"
    Option          "DRI"  "3"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver "nvidia"
    VendorName     "NVIDIA Corporation" 
    BusID           "PCI:4:0:0"
    Option          "DRI"  "3"
    Option "AllowEmptyInitialConfiguration"
EndSection

This work only sort of works on its own. It creates two screens, Display 0 Screen 0 and Display 0 Screen 1. glxinfo -B returns both GPUs and to specify which screen/card should be used the DISPLAY variable can be used. Example DISPLAY=:0.1 firefox to run Firefox on the Nvidia card.

With most window managers the Nvidia screen is completely black and the mouse cursor is an X.
The only exeption is fvwm3/fvwm2 where both screens work fine however fvwm is... not something I want to use.
Xfce4 allows dragging a panel onto the Nvidia screen however its extremely buggy and the panel returns to the AMD screen after logging out.

Attempting to open anything on the Nvidia screen while using KDE crashes Kwin. Many other window managers\desktop environments I've tried suffer from the same problem. For whatever reason window managers take ownership of both screens but only render decorations on the main screen and make it very difficult to do anything on the second screen.

What I have finally been able to get working to a satisfactory degree is this.
Using KDE Plasma and replacing kwin with kwinft(can be found on the AUR).
kwinft is unique in that it does not crash when running another window manager on the Nvidia screen.
This allowed me to start another window manager on the Nvidia screen, I had most success using awesome. Other window managers might work(DISPLAY=:0.1 awesome).
One remaining issue is that the Super button does not bring up the application menu while using two screens.

This is the best I could come up with good luck to anyone else who wants to do something similar.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Staff online


Top