dxvk: VK_ERROR_DEVICE_LOST

I’ve already met this problem VK_ERROR_DEVICE_LOST in games:

  • Batman: Arkham City - After watching the initial videos, who released the game.
  • Batman: Arkham Origins - During the game launch, after the game logo.
  • Dark Souls III - I can start playing. I go to the first monster, and hang.
  • Fallout 4 - Loading a new game.
  • Far Cry 5 - Loading a new game.
  • Outlast 2 - Beginning of the game, hangs after listening to a fragment of the memory of a girl.
  • Prey: Mooncrash - I can start playing. A load of equipment arrives to me, I insert it for virtual reality, after I sit down on an armchair. There is a load of people to save, and hangs.
  • Skyrim Special Edition - Occurs after a minute of driving on a wagon.

Software information

All settings in both games to low, resolution to 864x486. Batman: Arkham Origins:

  • Tried with window.
  • Tried without Vsync.

System information

  • GPU: Intel HD 5500
  • Driver: Mesa 18.1.2
  • Wine version: 3.10-staging
  • DXVK version: 0.61

Log files

Batman: Arkham City

Batman: Arkham Origins

Fallout 4

Outlast 2

Prey: Mooncrash

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (3 by maintainers)

Commits related to this issue

Most upvoted comments

@MrChebik, so far, these all seem to be anv issues. Could you please file one bug per app at bugs.freedesktop.org? We should stop chattering about anv GPU hangs on a DXVK issue. I’ll file new DXVK issues if I find an actual DXVK problem with any of them.

I got Batman: Arkham City to run by which I mean that I got it to hit an assertion in my debug build of mesa. Definitely a driver bug. 😃

If this is true, this is devastating news. Is there any way at all to narrow down what this might be?

I double-checked the code and did end up finding a small resource tracking issue related to framebuffer attachments (fixed in 67fe452580222fc082418ee0bc6d91dfd2f825e2), but that one would only cause gpu->cpu synchronization to fail when the game tries to map a render target. And I’m not even sure if that is possible at all in Dx11.

I’ve successfully reproduced this on Broadwell. Unfortunately, as far as I can tell, it’s some sort of DXVK synchronization issue. Most likely destroying a resource (pipeline, command buffer, image view, etc) while it’s still busy on the GPU. Hacking up the driver to do a vkQueueWaitIdle after every vkQueueSubmit seems to make the hang go away. I have no idea why this would affect Broadwell and not Sky Lake.

I’m not sure if this information is useful but it seems to happen right around the time when the game decides to upload a bunch more data. In the Skyrim case, it often hangs right as you approach Helgen and the game suddenly needs to upload data for walls and things.

The batman hang was caused by us not properly implementing vkCmdClearColorImage on linear RGB images. Patches to fix it are in my wip/anv-dxvk branch.

Update: I think I finally have at least the Skyrim hang narrowed down. It’s a very Broadwell-specific issue and I think I’ve got a fix. Haven’t tested any of the others yet though.