dxvk-nvapi: DLSS Can't Be Enabled in Watch Dogs: Legion

Watch Dogs Legion has never worked with vkd3d-proton until very recently after some dxil fixes. However, the option for DLSS is grayed out, even though the option for ray tracing is not. Any time I’ve seen this on a DLSS 2.X game it’s been because DXVK-NVAPI wasn’t loaded for one reason or another. However, I’m getting a dxvk-nvapi.log, so it is in fact being loaded.

Log:

---------- 2021-11-14 07:21:26 ----------
NvAPI_QueryInterface 0xad298d3f: Unknown function ID
DXVK-NVAPI v0.4-54-g16d36c7 (WatchDogsLegion.exe)
NVML loaded and initialized successfully
NvAPI Output: \\.\DISPLAY1
NvAPI Output: \\.\DISPLAY2
NvAPI Device: NVIDIA GeForce RTX 3090 (495.44.0)
DXVK_NVAPI_DRIVER_VERSION is set to '49649', reporting driver version 496.49
NvAPI_Initialize: OK
NvAPI_QueryInterface 0x33c7358c: Unknown function ID
NvAPI_QueryInterface 0x593e8644: Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GPU_GetPCIIdentifiers: OK
NvAPI_QueryInterface NvAPI_Mosaic_EnumDisplayGrids: Not implemented method
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK
NvAPI_Initialize: OK
NvAPI_QueryInterface NvAPI_DRS_CreateSession: Not implemented method
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GPU_GetAdapterIdFromPhysicalGpu: OK
NvAPI_QueryInterface 0xf2400ab: Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_QueryInterface 0xa782ea46: Unknown function ID
NvAPI_QueryInterface NvAPI_DRS_FindApplicationByName: Not implemented method
NvAPI_QueryInterface NvAPI_DRS_DestroySession: Not implemented method
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK

Weirdly enough, I’m not getting a dxgi.log.

Distribution: Arch GPU: Nvidia RTX 3090 (EVGA XC3 Ultra) Nvidia Driver: 495.44 Wine Version: lutris-ge-6.21 DXVK-NVAPI version: latest master VKD3D-Proton version: latest master

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 47 (22 by maintainers)

Most upvoted comments

@Tilde88 @gardotd426 Thanks a lot for the investigation and confirmation, I’ve added a note to https://github.com/jp7677/dxvk-nvapi/wiki/Quirks-for-usage-with-DXVK-NVAPI#dlss-2138-through-2140

@sigzegv yeah, nvgx.dll and _nvgx.dll needs to be present as well. I should indeed add a note to the Readme about this for usage with stand-alone Wine.

@gardotd426

Wine+the Nvidia driver is supposed to symlink nvngx.dll and _nvngx.dll into the wineprefix of any prefix where dxvk-nvapi is attempted to be used. I have about 10 games that use DLSS, and that symlink was created automatically on every single one of them.

Obviously, the symlinks are required, so if anyone is ever having issues with enabling DLSS, checking path/to/wineprefix/drive_c/windows/system32 and making sure nvngx.dll an _nvngx.dll are there is one of the first things you should do, but that was never the issue here, this was already discussed much earlier in the thread.

Bare-bones wine-staging-7.0 does not create symlinks to nvngx.dll or _nvngx.dll by itself automatically. You still have to add the symlinks manually in that case. There is no internal mechanic in dxvk-nvapi or the driver to do this.

Wine may also need the patch that adds NVIDIANGX to the registry (UE4 i think require this): https://github.com/ValveSoftware/wine/commit/f15f48074f9fcf0bc183b4addb653a1b998d4d24 https://github.com/lutris/wine/blob/lutris-fshack-6.21-4/lutris-patches/ngx_dll_regkey.mypatch

In other words: If you want to use DLSS in a game/app, you can’t just use default wine/wine-staging and think this works “out-of-the-box”. Lutris and Steam Proton takes does all this for the user. Lutris provided wine versions also have these patches.

Good you got the issue sorted tho 👍

Just to add some information about the previous nvngx discussion, I also needed to add nvngx.dll and _nvngx.dll (+ the native override) to my concerned wineprefix to make DLSS be activable in games

This was never the issue. It was indeed nvcuda, which was set to ??? just as @Tilde88 mentioned.

Wine+the Nvidia driver is supposed to symlink nvngx.dll and _nvngx.dll into the wineprefix of any prefix where dxvk-nvapi is attempted to be used. I have about 10 games that use DLSS, and that symlink was created automatically on every single one of them.

Obviously, the symlinks are required, so if anyone is ever having issues with enabling DLSS, checking path/to/wineprefix/drive_c/windows/system32 and making sure nvngx.dll an _nvngx.dll are there is one of the first things you should do, but that was never the issue here, this was already discussed much earlier in the thread.

Anyway, @jp7677 it was indeed the nvcuda thing. Setting it to builtin allowed DLSS to be enabled. It makes pretty much zero difference, because for some reason this game refuses to use all of my 3090 (and it’s not my CPU, for 1 I have a 5900X the 5900X is only at like 6 or 7% usage). Using DLSS Performance gets me about a 7% increase in framerate while seeing my GPU usage drop to avoid any larger performance gain (same with Balanced and Quality, just with slightly less of a performance “gain”).

That’s obviously not a dxvk-nvapi issue. With DLSS enabled, my GPU will max out at 70% usage, and this is at 1440p. Anyway I’ll move that discussion over to the vkd3d-proton guys, this issue is closed.

The solution is to check winecfg for nvcuda in the libraries overrides list and double-click it and change it to builtin or builtin, then native (or use WINEDLLOVERRIDES, etc).

As liam said in the issue thread @jp7677 linked, this is apparently only an issue in a very narrow range of DLSS versions, so this probably won’t be something that comes up very often, but yeah, this one’s solved, closing.

Just if you want a easy way to triple-check that DLSS actually works

I have DLSS working in Control, Cyberpunk 2077, and Ghostrunner (all of which are non-Steam versions so I’m using wine+dxvk+vkd3d-proton+dxvk-nvapi same as with WD:L). Also in Doom Eternal and Wolfenstein Youngblood on Steam but that’s a bit different as it’s native Vulkan and not DX12

But yeah I know RT has nothing to do with DLSS but if both options are greyed out then it might point to something else being wrong but RT isn’t grayed out, I can enable it in WD:L (it causes the game to crash but that’s a vkd3d-proton thing obvs)

I will check out that demo though as I’ve been meaning to do that anyway, thanks for the link. I’ll throw another install on my secondary / partition that I keep for testing out new releases of Ubuntu/Pop/etc and for debugging and put 470 on it so I don’t have to keep installing 495 -> 470 back and forth.

Here, I’ve built it in a fresh git clone checking out that branch directly (instead of just cd-ing into my dxvk-nvapi directory and running git checkout -b nvidia-drs, which apparently doesn’t work).

---------- 2021-11-17 09:39:14 ----------
NvAPI_QueryInterface 0xad298d3f: Unknown function ID
DXVK-NVAPI v0.5-1-gf2ac737 (WatchDogsLegion.exe)
NVML loaded and initialized successfully
NvAPI Output: \\.\DISPLAY1
NvAPI Output: \\.\DISPLAY2
NvAPI Device: NVIDIA GeForce RTX 3090 (495.44.0)
DXVK_NVAPI_DRIVER_VERSION is set to '49649', reporting driver version 496.49
NvAPI_Initialize: OK
NvAPI_QueryInterface 0x33c7358c: Unknown function ID
NvAPI_QueryInterface 0x593e8644: Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GPU_GetPCIIdentifiers: OK
NvAPI_QueryInterface NvAPI_Mosaic_EnumDisplayGrids: Not implemented method
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK
NvAPI_Initialize: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_DestroySession: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GPU_GetAdapterIdFromPhysicalGpu: OK
NvAPI_QueryInterface 0xf2400ab: Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_CreateSession: OK
NvAPI_QueryInterface 0xa782ea46: Unknown function ID
NvAPI_DRS_FindApplicationByName (C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Watch Dogs Legion\bin\WatchDogsLegion.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY1: OK
NvAPI_DISP_GetDisplayIdByDisplayName \\.\DISPLAY2: OK

WatchDogsLegion_dxgi.log

Sure thing as soon as I get home from these errands I’ll build it and test

On Tue, Nov 16, 2021 at 1:39 PM Jens Peters @.***> wrote:

@gardotd426 https://github.com/gardotd426 Could you try #56 https://github.com/jp7677/dxvk-nvapi/pull/56 ? I really hope this makes no difference, but may be the games expects a certain driver setting.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jp7677/dxvk-nvapi/issues/55#issuecomment-970559828, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5Y3325FCIWNMSBKU2YO33UMKQNJANCNFSM5H7Z3LLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.