Memory Leak is back, please fix

After crashing a few times both in windows and linux I did some tests on the following hardware:

ryzen 7 3700x
rtx 3080 suprimX 10GB
32 gb ram

This computer ran d4 since the beta with no issues in both windows and linux.

Now to the problem:
after switching areas the game starts to overload the VRAM pretty fast.
In windows it works normally until it simply crashes, often after entering a new area/using a portal.
In linux (which I know very well isn’t officially supported by you guys in blizzard), the game runs for much longer, then the ground textures stops loading and after a while black screen hits.
The bad situation is mitigated by lowering the textures from high to medium, but this isn’t an acceptable solution, the situation got worse with the start of season 4.

One way to reproduce the problem is jumping quite a few times from one waypoint to the other in the map, eventually it crashes or the textures on the ground will become blurry, the highter the texture quality, faster the Vram (and subsequencially ram) becomes full, leading to FPS loss, stutter, lag, low quality textures and crashes.

It looks like D4 is refusing to clean the VRAM from unused data.

Please look into the issue. Thank you.

Update: disabling Resizable Bar in the BIOS helps a lot to mitigate the issue. I hope it helps.

4 Likes

I can confirm this with both nvidia 970 4g and 1060 6g.
32gb ram.
Really annoying.

1 Like

Set a static swap file for the system at 16-24GB. This should alleviate the issue.

-Diablo IV has run out of memory - #103 by DTMAce-1687

What texture setting are you running?
You need at least 8GB for ultra, so for 4 and 6 probably medium or high.

It doesn’t fix anything sadly. The game keeps writing on memory and never bothers clearing the unused files, it’s only a matters of time before graphics glitches starts or simply crashes, we need blizzard to actually work on a fix but the sad part is that they don’t even aknowledge the problem. I see a lot of people complaining as you may notice from this very forums, still we don’t even know if they are working on it. I tried everything windows allows to do and even on linux with much more room for tinkering. Given there is no news from the devs, that no one from the blizzard support even bothered answering or aknowledged the problem, all is left to do is to stop playing the game untill the situation is resolved, if ever. Didn’t mean to take the rant on you, you suggested a workaround and I thank you for that, it’s just frustrating to see such a big company making such huge mistakes both in game design and technical side, now has been a year, patience ran out.

1 Like

Problem is, I don’t see this issue.

It will use a lot of memory, but it does stabilize for me. I can see consistent predictable usage. I only had issues when I had upgraded from an 8GB card to the 16GB 4080S. At that time, I was not even using a swap file at all, I had it disabled. I have 32GB of memory. But when I upgraded, I started getting out of memory errors despite not actually running out of physical ram. It was the virtual memory I was crashing.

So I set a 16GB swap file and no more issues, the usage stabilized and its been fine since. In fact, been playing on my laptop the last couple days (in Canada using Bell DSL here) and while latency is bad due to the bad internet, the game has still be playing fine. On this machine, 32GB of memory, 32GB swap file set, but only running a 3050Ti on an 11th gen i5.

Plays great though outside of occasional network lag spikes, thanks to others using the low speed internet here.

I still never really think of it as a leak but rather bad memory management.

keywords “for me”, not for the majority of us.

Actually I beg to differ.

Otherwise there would be a lot more posts about it. There are some of you having issues, certainly. But not the majority.

Obviously the people having issues are the ones to post, so the majority of posts about the issue is what you see, but considering how many people play this game overall, only a small percentage of players are having enough issues to visit the forum and complain about them.

I get crashes every 20 mins but my vram doesnt appear to overload. When I first start the game it’s at about 10gb total util then increases to a max of 13gb and after that just sorta floats between 12-13gb. This seems like quite high usage considering I’m only playing at 1080p with high (not ultra) textures but I have 16gb vram so there’s still a comfortable cushion there.

Should also add that the crashing for me has never been related to porting either. I did just spend 5mins porting around to different parts of the map constantly just to see if my vram usage would keep increasing but it still seemed to plateau around 13gb max. When I crash it doesnt seem to be related to what I’m doing in game at all. I could be in combat or I could be in town and it’ll just suddenly CTD (or bluescreen sometimes). It’s even crashed when I was afk.

I found a solution for LINUX but not for windows, it consist in creating a file named “dxvk.conf” that contains 2 lines:
dxgi.maxDeviceMemory=8192
dxgi.maxSharedMemory=8192

The objective is to prevent the vram from being used entirely, in my case I have 10gb, so I sat the limit to 8 (8192mb), set your value accordingly.
Assuming you are running it in lutris: file must placed in the battlenet folder and in the diablo 4 folder, it tricks the game into thinking that’s the maximum vram available, else the game keeps asking for more, with this I never saw the vram going over 8.2 gb, all settings maxed in 2k at 90 fps, ray tracing off, and dlss max quality. Hope it works for you as well.

Just found it too for linux, now I can play smoothly with high settings on my gtx 1060 on archlinux.

I think you are the same person who saw my post on reddit lol, glad it worked.