jp7677 / dxvk-nvapi

Alternative NVAPI implementation on top of DXVK.
MIT License
353 stars 32 forks source link

Enabling DLSS in Baldur's Gate 3 freezes the game #121

Closed urbenlegend closed 1 year ago

urbenlegend commented 1 year ago

Enabling DLSS in Baldur's Gate 3 causes the game to completely freeze up.

Game was launched with PROTON_ENABLE_NVAPI=1 %command%

Arch Linux Kernel 6.2.11 Nvidia 3090 w/ 530.41.03 drivers Proton Experimental Bleeding Edge Ryzen 3900x

jp7677 commented 1 year ago

Thanks for the report, looking at https://github.com/ValveSoftware/Proton/issues/4243#issuecomment-1510927849 DLSS is only broken with the VK renderer but fine with D3D11, correct?

Could you please grap DXVK-NVAPI logs by setting DXVK_NVAPI_LOG_LEVEL=info and DXVK_NVAPI_LOG_PATH=/home/<your user home>/ (see https://github.com/jp7677/dxvk-nvapi#tweaks-debugging-and-troubleshooting) and post those here?

urbenlegend commented 1 year ago

Yes, only happens with the VK renderer. The logs that I created for that comment were already made with those envvars enabled, along with PROTON_LOG=1. I am reattaching it here for convenience: steam-1086940.zip

jp7677 commented 1 year ago

You should find a file called dxvk-nvapi.log in the folder that you specified with DXVK_NVAPI_LOG_PATH. Can you attach that?

urbenlegend commented 1 year ago

Apologies, I thought those logs were the same. Here's the dxvk log: dxvk-nvapi.log

  1. Game was launched with DXVK_NVAPI_LOG_LEVEL=info DXVK_NVAPI_LOG_PATH=/home/user PROTON_ENABLE_NVAPI=1 %command%
  2. Graphics preset was on Ultra
  3. I enabled DLSS Quality and then clicked Apply
  4. Game froze
  5. Force quit game
jp7677 commented 1 year ago

Thanks, the logs do look very normal. I'm just seeing the usual precondition checks, like requesting the adapter LUID and adapter architecture and nothing more. This is expected on a Vulkan game. I don't think dxvk-nvapi is doing something wrong here.

You steam log is unfortunately unreadable (more than 1GB uncompressed). Could you please fetch a steam log with just the following debug channels?

"WINEDEBUG": "+timestamp,+pid,+err,+fixme,+debugstr,+loaddll",

Just enable this by adding this line to your user_settings.py in the Proton folder. May be those will reveal at least a direction.

urbenlegend commented 1 year ago

Well I tried to replicate it today, except Proton Experimental was upgraded to 8.0 and now the game won't even launch with the Vulkan Renderer even when DLSS is disabled. It plays one second of sound from the Larian intro and immediately freezes at a black screen. Perhaps related to the bug causing the regressions with Elden Ring and others?

I then tried using Proton 7.0, but DLSS and Vulkan works great with that version. Seems like the issue might be in some version of Proton Experimental before they rebased to Wine 7.

Not sure how to get the logs now, but I can wait until they iron out the 8.0 regressions and report back again later.

Saancreed commented 1 year ago

I had a look at your previous logs and even after filtering out the SEH spew readable only by Wine wizards, I couldn't tell why dxvk-nvapi could cause the freeze.

I then tried using Proton 7.0, but DLSS and Vulkan works great with that version. Seems like the issue might be in some version of Proton Experimental before they rebased to Wine 7.

Not sure how to get the logs now, but I can wait until they iron out the 8.0 regressions and report back again later.

You could always try again with 7.0 branch of Experimental, couldn't you? If you could verify that it reliably works with 7.0 Stable but freezes with 7.0 Experimental, this could be a basis for starting a bisect.

Some other possibly worthwhile things to try out:

urbenlegend commented 1 year ago

You could always try again with 7.0 branch of Experimental

@jp7677 @Saancreed Ah I didn't see that option before in the Proton Experimental properties, but I did another test with Experimental 7.0 and was able to reproduce the bug. Here are the new logs: steam-1086940.log

urbenlegend commented 1 year ago

Does 7.0-experimental with dxvk-nvapi from 7.0-stable work?

@Saancreed Problem still occurs with Proton Experimental 7.0 bleeding edge and the dxvk-nvapi DLL from Proton 7.0 stable.

jp7677 commented 1 year ago

Could you please also try Proton 8 Experimental and Proton 8 Experimental Bleading Egde to have the full picture?

Saancreed commented 1 year ago

Fwiw I asked around and the black screen when using Vulkan renderer was a known issue, supposedly fixed in the latest 8.0 Experimental:

Fixed Proton 8.0 regressions: Baldur's Gate 3 no longer launches to a black screen in Vulkan mode.

urbenlegend commented 1 year ago

I updated Proton Experimental to the latest release (non-bleeding edge) and everything works! Game boots up properly in Vulkan mode, DLSS works, VRAM leak is gone, fantastic work! Thanks for the great work as always :)

Saancreed commented 1 year ago

Cool, then I suppose this issue can be closed.