protonscr

Performance Problems with DXVK/RADV

protonopen
ValveSoftware/Proton#2407 · opened 2019-03-12 by ripper81 · updated 2019-08-08 · 23 comments · github
Rripper81 2019-03-12 github

Feature Request

I confirm:

  • [x] that I haven't found another request for this feature.
  • [x] that I have checked whether there are updates for my system available that
    contain this feature already.

Description Better radv-driver support

I have recently switched from an NVIDIA GPU to an AMD GPU (Radeon RX 590). While my native Linuxgames are working great with the MESA GL and MESA RADV Drivers, all Games played via proton utilizing dxvk are a complete disaster performance wise. I am using the latest MESA Drivers from oibaf ppa on my kubuntu install in combination with kernel 5.0. I have checked the games on another machine with the same hardware but with an NVIDIA Geforce GTX 1060 and the latest driver. The same games that cause my AMD GPU to produce massive inputlag and stutters in games like Path of exile and Kabounce are running great on the NVIDIA GPU and the same version of proton. I guess there is more optimization needed in proton or the radv driver itself to solve this problem.

LLeopard1907 2019-03-12 github

Can you see DXVK HUD in your games when you put this into launch options?

DXVK_HUD=1 %command%

LLeopard1907 2019-03-12 github

I assume you're probably missing this and simply fallback to wined3d backend. In this state , you won't be able to play any Vulkan only native game also because your setup has missing Vulkan libs.

sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386

Rripper81 2019-03-12 github

Screenshot_20190312_194818

LLeopard1907 2019-03-12 github

Well , your Vulkan setup works.

By stutters, you have to suffer through them until caching shaders process is complete.

Steam has a shader cache sharing system and it works well but you won't benefit from that in this state. Simply majority of AMD users are still on Mesa 18.3 so you can only get shaders from Mesa 19 RX590 users which potentially kills that possibility.

Either use Mesa 18.3 or just play until stutters are gone.

Rripper81 2019-03-12 github

Strange i thought that the RX590 is basically the same GPU then the other RX500 Modells. And i had no idea about the fact that the mesaversion has anything to do with that. Does the same problem apply to users with new NVIDIA GPU's ?

LLeopard1907 2019-03-12 github

They are not same. An RX570 user won't benefit from shader caches of RX590 users.

Driver version is also crucial and same on Nvidia also. I'm on a GTX 1050, with 415.27 drivers i had a fully populated shader cache for Witcher 3 that both i compiled locally and i got from the "swarm". I'm on 418.43 now and i don't get shaders from other GTX 1050 users in the swarm yet since majority of people are moving onto it newly.

Though , DXVK has a solution for this. Universally works for every gpu and driver. DXVK state cache. With that your card can compile all shaders ( assuming it is a full state cache ) locally before encountering them.

You probably have them on your .steam / steamapps/ shadercache directory. Caveat of it , it takes awhile to compile them. So during gameplay you will encounter some stutters.

As a bit weird solution , if you have state cache ; open up the game has it and leave it on main menu for 30 minutes etc. After that , check same directory again for shader caches. You will see shader cache populated.

Ddoitsujin 2019-03-13 github

Path of Exile is known to have an insane number of shaders that have to be compiled, and Nvidia's shader compiler is several times faster than RADV's. Stuttering is to be expected in those titles.

Rripper81 2019-03-13 github

Will there be a way to speed up shadercompiling in future releases of RADV, or will these "Problem" persist for the opensource driver stack ?

Mmagist3r 2019-03-22 github

I upgraded recently from GTX 660 Ti to RX 580 and now experiencing the same problem. With AMDVLK things are even worse than with RADV. I think that it is caused by LLVM, right?

Rripper81 2019-03-22 github

Hey magist3r, seems that i am not alone anymore. I have tested the game Gauntlet with proton. The game is using directx 11 as the native windows api. The cool thing about this game is that you can force it to run with wined3d. I did that and the stuttering was instantly gone. So the problem only occurs if dxvk and vulkan(in my case RADV) are used. When i force it to run with wined3d and therefore using opengl (MESA) the problem does not exist or is at least not visible. As far as i know both drivers (MESA GL and MESA RADV) are utilizing LLVM, so the problem might be something else.
On the other hand the stuttering appears only in "steamplaytitels" all my native linuxgames with vulkan support are performing quiet well with the RADV Driver.

Ddoitsujin 2019-03-22 github

Can one of you go back to an older Proton build and check if the problem is present there as well?

I'm not really sure if everyone here is experiencing an actual problem or just the usual stutter that is inherent to DXVK, but one user reported that it is way worse than it used to be at some point.

Rripper81 2019-03-22 github

Ok ill give it a try with Kabounce and Gauntlet. Path of exile will most likely not work with the older proton builds. By the way the immense stuttering is not present on systems with the newest NVIDIA Drivers. This seems a problem related to the opensource drivers for AMD GPU's.

Ddoitsujin 2019-03-22 github

Thing is, I haven't noticed any increased stutter on my AMD system either (RX 480, Mesa 19.1-git, LLVM 9-git). This is not a general driver issue, and we have to somehow work out what's causing it.

Pparkerlreed 2019-03-22 github

@doitsujin Yeah same here. 480 8GB, 19.1, LLVM 9. GTA V for example runs amazingly.

DXVK overall seems to work great on RADv.

Rripper81 2019-03-22 github

I have switched back to the older protonversion 3.16.4. I got even more stuttering with it. I can't tell if the stuttering has increased because i am new in AMD Land. However in comparison to an NVIDIA System the stuttering is immense when DXVK and RADV are utilized by proton. My Systemspecs are the following: CPU: AMD Ryzen 1600x/RAM: 16GB (@3200 mhz)/ GPU: Saphire Radeon RX 590 Nitro/ OS: Kubuntu 19.04 (Kernel: 5.0, Mesa 19.1, LLVM 8.0.0)

Ddoitsujin 2019-03-22 github

Ok, can you also test those games in regular wine / wine-staging and see if it is any better there?

Mmagist3r 2019-03-22 github

I use regular wine-staging 4.4 with DXVK 1.0.1 and play mostly TW3. On my old 660Ti there was no huge stuttering issues at all, only micro freezes. After upgrade to RX580 and openSUSE Tumbleweed (kernel 5.0, mesa 18.3.4, llvm 7.0.1) I see huge (for 1-2 secs) stuttering on first load and then in fights and so on. After playing some time stuttering mostly disappears.

Yesterday I updated to mesa 19.0.0 - no difference. Maybe it is somehow fixed in mesa or llvm git, but there are no such repos for Tumbleweed unfortunately. I can build form git if it is worth it.

Ddoitsujin 2019-03-26 github

Fedora apparently has been shipping debug builds of Mesa, which can cause extremely long compile times (~10x slower than release builds), see Phoronix. Updated packages should be available already.

@ripper81 If you compiled manually, please make sure to use the release buildtype and to set b_ndebug as explained in the article.

Rripper81 2019-03-26 github

@ripper81 If you compiled manually, please make sure to use the release buildtype and to set b_ndebug as explained in the article.

I am using Kubuntu 19.04. I got my mesadrivers via the oibaf ppa.

Ssteinex 2019-05-28 github

I have the same problem. Switched from an Nvidia GTX 770 to a AMD Vega 64 w/ amdgpu, Mesa 19.0 and stuttering in Path of Exile is immense. I get stutters where the game comes to halt for several seconds.

With nvidia, i didn't have that problem at all.

Rripper81 2019-05-28 github

Hey steinex, POE is an extreme game regarding the amount of shaders that it is using. You should opt in the steam client beta. Valve has redesigned the OpenGL/Vulkan shadermanagement for steam. And please make shure that you have the MESA Vulkandriver installed. POE has allready caused the download of several GB of precompiled Vukan shadercode to my system. The game is running much better on my system right now. It is not the smooth experience you'll get with the nvidiadriver but things seem to get better with the optimizations for proton and the further development of the MESA opensource driver stack.

SShotweb 2019-06-27 github

I think I had this problem with Mesa 19 in Battlefield 1 as well. Changed from a GTX 760 to an RX 480, no problems with Ubuntu 18.04's Mesa 18 (not much of an upgrade either, though). Updated to Mesa 19 and Battlefield 1 became unplayable, graphics would stutter for seconds at a time, all the time. Went back to Mesa 18 and it's good again, it's only stuttering a little in the first 30 seconds. Borderlands 2 worked fine under 19.

Update: The geniuses at Ubuntu has decided to update to Mesa 19 for 18.04, so sure enough this problem returned for me. I then added the Padoka stable PPA to update to 19.1, but same thing. So now it seems like all DXVK games are broken for me (tested with BF1 and Tekken 7).

Update 2: I have now switched to GeckoLinux Rolling (ie. Opensuse Tumbleweed), and for Tekken 7 at least, the problem seems to have decreased significantly, if not completely gone.

LLeopard1907 2019-08-08 github

Launch options

Launch lines