Host GPU hangs (DXGI_ERROR_DEVICE_HUNG) during first-boot screens on NVIDIA RTX 4060 #11
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#11
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@DaniloMaglia on GitHub · 2026-11-23 22:53 UTC · original
Summary
On an NVIDIA GeForce RTX 4060 the host device is removed during the
first-boot / menu screens, about 60–70 s after start (frames ~1250–2100),
well before loading into the world.
Environment
mainat015d45b,diagprofile with--features diagnosticsSteps
Let the boot screens play. 4 runs out of 4 failed with exit code 5.
What happens
With
VICTORY_D3D12_DEBUG=1the debug layer reports no errors before theremoval (only harmless warnings: unbound DSV, resource creation hints), and
the reason is:
DRED reports no page fault.
Where it stops (DRED breadcrumbs)
The hang does not follow one draw:
The shaders in flight are trivial. I disassembled two of them with
victory shader-info --disasm:a820d0c3bdb59905: interpolates a color and exports it, no resources82ba5eae46a856a4: samples one 2D texture and exports it, no loopsRun 4 dropped every draw using
82ba5eae46a856a4and still hung, at adifferent draw. One bad shader seems unlikely.
Pattern
Every hang comes at a screen change. On the GPU runs, "a black frame after a
frame that was not" is logged about every 216 frames (frames 357, 573, 789,
1005, 1222, ...), and each hang comes on one of those changes, when the next
screen first binds new pipelines. On WARP only the frame-1 black frame is
logged.
The window also goes black for a few seconds and comes back several times
before the hang. These are those same black frames.
Not yet tried
instruction the GPU was running
Full logs available on request.
@diolehner on GitHub · 2026-11-23 23:04 UTC · original
Same hang here on an RTX 4080 SUPER (16 GB), same driver 32.0.16.2124, Ryzen 7 9800X3D, Windows 11, VIctory
mainate8f3b1c, own copy of the title.Release build: first-boot screens and the intro video with sound work, but the window flickers to black repeatedly; the host device is removed (
0x887A0006, TDR) about 100 s in, right after accepting the legal screen.diag+VICTORY_D3D12_DRED=1(1 run): sameDEVICE_HUNG. The breadcrumbs stop at a small indexed draw (30x1) of a UI pass, as in your runs 1 and 3. Two things that may help narrow it:slow host submission ms=524(4 lists, one compute pipeline plus several graphics ones). It is the only slow submission in the whole log, so the GPU was already taking far longer than usual one submission before the TDR.black frame ... after a frame that was notwarning came a fraction of a second before that slow submission, at a screen change, which matches the ~216-frame pattern you saw.diag+VICTORY_D3D12_WARP=1: gets further: past the legal screen and "continue" into a black loading screen. There WARP refuses a batch of compute pipelines with0x80070057(E_INVALIDARG) and then the device is removed with0x887A0005. That is probably a WARP feature limit rather than the same bug, but it shows the title itself proceeds when the hardware hang doesn't happen.Next I'll try
VICTORY_COPY_MODE=noneto see whether the title-memory copies are involved, and a longer TDR delay to tell a long GPU workload from a shader that never finishes. I'll post the results here.AI-assisted (Claude Code); measured on my machine. No game data in this comment.
@DaniloMaglia on GitHub · 2026-11-23 23:09 UTC · original
Update: it isn't a hang. It's a use-after-free, and I have a fix.
What Aftermath shows. I loaded NVIDIA's Aftermath library in the
diagnostics build and got a GPU crash dump on the next failure. It shows a
page fault, not a timeout:
The title creates and releases this texture within 2.7 ms around screen
changes, and the host copy was freed about 3 ms before the fault. That's why
DRED and the debug layer pointed at a different trivial draw each time.
NVIDIA faults on this; other hardware may read zeros instead.
Two gaps let the host texture be freed while it's still referenced:
Queue::signalcompletes the title's fence at once, but a host submissionfrom another thread can still be running. The title then releases the
texture,
Resource'sDropfrees theID3D12Resource, and the runningsubmission reads freed memory.
only rebuilt when a draw's table walk visits it. After
descriptor::forget, a slot made from a released texture keeps a live SRVto the freed host resource.
Fix.
host::retirefrees a released resource's host texture at once if nosubmission is running, otherwise after the running one finishes.
descriptor::forgetpasses the retired view records to every host heap,which nulls the slots made from them (a record-to-slots index, so no heap
scan).
Result. With both changes there's no device loss. The run gets through
the setup screens (about 2 minutes) and the opening cinematic starts, with
audio. Then the title itself crashes: the frame counter stays at 2222 for
more than 10 s while mesh pipelines are built, followed by
0xc0000005 at <title exe>+0x23cf683 (write 0x0)and the title's crashreporter. That looks like a deliberate fatal error, probably part of the
known world-performance work rather than this bug.
I don't yet know whether the slot-nulling change is needed on its own; the
page fault was gone only once both changes were in.
Still open from my first post: on the real GPU, single black frames show up
about every 216 frames during the setup screens. They're single frames
between normal ones, not fades.
I can open a PR with the fix. I also added three diagnostics-only switches
that could go in the same PR or be left out:
VICTORY_AFTERMATH=<path to GFSDK_Aftermath_Lib.x64.dll>writes an NVIDIAcrash dump and its decoded JSON when the device is lost. The DLL is loaded
at run time; nothing from NVIDIA is linked or shipped.
VICTORY_SHADER_DUMP=<dir>saves each translated shader container.VICTORY_SKIP_SHADERS=<hash>,...drops the draws of the listed shaders.@FIocker on GitHub · 2026-11-23 23:10 UTC · original
This may be the same cause as #16: on NVIDIA the title's 2560x1440
B5G5R5A1_UNORM(UAV) andB4G4R4A4_UNORM(render target) textures are refused (no host texturein the log, formats 86 and 115), and the draws after that read or write through descriptors with nothing behind them; render targets after a missing one also shift down a slot. On an RTX 5080 (driver 621.1) the hang stopped at a different draw than yours (a 6-vertex quad), but it went away with the patch in #16, and the title then reaches the world.If your logs also have the two
no host texturelines, that patch should be worth a try on the RTX 4060 / 4080 SUPER; if they do not, it is something else.AI-assisted (Claude Code). No game data in this comment.
@Secbit-A-dpereira on GitHub · 2026-11-23 23:30 UTC · original
Same symptom on an RTX 5080, two runs out of two, and one extra data point: it also fails in WARP, with a
different code.
Environment
mainate8f3b1c,diagprofile with--features diagnosticsWhat happens (Series X, host GPU)
2 runs of 2 failed the same way, both after the loading-screen artwork had been drawn and presented:
Captured frames up to the failure: frame 1419 is the loading-screen illustration, fully drawn and correct; the
hang comes on the next frame or two. Frames 1350–1419 are all distinct, so the picture is live, not frozen.
With
VICTORY_D3D12_DRED=1:That last one matches the
draw 6x1 … 3840x2160 SRVin run 4 of the report above.WARP is not immune
VICTORY_D3D12_WARP=1, withVICTORY_KEYSto move through the menus:the menus, the legal notices and the Rockstar logo all render correctly (1920x1080 captures, 10–16 fps at first,
then 2 fps / 488 ms per frame once it starts loading);
after about four minutes the device is removed as well, but with a different code:
So on this machine the failure is not NVIDIA-specific and not a TDR: the same point (the first heavy frames of the
world load) kills both a real GPU and the software adapter, with
0x887A0006and0x887A0005respectively. Thatpoints at something in the submission itself (a resource that is used after it is freed, an aliasing/barrier
problem, or a copy into a range that is no longer mapped) rather than at shader code — WARP does not TDR.
Series S mode does not remove the device
--console series-son the real GPU: 30 fps, 11 draws a frame, no device removal in 4 096+ frames (Series X failsat about 1 420 here). Every captured frame is a single flat colour, so this path runs but does not draw.
Ask
0x887A0005on WARP expected, or does it point at the same defect as the0x887A0006?VICTORY_D3D12_DEBUG=1output, target dumps(
VICTORY_CAPTURE+VICTORY_DUMP_TARGETS=1) of frames 1350–1419, or a capture withVICTORY_D3D12_DRED=1and--console series-s. No game files would be shared.@DaniloMaglia on GitHub · 2026-11-23 23:31 UTC · original
Update: with current
mainplus two fixes from elsewhere, the RTX 4060 runswithout device loss and the menu flicker is gone.
Device loss: fixed by the patch in
#16
(thanks @FIocker). My logs had both
no host texturelines, formats 86(
B5G5R5A1_UNORM, UAV) and 115 (B4G4R4A4_UNORM, render target), on everyGPU run and never on WARP. With the patch:
The run then goes through the setup screens and menus, plays the
"Rockstar Games presents" card and loads into the world (game audio plays,
the picture is black, as listed under "Not working yet" in
8c26061).After about 2 min 20 s there was no device loss and no crash.
The use-after-free I described above is already handled on
mainby8c26061(host lists hold the textures they name, heap slots hold theresource they view), so I'm dropping my fix for it.
Black flashes in the menus: fixed by #20. Without it, single black
frames showed up about every 216 frames and in bursts at screen changes
(frames 357, 573, 789, ... in each run). With #20 the only black frames
left are frame 1 and a 4-frame black at frame 759, which looks like an
intended cut (brightness 44 → 0 for four frames → 45), not flicker.
Tested on
main(8c26061) with the #16 patch and #20 applied:cargo test -p victory-gpu: 36 passed; clippy cleanI have a diagnostics-only
VICTORY_AFTERMATH=<path to GFSDK_Aftermath_Lib.x64.dll>switch that writes an NVIDIA GPU crash dumpplus its decoded JSON on device loss. It's what showed the page fault that
DRED and the debug layer missed. The DLL is loaded at run time; nothing
from NVIDIA is linked or shipped. Happy to open a PR if it's wanted.
@DaniloMaglia on GitHub · 2026-11-23 23:40 UTC · original
@Marvisak can we mark this as closed?
@Lonhaax on GitHub · 2026-11-24 00:03 UTC · original
2026-11-23T23:59:43.831106Z ERROR victory_gpu::host: host GPU device removed after a submission of 31 lists; no breadcrumbs (The specified device interface or feature level is not supported on this system. (0x887A0004)); device removed: The GPU will not respond to more commands, most likely because of an invalid command passed by the calling application. (0x887A0006); a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
VIctory: host GPU failure: host GPU device removed after a submission of 31 lists; no breadcrumbs (The specified device interface or feature level is not supported on this system. (0x887A0004)); device removed: The GPU will not respond to more commands, most likely because of an invalid command passed by the calling application. (0x887A0006); a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
RTX 4070.