protonscr

DXVK can't create vk device in proton (works in wine and natively)

protonclosed overlayNVIDIA drivers
ValveSoftware/Proton#2059 · opened 2018-12-05 by theli-ua · updated 2023-08-05 · 14 comments · github
1 matching comments, n / p to jump
Ttheli-ua 2018-12-05 github

In a nutshell

ERROR: terminator_CreateDevice: Failed in ICD libGLX_nvidia.so.0 vkCreateDevicecall
ERROR: vkCreateDevice:  Failed to create device chain.

Works in wine, vulkan also works in proton ( https://imgur.com/a/zlG00La )
Proton log with vulkan loader debug and validation layers: https://gist.github.com/theli-ua/8bc164301f7937918e93e87b31280ced

As a side note I haven't been able to locate any of DXVK's log files (* dxgi/d3d11 .log) Can README.md be updated to clarify that? ( on usual wine its in the same directory as executable that loads dxgi/d3d11 and it doesn't look like thats the case with proton )

GGuy1524 2018-12-05 github

You should provide system details. What distro, what driver, and how did you go about installing your drivers.

Ttheli-ua 2018-12-05 github

@kisak-valve I don't believe it is game specific, this is just an example, all of the d3d11 games crash right after loading dxvk's dxgi.dll , even whitelisted 588430 (Fallout Shelter).

So summarize:
Proton + vulkan : works (Doom 2016)
Proton + Wine d3d11 (works)
Wine + dxvk : works (For example non-steam Magic: The Gathering Arena)
Proton + dxvk: exception

@Guy1524 sure, I should have done that, you are right.
This is an nvidia optimus laptop, Gentoo, 4.19.6 kernel, nvidia-drivers 415.18.04 (vulkan beta for unity games fix), however it behaves exactly the same with latest 415.18 (which is latest in Gentoo) or older 410.78

A screen is setup for rendering with NVIDIA like this:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
xrandr --dpi 96
xrandr --output eDP-1-1 --set "PRIME Synchronization" 1
xrandr --output HDMI-1-1 --set "PRIME Synchronization" 1
Ttheli-ua 2018-12-05 github
Kkisak-valve maintainer 2018-12-05 github

With the information initially provided, it was presented as a game-specific issue. I've adjusted it back and added the nvidia label as the hint points towards a driver issue, possibly optimus related. With your wine + dxvk testing, what version of dxvk are you testing and is it built as a native library (.dll.so) or as a windows library (.dll)?

Ttheli-ua 2018-12-05 github

0.93 (though it did work back to older versions as well as far as I remember) and compiled as windows libraries (bascially dxvk's binary releases). Installing those into proton's prefixes and setting appropriate dlloverrides doesn't help either

DDarthShredder 2018-12-06 github

Maybe you need the 32bit lib
apt install libglx-nvidia0:i386
Was the fix for me on Debian9

If you have installed the NVIDIA stuff by hand, then you need to compile with 32bit support (needs some 32bit devlibs).
You need this for some native Linux games and Steam too

Ttheli-ua 2018-12-06 github

@DarthShredder if that would be the case then I wouldn't be able to run other apps that don't necessarily need DXVK (as nvidia bundles both opengl and vulkan in their libglx), For example "Eternal Card Game" shows the same exception when trying to run as is and runs perfectly fine with PROTON_USE_WINED3D=1
Also, as I was saying I have wine (system provided) + dxvk (binary release) working in a 32bit wine prefix outside of steam.

And if you look at attached logs, it passes validation layers:

INFO: Meta-layer VK_LAYER_LUNARG_standard_validation all 5 component layers appear to be valid.
Ttheli-ua 2018-12-06 github

Interesting enough, games seem to be able to run when launched from winedbg_run script:

https://imgur.com/edCV0z6 (you can see dxvk hud there)

it goes like this:
start winedbg_run
get an exception
check backtrace

Unhandled exception: inexact float result in 32-bit code (0x00000000f636c2c9).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:f636c2c9 ESP:049deb44 EBP:049dec18 EFLAGS:00010202(  R- --  I   - - - )
 EAX:00000440 EBX:00000000 ECX:000000eb EDX:049ded68
 ESI:ef734020 EDI:049ded68
Stack dump:
0x00000000049deb44:  0402d5e800000025 00000000027ac410
0x00000000049deb54:  0440004000000000 049deb9cf6ed008b
0x00000000049deb64:  027ac430049ded68 00000001f77dcff4
0x00000000049deb74:  0402c4a805001468 027ac4800279f990
0x00000000049deb84:  0000000000000001 0402d658ef734020
0x00000000049deb94:  6a64e6b30402c4a8 0000000000000000
0x00000000049deba4:  0000000000000000 05001468f77dcff4
0x00000000049debb4:  049dec18049ded68 ef721490f77ca2ed
0x00000000049debc4:  ffffffffef734020 049ded6800000001
0x00000000049debd4:  049ded7800000001 0000000000000000
0x00000000049debe4:  03ffaa5800000000 0402c46800000001
0x00000000049debf4:  ef73402000000001 00000000ffffffff
Backtrace:
=>0 0x00000000f636c2c9 in libnvidia-glcore.so.415.18.04 (+0x9802c9) (0x00000000049dec18)
  1 0x000000006a5db104 in d3d11 (+0x9b103) (0x00000000049decb4)
  2 0x000000006a573b24 in d3d11 (+0x33b23) (0x00000000049deda4)
  3 0x000000006a56a21b in d3d11 (+0x2a21a) (0x00000000049dee44)
  4 0x00000000108e8dbf in unityplayer (+0x8e8dbe) (0x00000000049def20)
  5 0x00000000108e9d80 in unityplayer (+0x8e9d7f) (0x00000000049df014)
  6 0x00000000108e4b34 in unityplayer (+0x8e4b33) (0x00000000049df044)
  7 0x00000000108faea2 in unityplayer (+0x8faea1) (0x00000000049dfe98)
  8 0x00000000109001ba in unityplayer (+0x9001b9) (0x00000000049dfeb4)
  9 0x000000001090029d in unityplayer (+0x90029c) (0x00000000049dfec4)
  10 0x000000001040903d in unityplayer (+0x40903c) (0x00000000049dfedc)
  11 0x000000007bc83604 call_thread_func_wrapper+0xb() in ntdll (0x00000000049dfeec)
  12 0x000000007bc86920 call_thread_func+0x8f() in ntdll (0x00000000049dffdc)
  13 0x000000007bc835f6 call_thread_entry+0x9() in ntdll (0x00000000049dffec)
0x00000000f636c2c9: fldcw	0x14(%esp)
Wine-dbg>q

quit

... at this point game starts successfully (I've tested multiple titles)

Ttheli-ua 2018-12-06 github

Actually, just using "run" script from dumped proton scripts make all of them work :-/

Ttheli-ua 2018-12-06 github

Anyway I've deducted this to preloading steamoverlay shared object
If I add
LD_PRELOAD=:/home/theli/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so:/home/theli/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so
to the generated run script it stops working and behaves just like it is being run from Steam

@kisak-valve can we rename this to "Preloading steamoverlay makes DXVK crash" or something?
Or merge this into existing issue about that if there is one.

It seems that preloading overlay shared object is forced despite any overlay settings in Steam UI and that makes every title crash when loading dxvk

Ttheli-ua 2018-12-06 github

testing more, if I simply delete gameoverlayrenderer.so from 64bit runtime directory then games launch just fine from within steam

Ttheli-ua 2018-12-09 github

opting out of steam beta updates (just in case) doesn't affect the issue

Ttheli-ua 2018-12-28 github

I solved this issue by not installing non-glvnd (compatibility) opengl libraries as part of my nvidia drivers install

Mmemeruiz 2023-08-05 github

I fixed this error by installing the following debian packages:

libnvidia-rtcore libnvoptix1 packages in debian (possibly also Ubuntu) for raytracing support

libnvidia-ngx1 for DLSS support

Try it out.

Launch options

DLLs