1

I have two GPUs in my desktop computer, Radeon VII and a Radeon R7.

$ lspci -knn | grep -iA3 VGA

05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Oland PRO [Radeon R7 240/340 / Radeon 520] [1002:6613]
    Subsystem: PC Partner Limited / Sapphire Technology Oland PRO [Radeon R7 240/340] [174b:e263]
    Kernel driver in use: radeon
    Kernel modules: radeon, amdgpu
--
0d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 20 [Radeon VII] [1002:66af] (rev c1)
    Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega 20 [Radeon VII] [1002:081e]
    Kernel driver in use: amdgpu
    Kernel modules: amdgpu

Configured both in xorg.conf like this -

Section "ServerLayout"
    Identifier  "Layout0"
    Screen      "Screen0" 0 1440
    Screen      "Screen1" 2560 1440
    Screen      "Screen2" 0 0
    Screen      "Screen3" 2560 0

    Screen      "Screen4"
    Screen      "Screen5"

    Option "Xinerama"    "false"
EndSection

Section "Monitor"
    Identifier   "HDMI-A-1"    
    Option "Primary" "true"
EndSection

Section "Monitor"
    Identifier   "DisplayPort-0"
EndSection

Section "Monitor"
    Identifier   "DisplayPort-1"
EndSection

Section "Monitor"
    Identifier   "DisplayPort-2"
EndSection

Section "Monitor"
    Identifier   "HDMI-A-0"
EndSection

Section "Monitor"
    Identifier   "DVI-D-0"
EndSection

Section "Device"
    Identifier  "Card0"
    Driver      "amdgpu"
    BusID       "PCI:13:0:0"
EndSection

Section "Device"
    Identifier  "Card1"
    Driver      "amdgpu"
    BusID       "PCI:13:0:0"
EndSection

Section "Device"
    Identifier  "Card2"
    Driver      "amdgpu"
    BusID       "PCI:13:0:0"
EndSection

Section "Device"
    Identifier  "Card3"
    Driver      "amdgpu"
    BusID       "PCI:13:0:0"
EndSection

Section "Device"
    Identifier  "Card4"
    Driver      "radeon"
    BusID       "PCI:05:0:0"
EndSection

Section "Device"
    Identifier  "Card5"
    Driver      "radeon"
    BusID       "PCI:05:0:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "HDMI-A-1"
EndSection

Section "Screen"
    Identifier "Screen1"
    Device     "Card1"
    Monitor    "DisplayPort-0"
EndSection

Section "Screen"
    Identifier "Screen2"
    Device     "Card2"
    Monitor    "DisplayPort-1"
EndSection

Section "Screen"
    Identifier "Screen3"
    Device     "Card3"
    Monitor    "DisplayPort-2"
EndSection

Section "Screen"
    Identifier "Screen4"
    Device     "Card4"
    Monitor    "HDMI-A-0"
EndSection

Section "Screen"
    Identifier "Screen5"
    Device     "Card5"
    Monitor    "DVI-D-0"
EndSection

The problem I am having is that the two GPUs created two separate screens, and I cannot move with the mouse from one screen to the other.

Another problem is that when the second GPU is removed from configuration, the Vega II allows my window manager to recognize the 4 monitors connected as separate displays. But when both the GPUs are configured as working, the window manager recognizes each one of them as a separate display.

These commands shed more light on the problem:

$ xrandr --listproviders --listmonitors
Providers: number : 1
Provider 0: id: 0x58 cap: 0x9, Source Output, Sink Offload crtcs: 6 outputs: 4 associated providers: 0 name:AMD Radeon VII @ pci:0000:0d:00.0
Monitors: 4
 0: +*HDMI-A-1 2560/597x1440/336+0+1440  HDMI-A-1
 1: +DisplayPort-0 2560/597x1440/336+2560+1440  DisplayPort-0
 2: +DisplayPort-1 2560/597x1440/336+0+0  DisplayPort-1
 3: +DisplayPort-2 2560/597x1440/336+2560+0  DisplayPort-2

$ DISPLAY=:0.1 xrandr --listproviders --listmonitors
Providers: number : 1
Provider 0: id: 0xb5 cap: 0x9, Source Output, Sink Offload crtcs: 2 outputs: 3 associated providers: 0 name:OLAND @ pci:0000:05:00.0
Monitors: 1
 0: +*HDMI-0 1280/527x1024/296+0+0  HDMI-0

Why is the second GPU receiving a separate screen instead of added as another monitor to the same screen as the first 4 monitors on the first GPU?

Full Xorg log of this split setup at https://gist.github.com/kesor/217daebf0ffbd58c70e2b9ec3a9c8ea6

1 Answer 1

0

I figured out a way to have this work, involving several steps that involves PRIME.

There is partial documentation at https://wiki.archlinux.org/title/PRIME and other places.

The original question shows two GPUs, each capable to be a source output and sink offload. As well as multiple crtcs (number of driven monitors) and actual outputs.

The Radeon VII has outputs: 4 and crtcs: 6, and it has 4 physical monitors connected to it. Three via DisplayPort connections, one via HDMI connection.

The Radeon R7 has otputs: 3 and crtcs: 2. It only has one physical monitor connected via HDMI, but it also has a VGA and a DVI connections. But it can only drive 2 monitors at a time, even if/when you connect all 3 connections.

Now for the actual solution - it is possible to have the VII send of of its crtcs to R7's output.

First, remove any Monitor or Screen sections that configure the second GPU. But leave the Device/Card section.

Then, note the two providers will appear on the same X-screen:

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x58 cap: 0x9, Source Output, Sink Offload crtcs: 6 outputs: 4 associated providers: 1 name:AMD Radeon VII @ pci:0000:0d:00.0
Provider 1: id: 0xa5 cap: 0x6, Sink Output, Source Offload crtcs: 2 outputs: 3 associated providers: 1 name:AMD Radeon R7 200 Series @ pci:0000:05:00.0

Note the ID for each of the providers, and set the RII as the sink and the R7 as the output:

$ xrandr --setprovideroffloadsink 0xa5 0x58

This already caused the second HDMI (connected to the R7) to work, but there was another problem that prevented it from showing anything useful. It would show corrupt pixels basically.

The problem is with the kernel drives, as the original question shows the PCI devices at the very start, it also shows that the R7 GPU was using the radeon driver while the VII GPU was using the amdgpu driver.

I had to blacklist the radeon driver by adding it into /etc/modprobe.d/... and restarting the computer in order to have both the devices use the same driver.

$ lspci -knn | grep -iA3 VGA
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Oland PRO [Radeon R7 240/340 / Radeon 520] [1002:6613]
    Subsystem: PC Partner Limited / Sapphire Technology Oland PRO [Radeon R7 240/340] [174b:e263]
    Kernel driver in use: amdgpu
    Kernel modules: radeon, amdgpu
--
0d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 20 [Radeon VII] [1002:66af] (rev c1)
    Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega 20 [Radeon VII] [1002:081e]
    Kernel driver in use: amdgpu
    Kernel modules: amdgpu

Now, the HDMI output of the R7 can be used as-if it was another output of the VII.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .