HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.94k stars 202 forks source link

Diablo IV - FPS drops after a while #1588

Open marco-kretz opened 1 year ago

marco-kretz commented 1 year ago

Hey there,

I played D4 the last fews days and I noticed a significant drop in FPS after playing for a while. Checking VRAM usage with radeontop tells me that VRAM is maxed out and hovers around 98%-101%. FPS when starting the game is fine at around 120fps but after playing for a while, visiting multiple different places, FPS drops start to appear (~20-40fps) to a grade where the game is no longer playable. Restarting the game "resets" the problem.

It does not seem to be Radeon-specific. Another user on Reddit with an NVIDIA card reported the same problem and that's why I thought it maybe is caused by vkd3d.

Software information

Diablo IV via Lutris High settings | Medium settings / VSync On|Off / FSR On

System information

oryschakj-aero commented 6 months ago

PROTON_HIDE_NVIDIA_GPU=1 %command%

Does this fix work on the Lutris installation as well? Since Lutris is using wine, not proton...

Yes; just select a Proton version in the "Wine launcher" dropdown in the Wine runner options

mercifulboss commented 6 months ago

I got no VRAM leak with this launch option: PROTON_HIDE_NVIDIA_GPU=1 %command%

I can confirm, this seems to resolve both - the low quality textures popping in after 'porting to a new location and the performance drop.

Driver Version: 535.146.02 RTX 3070ti

It seems to resolve frame-rate issues MOSTLY. Still get decreased FPS after porting to a new location and loss of ground texture after some time

deathxxx123 commented 6 months ago

I got no VRAM leak with this launch option: PROTON_HIDE_NVIDIA_GPU=1 %command%

I can confirm, this seems to resolve both - the low quality textures popping in after 'porting to a new location and the performance drop. Driver Version: 535.146.02 RTX 3070ti

It seems to resolve frame-rate issues MOSTLY. Still get decreased FPS after porting to a new location and loss of ground texture after some time

I fix texture with slide to lower texture quality in options, or just change to low, then back to high and texture is fixed until next bug. Also lowest quality texture does not bug over time.

JesusHernandezFlores commented 5 months ago

saw that there was still an update on this 3 weeks ago. Wanted to ask if this is just generally an nvidia issue or if radeon gpus still suffer from this? Currently on a 3080Ti but wouldn't mind switching over to an amd card if it means no issues.

Diablo 4 is one of my main games and literally the only one I play with my sibling so it would be nice to have a good experience overall lol. Using the PROTON_HIDE_NVIDIA_GPU=1 did not work for me. Currently on driver 550 if that helps

XapaJIaMnu commented 5 months ago

Try disabling dlss.

JesusHernandezFlores commented 5 months ago

Try disabling dlss.

Just checked but I don't use it to begin with :/

sir-wallaby commented 5 months ago

I got no VRAM leak with this launch option: PROTON_HIDE_NVIDIA_GPU=1 %command%

I can confirm, this seems to resolve both - the low quality textures popping in after 'porting to a new location and the performance drop.

Driver Version: 535.146.02 RTX 3070ti

This does not seem to apply to Wayland. I still get VRAM related crashes and freezing when using this launch option on Wayland. However, when I run the game on X11, everything works properly as long as I use 'PROTON_HIDE_NVIDIA_GPU=1'

marco-kretz commented 5 months ago

Me is again. Now for Nvidia cards we may have a fix or workaround. I got no VRAM leak with this launch option: PROTON_HIDE_NVIDIA_GPU=1 %command% I don't know why this is working, but now VRAM never reach 8GB, but stay around 6.8 / 7.4GB depends of area. I play like 2 hours with this option and teleport to like 30 areas and VRAM usage is stable.

And please, other guis with Nvidia cards, try this to see if this is working only for me. Driver i use is: 545.29.02 Steam client Beta Pop!_OS 22.04

Can confirm this works. Playing for several hours with high textures and not a single crash. Will test on Wayland when 555 gets stable. . I'm using Lutris + latest Proton9 beta.

dnotq commented 5 months ago

I am having the same texture problem as @burghoffdavid posted on June 20, 2023. It started when I changed from a Radeon RX-6650-XT to an nvidia RTX-4060-TI. The details of it all get very long, but I'll try to summarize for the sake of brevity.

System: Ryzen T.R. Pro 3945WX 12-core nVidia RTX-4060-TI Kubuntu 22.04 LTS KDE 5.24.7, X11 nVidia driver 535.183.01 Lutris for launching BattleNet / running D4

Runner Options -> Wine version are pretty much everything mentioned here so far: wine-ge, ge-proton, proton (experimental), lutris-ge-proton8, system (9), UMU-proton-9, and more.

The RX-6650-XT worked fine for 100+ hours of D4 (beta through about Season 2, IIRC), and when D4 first came out I seem to recall needing to set VKD3D down to V2.8 to get it to launch. I'm using Lutris and pretty much made that one change and never had further problems. With the 6650-XT, when D4 launched I would always get a pop-up box saying "unknown video card", click "ok" and all seemed to work fine.

When I installed my 4060-TI, the Lutris settings also updated (I don't remember what prompted that, maybe installing the nvidia drivers prompted some update), and I didn't pay much attention to it. There was no more "unknown video card" popup with the 4060-TI though, and the game seemed to start quicker.

I am a very tolerant gamer, and I just accepted the stuttering until a friend pointed it out. I also started to notice the flat gray texture would cover the ground after opening the map or using a waypoint. I played another 100+ hours until finally deciding to try and fix the problem.

Absolutely nothing in the D4 video settings helped. I spent 3+ hours the other day systematically going through every single video setting one at a time, playing, testing, etc.. I also removed the high-res assets from the game install options to force low-res textures. Nothing helped keep the ash-mud (what I call it) flat texture problem from showing up.

Not sure why it took me so long, but I finally remembered the Lutris settings, so I started adjusting those. I tried all the Wine versions, but that did not effect much, and the texture problem still remained.

THE FIX: change VKD3D back to v2.8. After that I could use the high-res textures and adjust the video settings in D4 to get a solid 60 FPS. After a few 4+ hour sessions I have not had any problems and I can finally enjoy some smooth game play and decent graphics.

I systematically selected every version of VKD3D from v2.12 down to v2.8. EVERY version above v2.8 causes the texture problem to reappear, almost immediately upon loading the first area.

My currently working settings are: wine-ge-8-26-x86_64 (default), DXVK v2.3.1 (default), VKD3D v2.8, D3D Extras v2 (default), DXVK NVAPI v0.6.4 (default). I can also change the Wine version to any of the other options, and as long as VKD3D is set to v2.8, it works.

I did try a manual install of the nVidia drivers to the latest v550, but D4 would crash after a short time (minutes). I went back to the LTS installed driver.

In my frustration I did also buy a Radeon RX-7700-XT, but that just ended in misery. D4 literally took 80 seconds to display the "BLIZZARD" splash screen, and the game would crash within minutes. It also did not identify the video card, saying it was "AMD Unknown GFX1101". A friend running the RX-7700-S on a Framework-16 is also having crashing problems with D4. Seems the 7700 is too new to be stable?

I did make a lot of screen shots of the texture problem, and one of them (below), shows the texture as it is loading / being applied. It looks like maybe it is supposed to be a fog or particle affect, but some shader has gone wrong... IDK? But any time I would use a waypoint, when the new location loaded the normal ground was visible, then the ash-mud will appear on top.

d4_flat_11

eszlari commented 1 month ago

In my frustration I did also buy a Radeon RX-7700-XT, but that just ended in misery. D4 literally took 80 seconds to display the "BLIZZARD" splash screen, and the game would crash within minutes. It also did not identify the video card, saying it was "AMD Unknown GFX1101". A friend running the RX-7700-S on a Framework-16 is also having crashing problems with D4. Seems the 7700 is too new to be stable?

Under Linux, AMD drivers are part of the kernel & Mesa. Your system (Kubuntu 22.04 LTS) is too old and doesn't include support for these newer cards. You will need to update you system.

dnotq commented 1 month ago

Under Linux, AMD drivers are part of the kernel & Mesa. Your system (Kubuntu 22.04 LTS) is too old and doesn't include support for these newer cards. You will need to update you system.

Since I last posted, 24.04 LTS was released (Kernel 6.8.0-40-generic (64-bit)), which is what I am running now. I'm still running the nVidia RTX-4060-TI. The nVidia drivers continue to be the same:

$ nvidia-detector
nvidia-driver-550

But nvidia-settings indicates: Driver: 535.183.01, NVML: 12.535.183.01. Not sure what to make of that.

At any rate, a few nights ago I decided to try my luck with VKD3D version 2.13, and it seemed better, but as soon as I opened the map or used a waypoint, the flat texture / mud problem returned.

Any version of VKD3D above 2.8 continues to cause this problem. I tried some of the other Wine versions as well, but that was met with various levels of the game just not running, or crashing out. The most stable Wine version for me is: System (9.0 (Ubuntu 9.0~repack-4build3))

The game does seem to run better with the newer versions of VKD3D, so it is currently a trade-off: flat mud ground all the time but good game play, or nice ground textures but not so great frame rates and tearing.

darksidewalker commented 1 month ago

After some more testing I figured out a stable setup without any issues:

  1. bazzite os (fedora kde, fresh install)
  2. Latest GE-Proton 9-13/14/15
  3. NVIDIA Driver 560.35.03
  4. (optional) force main GPU in Lutris system options -> display -> GPU for battle.net
  5. (optional) extra environment variable for start: VKD3D_CONFIG = dxr
  6. Get GPU max memory glxinfo | grep -E -i 'device|memory'
  7. place a config-file /home/USERNAME/Games/battlenet/drive_c/Program Files (x86)/Diablo IV/dxvk.conf
    dxgi.maxDeviceMemory=16376
    dxgi.maxSharedMemory=16376
    [Diablo IV.exe] dxvk.maxChunkSize = 4

No stutters. No missing textures. DLSS working, NVIDIA reflex working. Gameversion Diablo 4 - 2.0.3.59036

fronald commented 1 week ago

After some more testing I figured out a stable setup without any issues:

1. bazzite os (fedora kde, fresh install)

2. Latest GE-Proton 9-13/14/15

3. NVIDIA Driver 560.35.03

4. (optional) force main GPU in Lutris system options -> display -> GPU for battle.net

5. (optional) extra environment variable for start: VKD3D_CONFIG = dxr

6. Get GPU max memory `glxinfo | grep -E -i 'device|memory'`

7. place a config-file `/home/USERNAME/Games/battlenet/drive_c/Program Files (x86)/Diablo IV/dxvk.conf`
dxgi.maxDeviceMemory=16376
dxgi.maxSharedMemory=16376
[Diablo IV.exe] dxvk.maxChunkSize = 4

No stutters. No missing textures. DLSS working, NVIDIA reflex working. Gameversion Diablo 4 - 2.0.3.59036

Same problem. It just takes longer to occur.

Fedora 40, Lutris and GE Proton 9-20

joost00719 commented 4 hours ago

I have the exact same problem with an rtx 3070 on Windows. I guess it's just that VRAM is full, and it flows over to regular RAM. Probs not too much to do with this project, but more with the game itself.