protonscr

DX11 and DX12 for UE4 game are not found when using "newer versions of proton"

protonclosed
ValveSoftware/Proton#4815 · opened 2021-05-04 by Wallby · updated 2022-06-13 · 19 comments · github
3 matching comments, n / p to jump
WWallby 2021-05-04 github

Hello,

I have tried to run a game that I know has been made in UE4. I have tried running it with..
.. Proton Experimental
.. Proton 6.3-3
.. Proton 5.0-10

Only when using Proton 5.0-10 as compatibility tool does it work at all.
The game has an option to pick the graphics API at launch (choosing the default option causes DX12 to be picked on my machine and the other option is for manually selecting DX11).

When using Proton 5.0-10 as compatibility tool, it crashes when DX12 gets picked (I recon this makes sense as this is before DX12 support was in proton from what I understand?).
With DX11 it works, but not great.

With the other two proton builds, I get errors before the game launches at all, which look like "builtin UE4 checks".

afbeelding
afbeelding

To "make sure" that the NVIDIA GPU that is in my laptop is used, I use this script to launch steam..

#! /bin/sh

cd "${0%/*}"

__GLX_VENDOR_LIBRARY_NAME=nvidia
export __GLX_VENDOR_LIBRARY_NAME
eval $1

I think that this has worked in the past (I used to use the flatpak version of steam then, which I no longer do) as I noticed a significant performance difference when using this script for the first time.

Isn't "VKD3D support" built into the current version of Proton Experimental? And shouldn't that allow for DX12 support and (through backwards compatibility) DX11 support? Any ideas what could be going on here?

Kkisak-valve maintainer 2021-05-04 github

Hello @Wallby, the symptoms you've described read more like an issue with the Steam Linux Runtime - Soldier container than an issue with Proton.

Starting with Proton 5.13, Proton is run inside the Steam Linux Runtime - Soldier container environment and Pressure Vessel is what sets that up. Getting this to work as expected with multi-gpu systems has been challenging and you'll want to give https://github.com/ValveSoftware/steam-runtime/blob/master/doc/steamlinuxruntime-known-issues.md#-multiple-gpu-systems a read.

As for what's specifically happening with your system, we're going to need significantly more information to make an educated guess. Please give https://github.com/ValveSoftware/steam-runtime/blob/master/doc/reporting-steamlinuxruntime-bugs.md#essential-information a read and share a Steam Runtime Linux log along with your system information from Steam. Additionally, please add PROTON_LOG=1 %command% to the game's launch options and attach the generated $HOME/steam-$APPID.log to this issue report as a file. (Proton logs compress well if needed.)

Blind guess that trying to run the game with the game's launch options set to __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only %command% makes a difference. https://github.com/ValveSoftware/steam-runtime/issues/312#issuecomment-739441559 is worth a try after that.

WWallby 2021-05-05 github

Hello,

As for what's specifically happening with your system, we're going to need significantly more information to make an educated guess. Please give https://github.com/ValveSoftware/steam-runtime/blob/master/doc/reporting-steamlinuxruntime-bugs.md#essential-information a read and share a Steam Runtime Linux log along with your system information from Steam. Additionally, please add PROTON_LOG=1 %command% to the game's launch options and attach the generated $HOME/steam-$APPID.log to this issue report as a file. (Proton logs compress well if needed.)

So I've first set STEAM_LINUX_RUNTIME_LOG=1 by launching steam "with" STEAM_LINUX_RUNTIME_LOG=1 steam

Here are the "requested logs"..

DX12 DX11
PROTON_LOG=1 %command% steam-1013910-dx12.log, slr-app1013910-s3c418663dbd28e82-dx12.log steam-1013910-dx11.log, slr-app1013910-sa1ba862c25029208-dx11.log

Blind guess that trying to run the game with the game's launch options set to __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only %command% makes a difference. [#312 (comment)](https://github.com/ValveSoftware/steam-runtime/issues/312#issuecomment-739441559) is worth a try after that.

I've tried with the above copy pasted in, as well as..
.. __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia %command% ("to be thorough")

With the "thorough" command, the game runs for DX11 (still very poorly, on a machine that I've done UE4 development on in the past just fine), but not for DX12.

Here is he log for DX12 with the "thorough" command...

DX12 DX11
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia %command% steam-1013910-dx12_2.log, slr-app1013910-sd4e625c99a194370-dx12_2.log
N.A.
WWallby 2021-05-05 github

Trying what was suggested in..

[#312 (comment)](https://github.com/ValveSoftware/steam-runtime/issues/312#issuecomment-739441559)

.. didn't make a difference for me.

Kkisak-valve maintainer 2021-05-05 github

Thanks, there might be a recent regression going in Proton 6.3-3 and Proton Experimental which might explain this on Proton's side instead of Steam Linux Runtime - Soldier (https://github.com/ValveSoftware/Proton/issues/4807 / https://github.com/ValveSoftware/Proton/issues/4808).

If the game behaves better with Proton 5.13-6, that would be a fairly strong indicator this is related to that regression.

Ssmcv 2021-05-05 github

__GLX_VENDOR_LIBRARY_NAME is only expected to make a difference for programs that are using GLX (OpenGL).

By default, recent versions of Proton implement D3D11/D3D12 using Vulkan instead of GLX, for which you want __NV_PRIME_RENDER_OFFLOAD=1 and __VK_LAYER_NV_optimus=NVIDIA_only instead (... or if in doubt, both).

WWallby 2021-05-05 github

@smcv thanks for explaining. The tests I've performed did use both.

LLeopard1907 2021-05-10 github

Fwiw, recently i started to hit this issue on D3D11 and 12 games as well on a Prime system. D3D9 ones are fine since they don't use DXGI.

Solution is using DXVK's DXGI instead of Wine's (default of Proton, soon to be changed)

WINEDLLOVERRIDES=dxgi=n %command%

Ssmcv 2021-05-10 github

This seems more like a Proton issue than a container runtime issue?

WWallby 2021-05-11 github

Fwiw, recently i started to hit this issue on D3D11 and 12 games as well on a Prime system. D3D9 ones are fine since they don't use DXGI.

Solution is using DXVK's DXGI instead of Wine's (default of Proton, soon to be changed)

WINEDLLOVERRIDES=dxgi=n %command%

This worked for me.

RRyuzakiKK 2021-05-28 github

On my side this has been fixed by the latest Proton Experimental. Now UE4 games start even without the workaround WINEDLLOVERRIDES=dxgi=n.

Kkisak-valve maintainer 2021-06-25 github

Hello @Wallby. @RyuzakiKK, please drop the workaround and retest with Proton 6.3-5.

WWallby 2021-06-26 github

Hello @Wallby. @RyuzakiKK, please drop the workaround and retest with Proton 6.3-5.

Tested three games without the workaround w. proton 6.3-5 for which the workaround was required "previously". All worked.

One of these three games has an option to choose DX12/DX11 (i.e. the game of which the screenshots are). The DX12 one crashed, but because of running out of video memory (not because "DX12 is not supported ...").

RRyuzakiKK 2021-06-26 github

Hello @Wallby. @RyuzakiKK, please drop the workaround and retest with Proton 6.3-5.

I tested Life is Strange 2 with Protono 6.3-5 and I confirm that now it works out of the box without the need of workarounds.

Kkisak-valve maintainer 2021-06-26 github

Thanks for retesting, closing.

WWallby 2021-06-27 github

Hello @Wallby. @RyuzakiKK, please drop the workaround and retest with Proton 6.3-5.

I tested Life is Strange 2 with Protono 6.3-5 and I confirm that now it works out of the box without the need of workarounds.

Life is Strange 2 should work regardless (i.e. LiS 2 supports vulkan)

Mmahagr 2021-11-17 github

I'm getting this same error now with Hellblade: Senua's Sacrifice (new raytraced version).

Ssmcv 2021-11-17 github

I'm getting this same error now with Hellblade: Senua's Sacrifice (new raytraced version).

Please open a separate issue with full details, rather than replying to a closed issue and not providing any information.

Ssecuritysushi 2021-11-26 github

@mahagr I've run into the same issue. With this I was able to start the game:
PROTON_USE_WINED3D=1 %command% -dx11

LlIWAPIl 2022-06-13 github

Had the same issue. Games only ran with:

PROTON_USE_WINED3D=1 %command% -dx11

The problem was I have a Nvidia GPU had amdvlk lib32-amdvlk installed. When I removed them everything ran perfect.