Two discrete AMD GPUs - how do I set the default/primary card for Wayland + KDE

I have plugged in a second AMD GPU to my PC.

I now have a Radeon RX 6950 XT and a Radeon RX 580.

❯ lspci -nn | rg -S vga
04:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev e7)
0b:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6950 XT] [1002:73a5] (rev c0)

Unfortunately, the default GPU that was picked is the weaker RX 580.

❯ glxinfo | rg "OpenGL vendor|OpenGL renderer"
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 580 Series (radeonsi, polaris10, ACO, DRM 3.63, 6.15.2-arch1-1)
vulkaninfo --summary
vulkaninfo --summary

--snip--

Instance Layers:
----------------

Devices:
========
GPU0:
        apiVersion         = 1.4.311
        driverVersion      = 25.1.3
        vendorID           = 0x1002
        deviceID           = 0x67df
        deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
        deviceName         = AMD Radeon RX 580 Series (RADV POLARIS10)
        driverID           = DRIVER_ID_MESA_RADV
        driverName         = radv
        driverInfo         = Mesa 25.1.3-arch1.3
        conformanceVersion = 1.4.0.0
        deviceUUID         = 00000000-0400-0000-0000-000000000000
        driverUUID         = 414d442d-4d45-5341-2d44-525600000000
GPU1:
        apiVersion         = 1.4.311
        driverVersion      = 25.1.3
        vendorID           = 0x1002
        deviceID           = 0x73a5
        deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
        deviceName         = AMD Radeon RX 6950 XT (RADV NAVI21)
        driverID           = DRIVER_ID_MESA_RADV
        driverName         = radv
        driverInfo         = Mesa 25.1.3-arch1.3
        conformanceVersion = 1.4.0.0
        deviceUUID         = 00000000-0b00-0000-0000-000000000000
        driverUUID         = 414d442d-4d45-5341-2d44-525600000000

I’m on KDE Plasma 6.3.5 with wayland.

How do I make the RX 6950 XT (0b:00.0) my default/primary card?
Happy to provide any additional information required.

Currently, pretty much every application I run uses it by default, which is not very nice. And I can seemingly only find nvidia-related posts online.


Solved! =)
Step-by-step, here:

Welcome to the forum :enos_flag: :enos:

Did you look in the BIOS which was set as the primary card ?

Put the RX 6950 XT in the first slot?

Check this topic - https://discussion.fedoraproject.org/t/fedora-36-nvidia-as-primary-gpu/70529/65
You can pass the environment variable KWIN_DRM_DEVICES=/dev/dri/card1:/dev/dri/card0 to KWin in order to manually choose the order it uses the devices in.

Welcome to the forum :enos_flag: :enos:

Thank you =)

Did you look in the BIOS which was set as the primary card

Everyone says there’s supposed to be a BIOS setting for that, but I cannot for the life of me find one. For reference, I have a x570 aorus elite. If you happen to know where that settings is on that mobo, or even what it’d potentially be called/some keywords - I’d love to hear it. But honestly I’m not sure if I have it.

There was a setting to set which pcie slot the pre-boot screen should be at, which is already set correctly I believe.

Unfortunately I don’t want to do that, as my second slot is running at x4, and I’d like my primary big GPU to be in the good x16 slot for maximum performance. I think the difference in x4 vs x16 pcie performance is not too big (?), but it is there, so I’d rather not compromise.

You can find the settings under settings > IO ports.

ƒ IO Ports
& Integrated Graphics (Note)
Enables or disables the onboard graphics function.
eAuto The BIOS will automatically enable or disable the onboard graphics depending on the
graphics card being installed. (Default)
eForces Enables the onboard graphics.
eDisabled	 	 Disables the onboard graphics.
& UMA Mode (Note)
Specify the UMA mode.
eAuto	 	 	 Lets the BIOS automatically configure this setting. (Default)
eUMA Specified	 Sets the UMA Frame Buffer Size.
eUMA Auto Sets the display resolution.
	 This item is configurable only when Integrated Graphics is set to Forces.
& UMA Frame Buffer Size (Note)
	 Frame buffer size is the total amount of systemmemory allocated solely for the onboard graphics controller.
MS-DOS, for example, will use only this memory for display. Options are: Auto (default), 64M~16G.
	 This item is configurable only when UMA Mode is set to UMA Specified.
& Display Resolution (Note)
Allows you to set the display resolution. Options are: Auto (default), 1920x1080 and below, 2560x1600,
3840x2160.
	 This item is configurable only when UMA Mode is set to UMA Auto.
& Initial Display Output
	 Specifies the first initiation of themonitor display fromthe installed PCI Express graphics card or the onboard
graphics.
eIGD Video (Note)	 Sets the onboard graphics as the first display.
ePCIe 1 Slot		 Sets the graphics card on the PCIEX16 slot as the first display. (Default)
ePCIe 2 Slot		 Sets the graphics card on the PCIEX4 slot as the first display

Also a link to the manual
https://www.gigabyte.com/nl/Motherboard/X570-AORUS-ELITE-rev-10/support#support-manual

You can find the settings under settings > IO ports.

Oh I misunderstood that setting, I thought it was just for the initial display. Thank you, but if that’s it, then it’s already set correctly to the correct slot by default.

Thank you, this seems to have worked! I appreciate it very much =)


I never saw it written anywhere so here’s the exact steps I took, for future people:

List the cards to have a look.

ls /dev/dri
by-path  card0  card1  renderD128  renderD129

Find which device is which card:

ls -l /dev/dri/by-path/
total 0
lrwxrwxrwx 1 root root  8 Jun 27 16:07 pci-0000:04:00.0-card -> ../card1
lrwxrwxrwx 1 root root  8 Jun 27 16:07 pci-0000:04:00.0-platform-simple-framebuffer.0-card -> ../card0
lrwxrwxrwx 1 root root 13 Jun 27 16:07 pci-0000:04:00.0-render -> ../renderD128
lrwxrwxrwx 1 root root  8 Jun 27 16:07 pci-0000:0b:00.0-card -> ../card0
lrwxrwxrwx 1 root root 13 Jun 27 16:07 pci-0000:0b:00.0-render -> ../renderD129

So, pci-0000:04:00.0-card -> ../card1 and pci-0000:0b:00.0-card -> ../card0.

We confirm which one is which with lspci again:

❯ lspci -nn | rg -S vga
04:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev e7)
0b:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6950 XT] [1002:73a5] (rev c0)

Radeon RX 6950 XT0b:00.0card0 needs to be first (why isn’t it already?: A mystery).

So then I added

KWIN_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1

to /etc/environment and now glxinfo | rg "OpenGL vendor|OpenGL renderer" is correct and the wrong gpu fans ain’t spinning after login - happy days.

2 Likes

When i said put it in the first slot this is what i meant. Was it in the 16X slot? I didn’t know if you had the RX 580 in the first slot 16x or the other slot which is less. But i see you have found a way to set it using an environmental variable. :+1:

1 Like

Ah, I see, sorry I misread! And, I guess I should have clarified which slots they were in.

It was already in the first slot, yes, and I didn’t wanna swap it to the weaker one =)

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.