Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] AMD EGPU running extremely slow (Read 1550 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] AMD EGPU running extremely slow

Hi there,
I have an AMD HD 5450 connected to a T61 Thinkpad (with Intel GM965 internal graphics) via an expresscard to an EGPU dock. I installed Artix using the base install. I have a secondary monitor connected via the DVI port. I'm running programs on the second monitor using DRI_PRIME=1 However, the card is performing extremely poorly with the r600 driver that mesa selects for it.

lspci output:
Code: [Select]
lspci
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series]
05:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series]

glxinfo output:
Code: [Select]
DRI_PRIME=1 glxinfo | grep renderer 
    GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_NV_float_buffer,
    GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, GLX_MESA_swap_control,
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: AMD CEDAR (DRM 2.50.0 / 5.14.16-artix1-1, LLVM 12.0.1)

radeontop consistently displays  a "graphics pipe" figure around 65-70%. At startup, VRAM usage is somewhere around 2M, but then erroneously  shoots off the charts when trying to use any application. I did find a thread which suggests this could be a bug with amdgpu-pro drivers on older hardware (https://github.com/fireice-uk/xmr-stak/issues/2162) though I'm not using amdgpu-pro.

I used glxgears to compare (not benchmark) different drivers by using MESA_LOADER_DRIVER_OVERRIDE. r600 gave an average fps of 46, whereas swrast gave an average of 200. When I used LIBGL_DEBUG=verbose, r600 reported a strange error.
Code: [Select]
do_winsys_init: DRM version is 1.6.0 but this driver is only compatible with 2.12.0 (kernel 3.2) or later.
This is odd, because it contradicts my glxinfo output. Why am I getting two different DRM versions? is it possible to get these drivers to play nice?

Re: AMD EGPU running extremely slow

Reply #1
You need at least a GCN1 card to get amdgpu acceleration - a few high-end HD 7000 series were the first ones with GCN cores. I don't think you could get better performance from your card, not with the amdgpu driver anyway. I'm surprised even DRI_PRIME works.

On the DRM error, I had a similar one, but unfortunately I can't remember how I solved it. Then again, it was on a desktop PC with a HD7870 and amdgpu support... The Arch wiki article may be your best chance.

Re: AMD EGPU running extremely slow

Reply #2
You need at least a GCN1 card to get amdgpu acceleration - a few high-end HD 7000 series were the first ones with GCN cores. I don't think you could get better performance from your card, not with the amdgpu driver anyway. I'm surprised even DRI_PRIME works.

On the DRM error, I had a similar one, but unfortunately I can't remember how I solved it. Then again, it was on a desktop PC with a HD7870 and amdgpu support... The Arch wiki article may be your best chance.
Thanks for your answer!  I'll have a look on eBay for a newer AMD card. It looks like the HD 8570 uses GCN1 and is super cheap, so I'll try with that and see how it performs. Thank you, again.

Re: [SOLVED] AMD EGPU running extremely slow

Reply #3
Thanks for your answer!  I'll have a look on eBay for a newer AMD card. It looks like the HD 8570 uses GCN1 and is super cheap, so I'll try with that and see how it performs. Thank you, again.
Hello,
I am using a Radeon RX550 D5 2GB because the equivalent in Nvidia did not work well.
I bought it around 60 euros in November 2020.
It can be found inexpensively on e-abay.

Re: AMD EGPU running extremely slow

Reply #4
Hi all,
I picked up an AMD 8570 cheaply off of ebay and it arrived today. The VRAM issue is fixed, thankfully but the DRM issue isn't, so I'm still not able to use the correct driver.

Here's the lspci entry for the card:
Code: [Select]
VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Oland [Radeon HD 8570 / R5 430 OEM / R7 240/340 / Radeon 520 OEM]
Subsystem: Dell Radeon HD 8570 OEM
Kernel driver in use: amdgpu
Kernel modules: radeon, amdgpu

With the new card, I'm now using the amdgpu kernel module as opposed to radeon.
When trying to run glxgears to test it, I get two DRM errors now, the first one is the same as before, but then I also get:
Code: [Select]
do_winsys_init: DRM version is 3.42.0 but this driver is only compatible with 2.12.0 (kernel 3.2) or later
Any ideas?

Re: AMD EGPU running extremely slow

Reply #5
The do_winsys_init error is strange because 3.42 is later than 2.12.
Perhaps you need to play around the si/cjk kernel command line and module options. Here are mine for comparison:

Code: [Select]
# lspci|grep Radeon
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Venus XT [Radeon HD 8870M / R9 M270X/M370X]
# cat amdgpu.conf
options amdgpu si_support=1
# cat radeon.conf
options radeon si_support=0
options radeon cik_support=0
# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-linux-ck-generic-v3 net.ifnames=0 processor.ignore_ppc=1 mitigations=off intel_iommu=igfx_off amdgpu.dpm=1 radeon.si_support=0 amdgpu.si_support=1 root=/dev/disk/by-label/ROOT rw

/var/log/Xorg.0.log
[ 93862.377] (II) AMDGPU(G0): glamor X acceleration enabled on AMD Radeon HD 8800M Series (VERDE, DRM 3.42.0, 5.14.11-1-ck-generic-v3, LLVM 13.0.0)
[ 93862.377] (II) AMDGPU(G0): glamor detected, initialising EGL layer.
[ 93862.546] (II) AMDGPU(G0): [DRI2]   DRI driver: radeonsi
[ 93862.546] (II) AMDGPU(G0): [DRI2]   VDPAU driver: radeonsi
Also, check if you've got any leftover driver packages that interfere with libgl or libdrm.

 

Re: AMD EGPU running extremely slow

Reply #6
I came back to this and spent a while playing around with Xorg settings, and found that disabling the laptop screen (by only including configuration for the EGPU)  makes it run much faster. There may be a better way to do it but the solution works for me!