vkd3d-proton icon indicating copy to clipboard operation
vkd3d-proton copied to clipboard

Diablo II: Resurrected graphic artefacts on NVidia-495.44 drivers

Open rinaldus opened this issue 3 years ago • 37 comments

I noticed graphic artefacts in Diablo II Resurrected in 2nd act. They appear only with NVidia drivers version 495.44. I rolled back to 470.86, there are no any artefacts. I switched back to new version, they appeared again. I recorded a small video with these artefacts to make you understand what I mean. They appears on 28th second. Is possible to fix this bug? I'll roll back to 470xx drivers and wait for fix.

rinaldus avatar Dec 06 '21 01:12 rinaldus

Without any logs or possibly apitrace (not sure it would run on d3d12 and this game?), it is somewhat hard to pinpoint the problem.

I think the minimum requirements for getting anyone (devs) to look at this, would be some logs...

Generally speaking in the case of weird bugs (on nVidia) i think it is adviced to use the latest "vulkan beta" driver branch from nVidia. Currently 470.62.13 from here: https://developer.nvidia.com/vulkan-driver aswell as the latest GIT of vkd3d.

SveSop avatar Dec 06 '21 11:12 SveSop

or possibly apitrace (not sure it would run on d3d12 and this game?)

Unfortunately apitrace is too broken with Diablo 2 to be useful.

K0bin avatar Dec 06 '21 12:12 K0bin

The newer Vulkan driver branch dev driver doesn't have this issue, so hopefully it's just a temporary driver regression in the stable driver.

aufkrawall avatar Dec 10 '21 13:12 aufkrawall

Looks like DLSS can be used as a workaround.

aufkrawall avatar Dec 11 '21 20:12 aufkrawall

If this is the bug I am thinking it is, it is most likely a Nvidia driver bug (or a game bug triggered by certain driver versions) as it also happens on Windows: https://us.forums.blizzard.com/en/d2r/t/graphical-bugs-in-a2-and-a5/7635

ShadowsFriend avatar Dec 22 '21 04:12 ShadowsFriend

I have same issue with nvidia 495.44 ACT 2 - Dry Hills ACT 4 - River of Flame (the best glitches are there) ACT 5 - Halls of Pain (also the best glitches Here is some: Screenshot from 2021-12-26 11-55-06 Screenshot from 2021-12-26 15-14-35 )

deathxxx123 avatar Dec 27 '21 22:12 deathxxx123

There went that hope: Still broken with 510.39.01 driver.

aufkrawall avatar Jan 11 '22 18:01 aufkrawall

Glad to know it's not just me. Are the new vulkan drivers part of the 510 branch? If so, then that's most unfortunate.

DaRkL3AD3R avatar Jan 23 '22 12:01 DaRkL3AD3R

Glad to know it's not just me. Are the new vulkan drivers part of the 510 branch? If so, then that's most unfortunate.

Does not look like it is. Linux Vulkan beta still at 470 branch it seems as of yesterday... Well, i have not checked to see what vulkan extensions is included in the 510 branch, so it may be that it is "mostly implemented", but would think 510 is not "fully conformant vulkan 1.3". Kind of confusing with the various branches to me 😞

January 25th, 2022 - Windows 473.11, Linux 470.62.22

New:
    Fully conformant Vulkan 1.3 implementation
        Includes full support for Roadmap 2022
    VK_KHR_global_priority

Somewhat readable changelog put together on the Phoronix forums: PhoroniX

SveSop avatar Jan 26 '22 07:01 SveSop

Welp updated to today's 511.65 driver release and vulkaninfo shows this:

Vulkan Instance Version: 1.3.201

I think it's safe to say the real cause of this problem is in their own driver branch change from 470 to 490+. Once we see the Vulkan branch get rebuilt against these new Nvidia driver branches, I bet we'll see the same issues with no other course of action besides staying on old drivers.

DaRkL3AD3R avatar Feb 01 '22 16:02 DaRkL3AD3R

@DaRkL3AD3R You mean 510.47.03? (As the 511.65 driver is a windows version). Probably same "branch" when it comes to vulkan anyway tho.

SveSop avatar Feb 02 '22 11:02 SveSop

I am on Windows myself, where the same issue presents itself.

Scratch all that, still bugged on latest drivers just took a lot to bring it out of hiding.

DaRkL3AD3R avatar Feb 02 '22 17:02 DaRkL3AD3R

Can confirm this happening on nVidia GTX 960, driver 510.60.02.

Frequency of occurrence description in this post is accurate for me too: https://github.com/HansKristian-Work/vkd3d-proton/issues/940#issuecomment-1001790202

StepanDav avatar Jun 05 '22 14:06 StepanDav

Updated to Vulkan Beta drivers 516.48. Still happening. Really stinks.

DaRkL3AD3R avatar Jun 20 '22 18:06 DaRkL3AD3R

yeah i have found this same graphics glitch in both linux mint 20.2 and slackware 15. mint is using nvidia 510.73.03 .

10ked avatar Jul 09 '22 17:07 10ked

oddly enough legacy graphics works ok though.

10ked avatar Jul 09 '22 17:07 10ked

nvidia 515.65.01 nvidia 1050ti latest git vkd3d

It's happening, in some areas.

ManuLinares avatar Sep 07 '22 02:09 ManuLinares

i have also found that nvidia 470.74 and vulkan-sdk-1.2.176.1 does not have these artifacts. this is on slackware 15 64 bit multilib.

10ked avatar Sep 07 '22 03:09 10ked

seems D2R / driver related https://us.forums.blizzard.com/en/d2r/t/black-box-texturesanimations-in-some-acts/6457/23 happends for windows users aswell.

gulafaran avatar Nov 16 '22 18:11 gulafaran

@gulafaran i looked at the said mentioned post and was wondering if the problem was card firmware that gets loaded when windows boots up, some sort of dynamic power scaling problem or maybe a combination of the two. Honestly i enjoyed the game remake but having a graphics layer operating on top of the old game smacks of a cheap corporate "please everyone at once" move and we all know you can only please some of the people some of the time. I think it would have been a better move to just make an updated version without the old game running under it. Seems unstable and complicated and a bit rushed and what do you expect me to think when it is unstable even in windows ? Honestly maybe it would be better just to drop the legacy graphics layer if it would stabilize it. I only hope some one who can do something about this sees this whole thread. Oh and i don't blame nvidia here for the most part after all their drivers work well else where well enough. Also i had less problem running the path of diablo mod graphics so maybe that would have been a better solution, just saying ...

10ked avatar Nov 19 '22 07:11 10ked

FYI - using DLSS appears to mitigate this issue, for those who can utilize it.

vide0hanz avatar Jan 17 '23 21:01 vide0hanz

How do you even get DLSS to work with VKD3D? As soon as I switch to it, the option to use DLSS disappears.

DaRkL3AD3R avatar Jan 19 '23 02:01 DaRkL3AD3R

um i did a bit of searching and it seems a bit more complicated then just "using DLSS" for example i found this link: https://www.reddit.com/r/linux_gaming/comments/tk2ik4/is_dlss_possible_in_wine_staging_not_proton/ and from that one: https://github.com/jp7677/dxvk-nvapi soo it does not seem quite as simple as just that. Yes i shall look a little closer into this and report back but yes this is going to require a little more work and also there is no doubt more skulduggery and we shall have to try to work around it yet again (are you surprised hmm ?)

10ked avatar Jan 21 '23 00:01 10ked

ok i managed to get it working using the above links. dlss will show up in d2 res video options and you will then be able to enable it. I don't know how stable it will be or for how long it will work (i used proton experimental which gets updated a lot). And you may have to repatch the dlls when it updates. you will probably need this: https://github.com/Saancreed/wine-nvml and this: https://github.com/jp7677/dxvk-nvapi and may or may not have to compile wine-nvml depending on the version of your glibc (mine necessitated compilation). Also adjust your sharpness in the video options as well. your mileage may vary depending on your distro (mine is slackware 15) Yeah and if you didn't guess i used steam proton to run it and not plain wine although it is probably quite possible using wine. Still looks like a win and i am sure eventually dlss will be better implemented in the future without such convoluted workarounds (are you listening nvidia and blizzard?)

10ked avatar Jan 21 '23 02:01 10ked

Afaik you do not need wine-nvml for using dlss.

SveSop avatar Jan 21 '23 09:01 SveSop

perhaps that is how some may do it and it may work well enough but based on the recommendations of the dxvk-nvapi link above and i quote: " When available, DXVK-NVAPI uses NVIDIA's NVML management library to query temperature, utilization and others for NVIDIA GPUs. See wine-nvml how to add NVML support to Wine/Proton." so that is how i did it. Now if you have a better idea that is simpler and quicker and perhaps safer by all means please share that with us.

10ked avatar Jan 21 '23 23:01 10ked

https://github.com/jp7677/dxvk-nvapi#proton

All i meant was that you do not NEED wine-nvml to use nvapi for dlss.. it is more of a "addon" to get further nvapi functions. Some benchmarks (eg. Unigine Valley++) show GPU temperature and stuff, and to get that you need wine-nvml.

SveSop avatar Jan 22 '23 10:01 SveSop

I am using a normal wine prefix, not proton (not recommended to use proton for non-steam games for many reasons)

DLSS is possible as long as all the necessary components are where they need to be:

in this case, you need dxvk installed alongside vkd3d-proton to use dxvk's dxgi rather than WINE's. Then ensure nvapi is present in the corresponding system32 and syswow64 directories of the prefix, don't forget to set the override. Then, copy nvngx.dll and _nvngx.dll to the system32 directory from /usr/lib/nvidia/wine.

Per the NVAPI readme:

Wine Wine does not includes DXVK-NVAPI.

Copy nvapi.dll/nvapi64.dll into the syswow64/system32 folder of your x86/x64 Wine prefix. Ensure that Wine uses the native version of nvapi/nvapi64, e.g. with WINEDLLOVERRIDES=nvapi,nvapi64=n. Ensure that DXVK is installed in your x86/x64 Wine prefix. Ensure that Wine uses DXVK's dxgi.dll, e.g. with WINEDLLOVERRIDES=dxgi=n. Set DXVK_ENABLE_NVAPI=1 to disable DXVK's nvapiHack in DXVK. DXVK 1.10 and older does not support DXVK_ENABLE_NVAPI. Disable the nvapiHack in DXVK 1.10 and older with dxgi.nvapiHack = False set in a DXVK configuration file, see dxvk.conf.

@DaRkL3AD3R

all of this said, I don't know if this is an issue within scope for VKD3D-Proton since it definitely seems like an Nvidia driver problem to me. DLSS appears to mitigate the issue on my end without any noticable loss in sharpness. You can achieve a similar result by just lowering the rendered resolution setting but that of course results in a pretty blurry image.

vide0hanz avatar Jan 22 '23 16:01 vide0hanz

well thanks for the heads up for a wine howto @vide0hanz. It can be a little frustrating not having a more standardized howto some times although a bit unclear when it comes to why proton can be a "problem". Also i have a /usr/lib/nvidia directory but no /usr/lib/nvidia/wine, all i get is:
bash-5.1$ ls /usr/lib/nvidia/ 32 egl_dummy_vendor.json glvnd_check libGLX_installcheck.so.0 so you see my setup is not quite the same as yours and yes with slackware 15 64 bit multilib i have nvidia drivers installation support with sbopkg. Also i get my dxvk from: https://github.com/jp7677/dxvk-nvapi as i said above so i don't know how you are getting them yourself although your method may very well work with said source and my libraries are: nvapi64.dll/nvapi.dll not "nvngx.dll and _nvngx.dll". So perhaps a little more clarification and we can get this cleared up a little better.

10ked avatar Jan 22 '23 23:01 10ked

Also looking into vkd3d-proton as well, i get that i didn't use it in my setup

10ked avatar Jan 22 '23 23:01 10ked