Dying Light (2015), performance worse than Windows
Good afternoon, I wanted to report a performance issue in Dying Light, even though it's platinum on protondb. I hope I'm in the right place, as the game uses DX11 and runs with DXvk.
I've been playing Dying Light 1 on Linux (Cachyos) for a few days now, and while the performance is very good in closed areas, when you go outdoors and see the landscape, the fps drops significantly on my 16GB RX 9070 XT. I've been playing for about 10 hours and there have been no crashes or anything strange or graphical glitches, but when you go out into open areas, the fps easily drops from 237 fps, which is my limit, to 100 fps in the worst case, just like that.
It works much better on Windows, and I would like you to investigate the problem if possible, as I don't know if it's a Mesa or Wine/DXVK issue. My GPU should be able to maintain a constant 237 fps and not drop below 200 in this game. I would be very happy if it could be fixed. If you need me to help you with logs or screenshots/videos, let me know.
System information
- Distro CachyOS with KDE plasma 6.5
- Kernel 6.17.4
- GPU: AMD RX 9070 XT 16Gb
- Driver: mesa 25.2.5
- Wine version:
- VKD3D-Proton version: Test on ProtonGE 20 and proton experimental
P.S.: A few days ago, I reported a problem with The Last of Us here:
https://github.com/HansKristian-Work/vkd3d-proton/issues/2671
Maybe it's something similar? I don't know, but I'm leaving it here just in case, since this case is already being reviewed, which is great. Thanks, everyone!
Do i understand correctly the game doesn't go below 200 on Windows but on Linux it can drop to 100?
Can you share a screenshot of a heavy location in the game while running it with DXVK_HUD=full ?
Also a apitrace might be good to have.
Yes, that's right. In Windows, it's much more consistent and doesn't drop below 200 fps. Something I've noticed is that in Linux, when there's a drop in fps, the GPU drops from 99% to 80%, for example. It seems like some kind of bottleneck, or I don't know. If you want, I can try what you say using that variable and share it here later.
Hi! I'm back again. I just got home and recorded the video for you to see. The launch options I'm using are:
DXVK_HUD=full PROTON_ENABLE_WAYLAND=1 PROTON_USE_NTSYNC=1 mangohud game-performance %command%
Notice the drop in fps when he looks away from the "less demanding" area. P.S.: It doesn't matter if I remove Wayland and NTSync, the game works the same.
Video: https://youtu.be/P61XoUPZ5J0
The amount of draw calls seem to vary quite a bit from the high fps to low fps scenes.
Does running with DXVK_CONFIG="d3d11.cachedDynamicResources = a" change anything? Only because you never seem to quite be at 100% GPU usage as you pointed out. What settings do you play with? Resolution and such.
Oh, sorry, I forgot to mention, I play at 1440p with the graphics set to maximum except for Nvidia shadows and motion blur, which are turned off. I'll try the variable you sent me.
It's just CPU-limited due to draw call spam and likely hitting some sort of path that is inefficient in DXVK and can't really be improved either (e.g. binding different vertex buffers on every draw). Not sure where the expectation is coming from that we need to hit exactly 237 FPS in any and all situations when the game clearly has scenes that are much more demanding then others.
@Blisto91 that option is going to do absolutely nothing when the CS thread is already at 100%.
Taking a quick look at an old apitrace I have lying around, it's not hitting the fast path for multi-draw optimization due to some VK_EXT_multi_draw limitations, and it uses a ton of different vertex layouts which causes overhead in pipeline look-up. Neither of those things explain a >50% performance loss (would like to see some evidence that it is indeed that much to begin with), but these are the only things that look problematic at all, and it's not something that can magically get fixed either.
Hi! Adding the variable:
DXVK_CONFIG=“d3d11.cachedDynamicResources = a”
didn't make any noticeable difference. Is it possible to investigate this issue? Since it's a very radical change in performance, I'm about to finish the game and will soon be playing Dying Light 2. I hope that one works better. Also, my CPU is a 5800x3d, which is very good, and Dying Light 1 shouldn't run so badly since it's a game from 2015. Hopefully something can be done to fix it. Thank you for your time!
Dying Light struggled to do 30 FPS on top of the line Intel CPUs when it came out, so there is that.
Again, there's no real issue here, it's just spamming a very high number of draw calls and the game's rendering code isn't written in such a way that it can hit our fast paths.
@doitsujin I see, but then how do you explain that in Windows 11 I get +200 constants and a stable frame time? In most cases at 237 (because I have this fps limit), the thing is that in Windows it's very stable and runs faster, which is what's strange. It doesn't seem like a problem with the game itself, does it? I'm sure you know more than I do, but I'm curious to know why it behaves this way.
DXVK isn't AMD's D3D11 driver for starters.
Not exactly sure I buy the "stable 200+ fps" either since that would be a rather extreme difference, but it's not unexpected that dxvk performs worse.
I mean, feel free to provide us with something to actually work with (be it a savegame of that exact scene if the game allows save sharing, an apitrace or whatever), but there's no universe where we're straight-up going to double performance out of nowhere and I'm not going to waste at least an entire day trying to replicate this just to come to the conclusion that there's probably nothing wrong in the first place.
in Windows 11 I get +200 constants and a stable frame time
That doesn't sound realistic considering that looking one way makes the game submit more than twice as much work to the graphics driver and the GPU.
Hi, I just tested that area (it seems to be one of the most demanding in the game since you can see a large part of the map) on Windows with the same configuration as on Linux, 1440p, everything set to ultra, and these are the results:
https://www.youtube.com/watch?v=y6EyTaZOVsQ
Although it's not 200 fps as I said above (sorry), most of the time I've noticed it reaches 200-237 when playing normally. As you can see, there is still a significant difference in fps and frametime. I don't know if anything can be done or if any optimization is possible, but if not, that's fine. Thank you for taking the time to look into it.
Can you share a save game?
I think I can share the savegame. If you have Ludusavi, these files will appear. Shall I send them to you here?
Yes
The save file you have to load into the game is the campaign (not the DLC), and then select the 100% game. Once you're in the game, you have to go to a tall building like the double tower where there's scaffolding, which is where I tried it, but you can actually test it in any high area.
Apitrace for good measure. https://drive.proton.me/urls/1Y17S9PGZR#jocecoaigP3v
By the way, taking advantage of this thread, I wanted to tell you that I just got to a part of the game where black squares appear in this room. It looks like a graphics glitch. I'm sending you the video I uploaded so you can see it.
https://www.youtube.com/watch?v=EfUx3lna1kI
@rcv11x Upload your save game and make an apitrace please. There's a guide in our wiki.
As it turns out, I can't even install the game for testing purposes because it's unavailable in my country.
As it turns out, I can't even install the game for testing purposes because it's unavailable in my country.
Really? What country are you from? Can you get a legal key outside of Steam?
@doitsujin I'm telling you this because if you want, I can buy you a global key that can be activated in your country, anything to help with the problem.
and @Blisto91 Do I need the new Apitracé right on the problem area, or is the one you sent me earlier sufficient? To be honest, I've never used Apitracé before.
Yes you need to get to the area with the visual issue when making the trace. The one i posted is just from a roof top in Old Town to try and capture a heavy area.
Edit: Link to guide https://github.com/doitsujin/dxvk/wiki/Using-Apitrace. When making a trace with Proton + dxvk you don't have to setup any dll overrides. You can just drop the files next to the exe same as you do in the Windows guide.
@Blisto91 I just followed the guide and put the files d3d8.dll, d3d9.dll, d3d11.dll, dxgi.dll, and dxgitrace.dll where the game's .exe is, but when I start it, the menu runs at 17 fps. Is that normal? I don't know if I've done something wrong. Is there a Discord or chat where I can communicate with you a little faster?
Also, I don't know how to disable dxvk since it starts with me.
It's normal that apitrace slows the game down a lot, the trace will also be multiple gigabytes in size. You don't need to disable dxvk when tracing.
Okay, I think I did it right. I started the game, and just when I was in the bug zone, I closed the game with Alt + F4. Let me know what you think. Cheers. https://mega.nz/file/Yxc3HT7a#0f2EGLogUu_Cep-wbxDAXJM2lbL1OhDV4a_Wpi_ugTM
The guide does say it is preferred to use wined3d, but that isn't necessarily true. We'll maybe look in to giving the guide a small refresh.
Is that okay?