Skip to content

Add rudimentary GPU hang debugging - #5790

Merged
doitsujin merged 10 commits into
masterfrom
hang-debug
Jul 12, 2026
Merged

doitsujin merged 10 commits into
masterfrom
hang-debug

Conversation

@doitsujin

@doitsujin doitsujin commented Jul 11, 2026 •

Copy link
Copy Markdown
Owner

Fallout from #5785.

TL;DR setting DXVK_DEBUG=hang will enable VK_NV_device_diagnostic_checkpoints or VK_AMD_buffer_marker to track which commands are executed on the GPU, and once a DEVICE_LOST error is detected, print stuff to the log:

err:   DXVK: Hang detected:
err:   Queue family 0, index 0
err:   Last command completed: 66145
err:   Last command started:   66146
[...]
err:    66144: Barrier (1, 0): 0x800:0x40 -> 0x18fa:0x1869
err:    66145: [cs.6bf5a8a]
err:   !!! Potential hang region BEGIN !!!
err:    66146: Dispatch (80, 48, 1)
err:   !!! Potential hang region END !!!
err:    66147: [cs.059fd34]
err:    66148: Dispatch (80, 49, 1)

Not nearly as sophisticated as the vkd3d-proton equivalent, but this can at least give us an idea which command and which shader might be hanging, without adding much overhead when it's not needed. Also uses KHR_device_fault if supported, but Nvidia (on Linux) currently doesn't.

@doitsujin
doitsujin merged commit eeb5d83 into master Jul 12, 2026
6 checks passed
@doitsujin
doitsujin deleted the hang-debug branch July 12, 2026 09:55
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Aug 17, 2026
https://build.opensuse.org/request/show/1371428
by user msmeissn + anag_factory
- Update to version 3.0.2:
  * Hang debugging
  In case of a GPU hang or driver crash resulting in VK_ERROR_DEVICE_LOST errors,
  the environment variable DXVK_DEBUG=hang can now be used to help narrow down the crash location.
  Resulting log files may provide useful information in bug reports. This works best on AMD and Nvidia GPUs.
  See PR gh#doitsujin/dxvk#5790 for details.
  * Bug fixes and Improvements

  * Worked around a performance regression in games that create a new DXGI factory every single frame.
  * This affects Dying Light: The Beast with FSR enabled, and potentially other D3D12 games.
  * Granblue Fantasy Relink: Fixed spurious GPU hangs on Nvidia, may affect other games. (gh#doitsujin/dxvk#5785)
  * Halo CE: Worked around a game bug causing rendering issues. (PR gh#doits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant