protonscr

Memory access violation issue when vkd3d setup for game run within Windows on Steamdeck (revised)

vkd3dopen
HansKristian-Work/vkd3d-proton#1705 · opened 2023-09-18 by ycyleo · updated 2023-10-27 · 9 comments · github
Yycyleo 2023-09-18 github

Hi guys,

I don't know if anyone can give me some hints on this issue since I know vkd3d was mainly design for Linux.

I get a game from my friend project, I tried to setup vkd3d for the game try let it run on vulkan layer on Steamdeck.
But then I get Memory access violation error pop up and the game just instantly closed.

After some test, I manage to let the game run with vkd3d with old ver build of vkd3d and dxgi from dxvk:
dxgi.dll from DXVK 2.0 async
D3d12.dll from vkd3d 2.2

The game most of the time running good, however if the game loading up some specific map, the game was get error again.
I then change the UMA frame buffer size to 4GB, it now not getting error but the game will running extremely slow sometime compare to if I set 256MB then it can run a lot better.

I was think about if this is casued by memory usage exceed, hope anyone can explain this situation, thanks

BBlisto91 2023-09-18 github

Post a Proton log where the game crashes as it might show some more details. If it's through Steam then running it with PROTON_LOG=1 %command% in the games launch options will make a log appear in the users home folder with the steam id of the game in the name (some numbers).

Edit: I assume you mean the game crashes on Linux and not because you are trying vkd3d-proton on Windows.

Yycyleo 2023-09-18 github

Sorry for my mistake of the topic, I just edited it and I run the game on windows side which also not a steam game.

I tried the launch option seem not work, could you at least let me know how can I generate a log report on Windows?
It now only generate a dxgi log but shown nothing related to issue.

BBlisto91 2023-09-18 github

The %command% trick doesn't work in Windows Steam ye.

If you want a vkd3d-proton log on windows you'd add VKD3D_LOG_FILE as a environment variable with it's value being the the path to a file where you want it to output to. e.g C:\bla.txt

Just note that if the system uses a AMD gpu there is a decent chance the driver won't work well with vkd3d-proton at all. Refusing to start the game or random crashing.

Yycyleo 2023-09-19 github

Thanks for your advise, I manage to generate the log and I try attach in here:
dxgi.txt

As the log shown, it seem really related to memory issue (vkd3d_allocate_device_memory: Failed to allocate device memory)
so that's why if I increase UMA frame buffer to 4G, the game will not crash but it somehow will run very extremely slow.

May I know if there any workaround for this situation? much appreciated

btw. I also only manage to run the game with vkd3d when the older GPU driver installed ( release by valve on last year)
If I updated to newer driver and also using new vkd3d, the game will crash on startup, the log look like this:
dxgi_new driver+new vkd3d.txt

BBlisto91 2023-09-19 github

Don't know personally since I don't have any technical knowledge, and don't know if the devs would have much input either since running this way is kinda unsupported. In general I'd recommend just always trying latest version vkd3d-proton 2.10 and dxvk 2.3.
What is the game and GPU btw? It doesn't tell GPU or driver info without a dxgi log.

May I ask why you are trying to use vkd3d-proton on Windows? Not sure I understood that part.
You are not likely to have any advantages over just using native and if it's for testing vkd3d-proton for translation on Linux then it's better to just test that on a Linux installation.

Yycyleo 2023-09-19 github

Okay let me summarize what I found so far.
Actually, I already tried to use New GPU driver + New VKD3d set, but the game just crash on startup,
dxgi log was empty(log nearby the exe),but the vkd3d log like this:
vkd3d_new driver+new vkd3d.txt

But if I use the old GPU driver + older vkd3d, the game can run and dxgi & vkd3d log like these:
dxgi:
HappyGem_dxgi.log

vkd3d:
vkd3d_old driver+old vkd3d.txt

For GPU, like the dxgi log on above, it was AMD Custom GPU 0405 on steamdeck.
But about the game, since that was a project from my friend, so I think I can't talk too much about it, sorry about that.

And the reason why testing in this way, since the game had some graphic effect missing issue with amd gpu, but as my friend test, he using vkd3d to run the game on desktop AMD GPU, seem vulkan layer can directly fix the issue but I assume desktop AMD GPU have enough VRAM, so he never have this memory access (or allocate) issue. So this is a quick fix for game without changing anything of the game.

btw. the game somehow will crash on startup on SteamOS whatever what proton ver using

BBlisto91 2023-09-19 github

Oh it's a Steam Deck with Windows on it? Gotcha misunderstood that part. And also tested on SteamOS I gather.

The devs would probably need to look at the game to say anything specific I imagine.

Yycyleo 2023-09-20 github

Hi, I know that maybe something that devs need to deal with but may I know if there workaround can let the vkd3d consume less RAM? As I know so far, seem vkd3d will consume more RAM than the game run natively. Thanks

Yycyleo 2023-10-27 github

Hi guys, I recently tried to let the game run on SteamOS. The game will run for ten few seconds then it would closed. I don't know if you guys will still able to help to looking into it, and here is the log I got:
vkd3d_trace.log

Much appreciated

Proton versions

Launch options

DLLs