You are not logged in.

#1 2022-05-10 06:22:38

fignewton
Member
Registered: 2022-05-10
Posts: 4

Dual AMD graphics cards with diffrent drivers - very low FPS

Good evening.

I have owned an AMD/ATI Radeon HD 5450 for several years now. Recently, I acquired a Radeon RX 550. Originally, my intention was to replace the HD 5450 with the RX 550, but I forgot to buy an HDMI/VGA adapter, so I figured to use use the RX 550 to do all the rendering job and keep the HD 5450 basically just as a VGA interface until I buy a new monitor. So I went and plugged the RX 550 in the secondary PCIe slot and kept the HD 5450 in the primary PCIe slot. Now here's where the trouble started...

The first thing I noticed is that the usual boot output (systemd starting services, etc) were not showing. I got video until the KDE splash screen started. After the splash screen was gone, I noticed that the compositor was gone (which is normal, accordingly to the Wiki and, honestly, I don't really care about it), but I was getting very low frame rates for any DE related action (hover on buttons, minimize/maximize windows, etc). I figured it was due to the GPUs not being properly configured, yet in any app, I would get 60 FPS without a problem; like, playing HD videos on Firefox at normal frame rates, JS animations would be rendered without any loss of performance and so on. The only thing where I was getting a disastrous performance in, was my desktop environment. I think it's also worth mentioning that if I enabled the compositor, I would get 1 FPS in activities such as typing, no matter what program it was in.

I read the PRIME article in the Arch Wiki and followed the instructions, being the output for the list of providers the following:

xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x55 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 5 outputs: 2 associated providers: 1 name:AMD Radeon RX 550 / 550 Series @ pci:0000:23:00.0
Provider 1: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 3 associated providers: 1 name:ATI Radeon HD 5450 @ pci:0000:2d:00.0

In the example of the Wiki, the integrated graphics were listed as provider #0 and the discrete graphics as provider #1, in my case it was the opposite (probably because none of them is integrated).  So I tried to run the command to leave provider #0 as provider and provider #1 as sink, since I only would need it for displaying the rendered content. So I tried to run this command, getting the following error message:

xrandr --setprovideroffloadsink 0x55 0x7b

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:  0x55
  Serial number of failed request:  16
  Current serial number in output stream:  17

Anyway, running glxinfo would tell me that the renderer being used was the RX 550, so I guessed the HD 5450 was being used as sink?

glxinfo | grep "OpenGL renderer"

OpenGL renderer string: AMD Radeon RX 550 / 550 Series (polaris12, LLVM 13.0.1, DRM 3.44, 5.17.5-arch1-1)

So, basically, the problem I'm facing now is that I have very slow frame rates whenever I'm using KDE. Also, glxgears runs at 1 FPS (with or without DRI_PRIME=1) with both cards in use, but runs at 60 FPS with only the HD 5450.

Here's my specs:

  • CPU: AMD Ryzen 5600X

  • Motherboard: MSI X570 Gaming Plus

  • GPU1: Radeon/ATI HD 5450 (xf86-video-ati drivers)

  • GPU2: Radeon RX 550 (xf86-video-amdgpu drivers)

  • Linux: archlinux 5.17.5-arch1-1

  • OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.0.3

Any suggestion or help would be highly appreciated.

Offline

#2 2022-05-11 01:36:57

jonno2002
Member
Registered: 2016-11-21
Posts: 430

Re: Dual AMD graphics cards with diffrent drivers - very low FPS

im no expert on this but i think

xrandr --setprovideroffloadsink 0x55 0x7b

should be

xrandr --setprovideroffloadsink 0 1

Offline

#3 2022-05-11 05:50:25

seth
Member
Registered: 2012-09-03
Posts: 33,585

Re: Dual AMD graphics cards with diffrent drivers - very low FPS

https://wiki.archlinux.org/title/PRIME#Reverse_PRIME
See the blue note.

Try to use the modesetting driver and export LIBGL_DRI3_DISABLE=1 to glxgears.
If that helps, disable it to the session.
Disabling DRI3 to the server will require you to redirect the outputs manually - otherwise it's currently done automatically.

Offline

#4 2022-05-12 09:18:08

fignewton
Member
Registered: 2022-05-10
Posts: 4

Re: Dual AMD graphics cards with diffrent drivers - very low FPS

jonno2002 wrote:

im no expert on this but i think

xrandr --setprovideroffloadsink 0x55 0x7b

should be

xrandr --setprovideroffloadsink 0 1

You can use either the provider number, ID or name, as far as I read.

Offline

#5 2022-05-12 09:36:46

fignewton
Member
Registered: 2022-05-10
Posts: 4

Re: Dual AMD graphics cards with diffrent drivers - very low FPS

seth wrote:

https://wiki.archlinux.org/title/PRIME#Reverse_PRIME
See the blue note.

Try to use the modesetting driver and export LIBGL_DRI3_DISABLE=1 to glxgears.
If that helps, disable it to the session.
Disabling DRI3 to the server will require you to redirect the outputs manually - otherwise it's currently done automatically.

Thanks for your answer. I bought an HDMI-to-VGA adapter and it turned out it wasn't any trouble with PRIME. For some reason, the Radeon RX550 is unable to recognize my monitor. When using both GPUs, I found it pretty strange that all the windows were being rendered in the minimum size possible, but I just resized them and continued normally. When I removed the HD 5450 and used the RX550 only, it started using a 480p resolution, which I found pretty weird. So, following the standard troubleshooting for any X-related problem, I checked X.log and ran xrandr. That's how I found out that the GPU was failing to read the monitor's EDID. I thought it might have been because of a defective/incompatible adapter, so I tried with the same monitor on my laptop and it worked fine, same GPU and TV connected via HDMI and/or VGA with the same adapter and both times it worked flawlessly. Even old GPU+Adapter worked fine. So, monitor works fine, adapter works fine and both GPUs work fine. So I figured that it was just that my monitor is incompatible with my new GPU.
Being in such a particular situation, I exported the monitor's EDID using my old GPU, set in the grub, following the wiki's instructions and I got 1080p resolution!!!... for 5 seconds, then the GPU stopped working (literally turned off) while the rest of the system kept working. Later this evening I had to put the old GPU back in and forgot to remove the EDID from the grub settings and, after a few minutes, started experiencing similar random GPU shut downs.. So I'm guessing I messed something up with that EDID.. Also, the wiki mentions something about loading the EDID in the initramfs otherwise some problems may occur, but it doesn't explain how, in particular, so I will be spending the next few hours testing if that gets it working or not.. But since that is a whole different matter, I guess it should go in a separate topic.
Anyway, wrote it here just as an update. If I am unable of setting the EDID up, you'll be hearing from me again soon tongue

PS: I'm not sure if I should close this topic or not, since the cause of the problem is not related to my original suspicions.

Offline

#6 2022-05-12 11:56:47

seth
Member
Registered: 2012-09-03
Posts: 33,585

Re: Dual AMD graphics cards with diffrent drivers - very low FPS

for 5 seconds, then the GPU stopped working (literally turned off) while the rest of the system kept working

Signal loss? The entire thing very much indeed points towards the adapter and/or cable.

Offline

#7 2022-05-13 06:14:34

fignewton
Member
Registered: 2022-05-10
Posts: 4

Re: Dual AMD graphics cards with diffrent drivers - very low FPS

seth wrote:

for 5 seconds, then the GPU stopped working (literally turned off) while the rest of the system kept working

Signal loss? The entire thing very much indeed points towards the adapter and/or cable.

I've been testing the adapter and it worked fine all day. Radeon HD 5450 + HDMI adapter worked flawlessly for hours at 1080p, Radeon RX 550 worked flawlessly for around 1 hour at 480p. Although, none of the cards was able to read the EDID via the adapter (no idea why the HD 5450 defaulted to 1080p while the RX 550 defaulted to 480p, even in the BIOS screen). Here's a list of things I tried today:

  • Downloaded the kernel and compiled the included EDIDs

  • Copied the 1080p EDID to /usr/lib/firmware/edid

  • Added the EDID to the FILES() section of mkinitcpio.conf

  • Added the EDID to the grub.cfg file

  • HD 5450 + HDMI adapter: worked fine at 1080p

  • RX 550 + HDMI adapter: worked fine at 480p

  • HD 5450 + HDMI adapter + custom EDID: experienced some random weirdness after a couple of minutes of normal use, like the monitor would turn off and say "no signal", then turn on when I moved the mouse or pressed a key, then turn back off after 1 second.

  • RX 550 + HDMI adapter + custom EDID: worked fine for a period of time from 5 to 40 seconds then the monitor turned off (no signal message), all the programs running stopped (I know this because I was running a program which was redirecting its output to a file and it was incomplete), and both mouse and keyboard were unresponsive. Only way to get video was restarting. A couple of times the GPU fan stopped after the crash, even though this GPU does not have the functionality to regulate the fan speed, it should always be 100%

  • RX 550 + HDMI adapter + custom EDID + nomodset: same as before

  • There's no report of crash or error in Xorg.log nor dmesg

Offline

Board footer

Powered by FluxBB