(Potential) Fix for Diablo 4 crashing on Linux under Wayland with Nvidia
If you've noticed Diablo 4 is crashing specifically under Wayland with an Nvidia GPU, it's likely running out of VRAM. When you run out of VRAM on Wayland, it kills the process. (It's more complicated than that, but this explanation is good enough).
Firstly, I want to mention that I'm not 100% on the effectiveness of these fixes. I don't understand DXVK and d3dvk enough to know whether these actually do anything or not. In my anecdotal experience though, they seem to help and others have reported similar results. First lets go to the Diablo IV folder with Steams UI
It'll bring you to the root Diablo IV folder. From here, right click, new, then text file.
Copy paste this into the text file, save it, and name it dxvk.conf.
[Diablo IV.exe] dxgi.maxDeviceMemory = 2048 dxgi.maxSharedMemory = 2048 dxvk.maxChunkSize = 4
By default, this is set to 2 gigabytes, but you'll want to change it to what's right for your system. So if you've got say, 7 gigs of vram, I'd probably set it to 5. Remember that the game isn't the only thing using VRAM, so don't set it to max. The memory chunk setting should be left at 4. To be completely honest, I'm not really sure what this does, but it seemed to help. The memory settings above it get ignored by Diablo IV (on my setup, at least) so I'd try the memory chunk to see if it helps at all.
From what I understand, Diablo IV has a VRAM leak, but it's made even worse by a bug in XWayland, which handles X applications (such as wine/proton running in X11 mode) running on Wayland. So if this still doesn't work for you, I'd look out for Wayland/XWayland updates. Beyond that, I'd try going back to X11. Hope this helps!












