Multiple GPU's vendors, Fedora

Hello everyone,

Long time fan of the show here, I greatly appreciate all you do. Keep up the good work!

My setup:
I have a problem related to my particular setup, let me describe it here:

  • 3 monitors (~fhd, 4k, ~fhd rotated 90°) (the rotated monitor is on the second gpu head)
  • 2 Gpu’s (Rx560 1st slot, gtx 1070 2nd slot)
  • Fedora 29
  • Kde

My issue:
I would like to be able to use the second gpu as a renderer from time to time by using the command DRI_PRIME=1 for example.
But there is no way I can get both renderers to show up at the same time, both gpu’s are loading and so is their respective modules.

Here is the different configurations that I tried:

  • amdgpu + nouveau
    xrandr --listproviders => 2 providers, 1st rx560, 2nd modesetting
  • amdgpu + nvidia
    xrandr --listproviders => 2 providers, 1st nvidia, 2nd modesetting

On the second configuration (nvidia closed source + amdgpu), I do get the rendering that is done on the gtx card and the output sent to the right monitors through the rx card.

Same goes for “glxinfo | grep -i renderer” I either see nvidia or amd renderer but never both.

I wish to continue to use the amdgpu as the main output and renderer. I only want the nvidia one to be used from time to time, preferably with their closed driver as nouveau is deeply lacking and I wouldn’t be able to test any app that requires CUDA.

If you have any idea how to succeed such setup, I would be very grateful.

NOTE: if you feel this post is in the wrong category, please feel free to move it.

A little more feedback on my issue.

Strangely I could get glxinfo to provide me the correct glxinfo when using the combo (amdgpu+nouveau) which is not ideal but still:

  • glxinfo | grep -i renderer
    OpenGL renderer string: Radeon RX 560 Series (POLARIS11, DRM 3.27.0, 4.20.6-200.fc29.x86_64, LLVM 7.0.0)

  • DRI_PRIME=1 glxinfo | grep -i renderer
    OpenGL renderer string: NV134

So there’s that. Of course that does not effect xrandr.

Funny enough if I start steam with DRI_PRIME=1 (flatpak run …Steam)
I am able to get the Steam to report the video card as follows:

Video Card:
    Driver:  nouveau NV134
    Driver Version:  4.3 (Compatibility Profile) Mesa 18.3.1
    OpenGL Version: 4.3
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 59 Hz
    VendorID:  0x10de
    DeviceID:  0x1b81
    Revision Not Detected
    Number of Monitors:  3
    Number of Logical Video Cards:  2
    Primary Display Resolution:  3840 x 2160
    Desktop Resolution: 6960 x 2168
    Primary Display Size: 23.62" x 13.39" (27.13" diag)
                                            60.0cm x 34.0cm (68.9cm diag)
    Primary VRAM Not Detected

So that is interesting.

And without the DRI_PRIME=1 I have the following:

Video Card:
    Driver:  X.Org Radeon RX 560 Series (POLARIS11, DRM 3.27.0, 4.20.6-200.fc29.x86_64, LLVM 7.0.1)
    Driver Version:  4.5 (Compatibility Profile) Mesa 18.3.1
    OpenGL Version: 4.5
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 59 Hz
    VendorID:  0x10de
    DeviceID:  0x1b81
    Revision Not Detected
    Number of Monitors:  3
    Number of Logical Video Cards:  2
    Primary Display Resolution:  3840 x 2160
    Desktop Resolution: 6960 x 2168
    Primary Display Size: 23.62" x 13.39" (27.13" diag)
                                            60.0cm x 34.0cm (68.9cm diag)
    Primary VRAM: 4096 MB

I don’t know yet if the card is actually used when starting something with DRI_PRIME=1 as this is nouveau drivers so no cuda for me to test and the performance is quite poor. I don’t even thing reclocking works as the card fans are stopped even with a fullscreen game with unlimited FPS.
So it might always be in a lower power state, but I have no clue how to check nv card activity with nouveau driver.

Maybe a reason to why I want this setup to work.
My work is vast and really random, and being able to use either NV or AMD would save me so much time. I mainly work on Linux and the AMD open driver is now SO GOOD that it really works flawlessly with my monitor setup right after the bios has boot so there is no way I’m going back to nvidia until they fix modesetting and wayland support.

I plan on upgrading the small AMD card (rx 560) it was really to test. If I can afford the RVII that is comming I might aswell just do so.
But I really need to test on both platforms anyways, so it’s either I build a second system (really not what I want…) or I make this work.

Testing DRI_PRIME=1

I tested a few things with and without PRIME.
And the results are rather interesting. We are still on the amdgpu + nouveau situation.

glxgears is by no means a benchmark, but it does give us some ideas.

Starting both at the same time:

One then the other:

(I’m a new user, see post bellow for the next screens)

It does seem there is a penalty with such a small card (RX560) to do Framebuffer sharing.
But still the performance of nouveau is BAD, and I’m certain is has to do with reclocking… Thanks but no thanks nvidia… :confused:

We can see that an RX560 is performing better than the GTX 1070 under nouveau.

I’ll be waiting for reviews of the RVII and see if I go for a Vega 56 instead to redo this whole testing.

But I really really would like to find a way to test this with the setup amdgpu + nvidia closed drivers.
But sadly the radeon just disapears from the renderers as soon as I reboot with nvidia drivers, but the amdgpu drive is loaded and the heads are working.

The other runs from my above comment.

Onte then the other, (still at the same time).

And while they are running, now we reduce both windows (making them not render basically):

If you have any idea on how to make radeon default device 0 instead of device 1 when combined with nvidia proprietary modules I’m all ears.

So this one was fairly simple to solve in the end:

Note: GPU offloading is not supported by the closed-source drivers. To get PRIME to work you have to use the discrete card as the primary GPU. For GPU switching, see Bumblebee.
PRIME - ArchWiki

I reached the point where with a simple conf for xorg I could specify each device and the driver to be used so the primary amd card would still be driving the desktop.
But then the nvidia card simply refused to load its drivers. And the reason for this is that Nvidia drivers require to be the ones rendering the fullscreen server.

This is why bumblebee exists, it makes the nvidia driver render in another X screen and copies the FB over to the other X server…

This is so bad :confused: Those closed source drivers are really not up to the game…