5

I'm using fedora 28 because it seems that is the only distro where that detects the rx560x correctly. Nonethe ess, I noticed that the performance when using the discrete GPU is significantly worse than using the integrated one.

My machine configuration is: ACER nitro 5 an515-42, 8gb ram, APU ryzen 2500u with vega 8 integraded graphics card, RX 560X AMD discrete graphics card.

This is the output of the lspci command

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15d0
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Device 15d1
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h 
(Models 00h-0fh) PCIe Dummy Host Bridge
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15d3
00:01.6 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15d3
00:01.7 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15d3
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h 
(Models 00h-0fh) PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15db
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15dc
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller 
(rev 61)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge 
(rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15e8
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15e9
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ea
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15eb
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ec
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ed
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ee
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ef
01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] 
Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] (rev 
c0)
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. 
RTL8411B PCI Express Card Reader (rev 01)
02:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. 
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
03:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless 
Network Adapter (rev 32)
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. 
[AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] 
(rev c4)
04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 
15de
04:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] 
Device 15df
04:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15e0
04:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15e1
04:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Device 15e3
05:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA 
Controller [AHCI mode] (rev 61)

As can be seen by the xrandr --listdevices command, both cards are recognized

Providers: number : 2
Provider 0: id: 0x7a cap: 0xf, Source Output, Sink Output, Source 
Offload, Sink Offload crtcs: 4 outputs: 2 associated providers: 1 
name:modesetting
Provider 1: id: 0x44 cap: 0x5, Source Output, Source Offload crtcs: 5 
outputs: 0 associated providers: 1 name:modesetting

But when running applications using the discrete GPU the performance is slower. One example is running

DRI_PRIME=0 glmark2

That one uses the integraded GPU and I obtained a performance of around 2000 fps, but running:

DRI_PRIME=1 glmark2

Gives me a performance of around 500 fps, that should not be the case becase it is the discrete GPU.

This can be confirmed by the following outputs:

$ DRI_PRIME=0 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: AMD RAVEN (DRM 3.26.0 / 4.18.7- 
200.fc28.x86_64, LLVM 6.0.1)
$ DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: AMD Radeon (TM) RX Graphics (POLARIS11 / DRM 
3.26.0 / 4.18.7-200.fc28.x86_64, LLVM 6.0.1)

I also attach the ouput of the command dmesg | grep amdgpu

[    2.967193] [drm] amdgpu kernel modesetting enabled.
[    2.983335] amdgpu 0000:01:00.0: enabling device (0002 -> 0003)
[    3.049189] amdgpu 0000:01:00.0: VRAM: 4096M 0x000000F400000000 - 
0x000000F4FFFFFFFF (4096M used)
[    3.049190] amdgpu 0000:01:00.0: GTT: 256M 0x0000000000000000 - 
 0x000000000FFFFFFF
 [    3.049332] [drm] amdgpu: 4096M of VRAM memory ready
 [    3.049333] [drm] amdgpu: 4096M of GTT memory ready.
 [    3.140025] [drm:dc_create [amdgpu]] *ERROR* DC: Number of 
 connectors is zero!
 [    3.277785] [drm] Initialized amdgpu 3.26.0 20150101 for 
 0000:01:00.0 on minor 0
 [    3.278060] fb: switching to amdgpudrmfb from EFI VGA
 [    3.278487] amdgpu 0000:04:00.0: VRAM: 1024M 0x000000F400000000 - 
 0x000000F43FFFFFFF (1024M used)
 [    3.278489] amdgpu 0000:04:00.0: GTT: 1024M 0x000000F500000000 - 
 0x000000F53FFFFFFF
 [    3.278533] [drm] amdgpu: 1024M of VRAM memory ready
 [    3.278534] [drm] amdgpu: 3072M of GTT memory ready.
 [    3.468197] amdgpu: [powerplay] dpm has been enabled
 [    3.468480] [drm:construct [amdgpu]] *ERROR* construct: Invalid 
 Connector ObjectID from Adapter Service for connector index:2! type 0 
 expected 3
 [    3.468545] [drm:construct [amdgpu]] *ERROR* construct: Invalid 
 Connector ObjectID from Adapter Service for connector index:3! type 0 
 expected 3
 [    3.525127] fbcon: amdgpudrmfb (fb0) is primary device
 [    3.566614] amdgpu 0000:04:00.0: fb0: amdgpudrmfb frame buffer 
 device
 [    3.572124] amdgpu 0000:04:00.0: ring 0(gfx) uses VM inv eng 4 on 
 hub 0
 [    3.572125] amdgpu 0000:04:00.0: ring 1(comp_1.0.0) uses VM inv 
 eng 5 on hub 0
 [    3.572127] amdgpu 0000:04:00.0: ring 2(comp_1.1.0) uses VM inv 
 eng 6 on hub 0
 [    3.572128] amdgpu 0000:04:00.0: ring 3(comp_1.2.0) uses VM inv 
 eng 7 on hub 0
 [    3.572129] amdgpu 0000:04:00.0: ring 4(comp_1.3.0) uses VM inv 
 eng 8 on hub 0
 [    3.572131] amdgpu 0000:04:00.0: ring 5(comp_1.0.1) uses VM inv 
 eng 9 on hub 0
 [    3.572132] amdgpu 0000:04:00.0: ring 6(comp_1.1.1) uses VM inv 
 eng 10 on hub 0
 [    3.572133] amdgpu 0000:04:00.0: ring 7(comp_1.2.1) uses VM inv 
 eng 11 on hub 0
 [    3.572134] amdgpu 0000:04:00.0: ring 8(comp_1.3.1) uses VM inv 
 eng 12 on hub 0
 [    3.572136] amdgpu 0000:04:00.0: ring 9(kiq_2.1.0) uses VM inv eng 
 13 on hub 0
 [    3.572137] amdgpu 0000:04:00.0: ring 10(sdma0) uses VM inv eng 4 
 on hub 1
 [    3.572138] amdgpu 0000:04:00.0: ring 11(vcn_dec) uses VM inv eng 5 on hub 1
 [    3.572140] amdgpu 0000:04:00.0: ring 12(vcn_enc0) uses VM inv eng 6 on 
hub 1
 [    3.572141] amdgpu 0000:04:00.0: ring 13(vcn_enc1) uses VM inv eng 7 on 
hub 1
[    3.579107] [drm] Initialized amdgpu 3.26.0 20150101 for 0000:04:00.0 
on minor 1
[    5.202665] audit: type=1130 audit(1537458205.475:67): pid=1 uid=0 
auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 
msg='unit=systemd-backlight@backlight:amdgpu_bl1 comm="systemd" 
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   15.013231] amdgpu 0000:01:00.0: GPU pci config reset
[   19.678936] amdgpu: [powerplay] dpm has been enabled
[   26.341565] amdgpu 0000:01:00.0: GPU pci config reset
[   59.533544] amdgpu: [powerplay] dpm has been enabled
[   65.786402] amdgpu 0000:01:00.0: GPU pci config reset
[  167.130594] [drm:generic_reg_wait [amdgpu]] *ERROR* REG_WAIT timeout 
1us * 10 tries - optc1_lock line:628
[  167.130677] WARNING: CPU: 3 PID: 1899 at 
drivers/gpu/drm/amd/amdgpu/../display/dc/dc_helper.c:254 
generic_reg_wait+0xe7/0x160 [amdgpu]
[  167.130704]  snd_hda_codec irqbypass videobuf2_memops crct10dif_pclmul 
btusb videobuf2_v4l2 snd_hda_core btrtl crc32_pclmul btbcm 
videobuf2_common btintel ath snd_hwdep bluetooth snd_seq videodev 
ghash_clmulni_intel snd_seq_device cfg80211 joydev snd_pcm media 
ecdh_generic sp5100_tco snd_timer k10temp i2c_piix4 rtsx_pci_ms rfkill 
snd 
memstick soundcore wmi video pinctrl_amd acer_wireless pcc_cpufreq 
acpi_cpufreq amdkfd amd_iommu_v2 amdgpu chash i2c_algo_bit gpu_sched 
drm_kms_helper rtsx_pci_sdmmc mmc_core ttm crc32c_intel serio_raw drm 
r8169 rtsx_pci mii i2c_hid
[  167.130774] RIP: 0010:generic_reg_wait+0xe7/0x160 [amdgpu]
[  167.130850]  optc1_lock+0xa0/0xb0 [amdgpu]
[  167.130897]  dcn10_pipe_control_lock.part.28+0x4a/0x70 [amdgpu]
[  167.130944]  dcn10_apply_ctx_for_surface+0xee/0x1210 [amdgpu]
[  167.130994]  ? hubbub1_verify_allow_pstate_change_high+0xdd/0x180 
[amdgpu]
[  167.131040]  ? dcn10_verify_allow_pstate_change_high+0x1d/0x240 
[amdgpu]
[  167.131085]  ? dcn10_set_bandwidth+0x275/0x2d0 [amdgpu]
[  167.131129]  dc_commit_state+0x269/0x580 [amdgpu]
[  167.131171]  ? set_freesync_on_streams.part.6+0x4d/0x250 [amdgpu]
[  167.131213]  ? mod_freesync_set_user_enable+0x11f/0x150 [amdgpu]
[  167.131260]  amdgpu_dm_atomic_commit_tail+0x37c/0xd70 [amdgpu]
[  167.131298]  ? amdgpu_bo_pin_restricted+0xd6/0x300 [amdgpu]
[  167.131441]  amdgpu_drm_ioctl+0x49/0x80 [amdgpu]
[  167.493997] [drm:hwss_edp_wait_for_hpd_ready [amdgpu]] *ERROR* 
hwss_edp_wait_for_hpd_ready: wait timed out!
[  992.949753] amdgpu: [powerplay] dpm has been enabled
[  999.815690] amdgpu 0000:01:00.0: GPU pci config reset
[ 1097.603835] amdgpu: [powerplay] dpm has been enabled
[ 1105.675220] amdgpu 0000:01:00.0: GPU pci config reset
[ 1138.629401] amdgpu: [powerplay] dpm has been enabled
[ 1157.490886] amdgpu 0000:01:00.0: GPU pci config reset
[ 1167.629670] amdgpu: [powerplay] dpm has been enabled
[ 1188.641935] amdgpu 0000:01:00.0: GPU pci config reset
[ 1237.003085] amdgpu: [powerplay] dpm has been enabled
[ 1243.811986] amdgpu 0000:01:00.0: GPU pci config reset
[ 1287.684082] amdgpu: [powerplay] dpm has been enabled
[ 1332.291087] amdgpu 0000:01:00.0: GPU pci config reset
[ 1511.066683] amdgpu: [powerplay] dpm has been enabled
[ 1520.167710] amdgpu 0000:01:00.0: GPU pci config reset
[ 1605.023196] amdgpu: [powerplay] dpm has been enabled
[ 1611.134239] amdgpu 0000:01:00.0: GPU pci config reset
[ 1930.739920] amdgpu: [powerplay] dpm has been enabled
[ 2105.711880] amdgpu 0000:01:00.0: GPU pci config reset
[ 2440.536121] amdgpu: [powerplay] dpm has been enabled
[ 2447.470108] amdgpu 0000:01:00.0: GPU pci config reset
[ 2453.329765] amdgpu: [powerplay] dpm has been enabled
[ 2489.324912] amdgpu 0000:01:00.0: GPU pci config reset
[ 3732.604342] amdgpu: [powerplay] dpm has been enabled
[ 3744.199117] amdgpu 0000:01:00.0: GPU pci config reset
[ 3747.717927] amdgpu: [powerplay] dpm has been enabled
[ 3900.960469] amdgpu 0000:01:00.0: GPU pci config reset
[ 4876.333471] amdgpu: [powerplay] dpm has been enabled
[ 4883.356467] amdgpu 0000:01:00.0: GPU pci config reset
[ 5597.531838] amdgpu: [powerplay] dpm has been enabled
[ 5604.423794] amdgpu 0000:01:00.0: GPU pci config reset
[ 5606.860546] amdgpu: [powerplay] dpm has been enabled
[ 5613.824859] amdgpu 0000:01:00.0: GPU pci config reset
[ 5619.323471] amdgpu: [powerplay] dpm has been enabled
[ 5625.588060] amdgpu 0000:01:00.0: GPU pci config reset

Any help regarding this will be highly appreciated!

EDIT: In any new distro that has a kernel version 5.0 and above it has been working, but with a tweak.

For example, if I want to launch DOOM 2016 and use the rx560x card, I need to launch Steam from console in the following way:

DRI_PRIME=1 steam

The DRI_PRIME=1 command tells steam to use the discrete GPU, so when I run DOOM it uses it!

  • what kernel parameters did you use to get fedora to boot without getting cpu soft lock error? the only thing that works for me is pci=noacpi but I kinda need/want acpi xD – Zach Ellis Dec 11 '18 at 15:41
  • This booting parameters worked in any distro that I tested "ivrs_ioapic[4]=00:14.0 ivrs_ioapic[5]=00:00.2" – arevir Dec 12 '18 at 17:30
4

I regard the same issue as you on the Arch Linux (mesa-git, llvm-svn, linux 4.18.12 (even running 4.19.x or mainline 4.20rcx)). Stable linux kernel isn't, I would say, optimized for our gpu yet. Luckily, there is a temporary solution. I tried linux-amd-wip-git (drm-next-4.21-wip) which has the latest amd patches (there are also other kernels which have them like linux-drm-fixes-git (drm-fixes), depends on you which you pick). Many games are unplayable on the stable kernel and most of them run better on the integrated gpu than on the discrete one as you are also saying. linux-amd-wip-git makes perform discrete gpu better than integrated one and I also get e.g. ~30 fps gain on the World Of Warcraft via wine and gallium nine/dxvk. Some games perform even better, every I tried do. We just have to wait for merge of these patches to the stable linux. At the end, at least we know it will be fixed.

EDIT: I just tested the latest 5.0rc7, it works like aforementioned kernels. Seems it will be fixed in the 5.0.

0

@Haxk20, these I haven't tested yet, but which I've tested, each of ran as it should, at least how I expected from them to run. These have been via wine via Gallium nine and DXVK and they've performed always better on RX560X than on Vega 8 for me (from native Linux games, I tested just CS:GO and it performed better on RX560X too). Maybe 70-80% of Windows performance. Skyrim probably doesn't run that good like on Windows, but I think that's understandable, because of this, it isn't native Linux game. Also what is weird is glxgears since it isn't like that on games for me. I get the same results as you, can confirm. There is still something wrong, but at least, it is getting better, update by update.

0

I tried Linux 4.21 patches that were sent to mainline kernel repo and even linux-amd-wip-git and my VEGA 8 still does better then RX560X for me sadly. Same laptop as you have and Terraria runs much much better on VEGA 8 then RX560X on 4.21 and linux-amd-wip-git too. RX560X should run Skyrim at max on 60fps but yet even on linux-amd-wip-git i cannot play on Ultra and i have to run it on high and still cant reach 60fps.

glxgears reports around 7000 fps for VEGA8 and 3500 for RX560X.

@Martin Otto rx560x does indeed preform better in more intensive games but games that are not that hard to run run better on vega8 and by quite lot actually. But i think this is due to single channel RAM

  • @Martin Otto Question is do you have still the RAM that came with the machine or have you upgraded to Dual channel RAM (2 sticks of RAM) ? I think that maybe single channel is limiting our GPU since it doesnt have the bandwitdh it needs since its running in PRIME and thus copies the data to dGPU that compiles it and then the resoult is copied over to iGPU that displays it. If RAM cannot supply the GPU with enough data it cannot preform better then iGPU that has direct access to memory and doesnt need to copy its content. – Haxk20 Feb 25 at 7:28
  • Yes, I still have that one RAM which came with the machine. Planning to upgrade to 16gb, 2x8GB for sure, would never go for single channel. Therefore I'll try to let you know asap when I'll get them. – Martin Otto Mar 14 at 22:34
  • @MartinOtto I have added another 8Gb stick. Got 9000fps in glxgears with VEGA8 and 4000fps wit RX560X. So something is still wrong. But what i see is that glxgears doesnt take 100% GPU usage on dGPU but it does on iGPU. So maybe there is the problem. But Dual channel surely improves CPU and iGPU performance. – Haxk20 Apr 28 at 22:16
  • Hmm. That's weird. I still haven't had a chance to enlarge mine. Thank you for info. Guess we just have to wait for a fix, seems there is nothing we can do about it currently. At least vega's performance improved (understandably), haha. – Martin Otto Apr 30 at 15:34
  • @MartinOtto Indeed. I think unlocking the TDP would help a ton lot. We can cool it since the crazy fans. Also you can run "Nitro Boost" even on Linux with nbfc: forum.manjaro.org/t/… and that helps a lot in games. Acer you should really unlock that TDP on Nitro 5. Like what ? Other OEMs limit it to 25W and they dont have as good cooling as we do and we are running 15W LOL. I may post a bug on bugzilla. But do you have tearing on laptop display when playing some games on top of the screen ? – Haxk20 Apr 30 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.