misyltoad / d9vk

A Direct3D9 to Vulkan layer using the DXVK backend. [Upstreamed to DXVK]
https://github.com/doitsujin/dxvk
zlib License
836 stars 42 forks source link

The Witcher 2 doesn't start when `PROTON_USE_D9VK=1 %command%` is set #468

Closed jqadev closed 4 years ago

jqadev commented 4 years ago

Software information

The game doesn't start when PROTON_USE_D9VK=1 %command% is set. Without this command it works.

To reproduce this issue the config files need to be copied like below to run the launcher:

cp -r ~/.steam/steam/steamapps/common/the\ witcher\ 2/bin/config/* ~/.steam/steam/steamapps/compatdata/20920/pfx/drive_c/users/steamuser/My\ Documents/Witcher\ 2/Config/

I already reported the issue with not starting launcher without above workaround here https://github.com/ValveSoftware/Proton/issues/2309#issuecomment-560487551

System information

Log files

K0bin commented 4 years ago

Please post the actual D9VK logs instead of that steam log.

misyltoad commented 4 years ago

d3d9.zip

Please try with this dll and provide logs if it doesn't work.

jqadev commented 4 years ago

@Joshua-Ashton What I did:

  1. worked around the launcher issue
    cp -r ~/.steam/steam/steamapps/common/the\ witcher\ 2/bin/config/* ~/.steam/steam/steamapps/compatdata/20920/pfx/drive_c/users/steamuser/My\ Documents/Witcher\ 2/Config/
  2. extracted and copied d3d9.dll file to: ~/.steam/steam/steamapps/common/the\ witcher\ 2 (here is the Launcher.exe file) ~/.steam/steam/steamapps/common/the\ witcher\ 2/bin (here is the witcher2.exe file)
  3. set the launch options: PROTON_LOG=1 WINEDLLOVERRIDES="d3d9=n" %command%

The game starts now but there is only a black screen. Here is the log file: steam-20920.log

misyltoad commented 4 years ago

Looks like it might be some form of setup issue on your end if you're getting that...

Can you try with the latest from here? https://git.froggi.es/joshua/d9vk/-/jobs and if that doesn't work try adding a dxvk.conf with d3d9.deferSurfaceCreation = True?

jqadev commented 4 years ago

When I tested using 6ab4ba92 there appeared the error: Screenshot from 2019-12-07 02-16-54 Here is the log file: steam-20920.log

As a next test I created dxvk.conf file in the directory ~/.steam/steam/steamapps/common/the\ witcher\ 2/bin (here is the witcher2.exe file):

[witcher2.exe]
d3d9.deferSurfaceCreation = True

After that when I launched the game the error from the attached screenshot didn't appear. There is still black screen but the sound is playing. Here is the log file: steam-20920-dxvk-conf.log

NerosTie commented 4 years ago

It's an issue with the configuration files.

Do that:

Before first launch you need to cp -r ~/.steam/steam/steamapps/common/the\ witcher\ 2/bin/config/* ~/.steam/steam/steamapps/compatdata/20920/pfx/drive_c/users/steamuser/My\ Documents/Witcher\ 2/Config/ or else the game simply crashes on launch. You only need to do this once.

https://www.protondb.com/app/20920

Tested on my own with #1011 and it works very well. It's not a d9vk's bug.

jqadev commented 4 years ago

@NerosTie please read my previous comments. I already did it. The game works for me but only when D9VK is not used.

NerosTie commented 4 years ago

Sorry, I missed this part.

But it works for me with d9vk activated. I don't understand why it doesn't work for you...

(you should update your Nvidia driver btw, 435.21 is a little bit old now)

jqadev commented 4 years ago

@NerosTie you are right. It's not the D9VK bug vulkaninfo output contains:

WARNING: [Loader Message] Code 0 : loader_icd_scan: Can not find 'ICD' object in ICD JSON file /usr/share/vulkan/icd.d/nvidia_layers.json.  Skipping ICD JSON
/build/vulkan-tools-IZAxVX/vulkan-tools-1.1.114.0+dfsg1/vulkaninfo/vulkaninfo.c:1528: failed with VK_ERROR_INITIALIZATION_FAILED

Here is the full output: vulkaninfo.txt

@Joshua-Ashton the output from the vulkaninfo should be required in the bug report

jqadev commented 4 years ago

@Joshua-Ashton thank you for your time and help. Should this issue be closed? If yes, please do it.

jqadev commented 4 years ago

I found the solution here https://github.com/ValveSoftware/Dota-Underlords/issues/1#issuecomment-515776293 It is enough to run sudo vulkaninfo instead of vulkaninfo before running games and games using DXVK/D9VK start working. vulkaninfo is not installed by default on Ubuntu so I needed to install it using apt install vulkan-utils.

NerosTie commented 4 years ago

Uh? Where do you put that? I don't think you can do that with Steam.