protonscr

Some games hang when using winewayland driver, but work through damavand / wined3d

dxvkclosed
doitsujin/dxvk#4720 · opened 2025-03-01 by XZVB12 · updated 2025-04-17 · 9 comments · github
XXZVB12 2025-03-01 github

Hello, I’m testing the work of games on native wine wayland (DISPLAY=) and found that some games hang in about a minute, in different places (menu, gameplay). These games work on wine wayland without problems via wined3d or damavand.
Also I found several games that hang on dxvk and crash on damavand, for them I have already created a separate bug report, maybe it will be useful: https://bugs.winehq.org/show_bug.cgi?id=57895

All these games work without problems with any api(dxvk/wined3d/damavand) through xwayland.

I have already read in old discussions that dxvk does not work directly with wayland,only witch winewayland driver, but it seems part of the games works without problems through damavand, It seems that the problem is fully reproduced only in dxvk and I haven’t reported it yet in the wine bug (If it turns out that problem really is in winewayland driver, I will do it)

Software information

works fine with dxvk winewayland driver:
bg3 /bg3_dx11
Warhammer 40,000 Rogue Trader
Little Kitty, Big City
Dead Cells

hangs on dxvk winewayland , but work witch damavand (WINE_D3D_CONFIG=renderer=vulkan) winewayland:
WILL A Wonderful World
terraria
Mondealy

hangs on dxvk winewayland , crash witch damavand (WINE_D3D_CONFIG=renderer=vulkan) winewayland, but work via wined3d :
signalis
Dread Delusion
Deus Ex Revision

System information

  • GPU: 3060
  • Driver: 570.124.04 witch close kernel module
  • tested Wine version: 10.1-10.2 / staging/ wow64 and any combination thereof
  • DXVK version: 2.5.3
  • wayland: 1.23.1
  • wayland-protocol: 1.41
  • egl-wayland: 1.1.17

Log files

here are some log files, including damavand crash, maybe it will be useful too.

dread delusion damavand crash.txt
signalis damavand crash.txt
signalis dxvk hang.txt
terraria damavand work.txt
terraria dxvk hang.txt
will damavand work.txt
will dxvk hang.txt

Ddoitsujin maintainer 2025-03-01 github

Can you test if current master works? We essentially rewrote all the Vulkan swapchain code, which may be relevant here.

I haven't tested winewayland.drv much and it's not a very high priority right now, but I haven't had hangs, just some window management issues. Although those can probably cause games to hang too, especially anything D3D9.

Vventureoo 2025-03-01 github

I would suggest you try running games with Nouveau/NVK, because I too have gotten random freeze issues on my laptop and it looks more like an NVIDIA driver issue, as the freeze issue is not reproducible on AMD iGPU / when using NVK. I'm also using winewayland and it's likely that there's something wrong with Wayland+Vulkan in 570.xx, but that's just my guess.

XXZVB12 2025-03-01 github

Can you test if current master works? We essentially rewrote all the Vulkan swapchain code, which may be relevant here.

I haven't tested winewayland.drv much and it's not a very high priority right now, but I haven't had hangs, just some window management issues. Although those can probably cause games to hang too, especially anything D3D9.

i try DXVK: v2.5.3-225-g8f840853 unfortunately it didn’t help. I understand that this does not have high priority.

I would suggest you try running games with Nouveau/NVK

unfortunately nvk shows very low performance and does not allow to use cuda. so I can’t use it.
is there a way to run a particular application using nvk without removing/disabling nvidia driver ?
damavand also relies on vulkan, but works in more cases. Maybe if there is someone with older nvidia driver it could clarify the situation.
I can’t install the old nvidia driver to check, as it is not compatible with my kernel.

XXZVB12 2025-03-03 github

I seem to have found the source of the problem. This is really a nvidia driver bug, it has been discussed here for a long time
https://github.com/ValveSoftware/gamescope/issues/1592
This discussion suggested ways to temporarily bypass the problem until it is fixed https://github.com/ValveSoftware/gamescope/issues/1592#issuecomment-2525409950

I tested the proposed patch and it works well for me https://gist.github.com/matte-schwartz/feb1c49286f5acdab6c612963d58a796

I know that a change has already been proposed https://github.com/doitsujin/dxvk/issues/4510 , but then rejected it.

May be useful to temporarily accept them or indicate this as a known way around the problem ?

Mmisyltoad 2025-03-03 github

Present wait is known broken under NVIDIA + Wayland.

XXZVB12 2025-03-03 github

Present wait is known broken under NVIDIA + Wayland.

It may be known to many, but I had to search in several places to find information about it. At least it’s not explicitly marked.
If there is a temporary workaround, it seems strange not to mention it.
In any case the decision is yours. At least if someone is looking here they can find this discussion.

Mmisyltoad 2025-03-03 github

The workaround is to use X11/XWayland.

Users going out of their way to opt into experimental backends for software should expect bugs.

Ttlneondo 2025-03-06 github

The workaround is to use X11/XWayland.

Users going out of their way to opt into experimental backends for software should expect bugs.

Problem is that this hits anybody trying to get HDR out of gamescope too. Anything we can do or say to confirm that this is an Nvidia bug? I assume Nvidia knows they have problems with present wait but I don't think there's been an acknowledgement since October.

XXZVB12 2025-04-17 github

In case anyone is wondering, this has been fixed in the new nvidia driver version https://www.nvidia.com/en-us/drivers/details/243334/