VICTORY_HW_RT=1: GPU device removed (0x887A0005) 75-85 s into the world; LIFT=0 survives, so the lifted RayQuery traversal is the fault #4324
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA#4324
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?
@TheBen420 on GitHub · 2026-11-30 18:55 UTC · original
Hardware RT removes the GPU device after 75–85 s in world; structures alone are fine, the lifted traversal is the fault
Tip
c71899d9(2026-11-30) plus a 27-line copy-back cap, built release from source on this machine.Everything else in this report is stock switches unless named.
Card / system: RTX 4080 SUPER 16 GB, driver 621.24, Windows 11 26200, Ryzen 7 5800X, 64 GB.
Title: GTA VI Xbox build 1.0.2.1,
game_scarlett_master.exe, Series X, 1080p scene upscaled to 1440p, DLSS DLAA, no frame generation.What happens
With
VICTORY_HW_RT=1the hardware path comes up cleanly — every ray-query program lifts with no fallbacks:The world comes up (10,847 draws in frame) and then the device goes, twice, at the same point:
Windows logs nothing. There is no display-driver reset (no event 4101) and no power transition in
the system log in the five minutes around either crash, so this is a D3D12-level removal from inside the
RT path rather than a TDR recorded by the driver.
It is not the structure work, and it is not memory
VICTORY_HW_RT_LIFT=0keeps the whole hardware path's structure work — the HLE builder, bottom and toplevel builds, refits, the instances' remap, the index/vertex copies — and lifts no traversal loop, so
every ray takes the software walk:
That run stayed up for the whole test — more than four minutes parked in the world, 56,989 BLAS refits
and 3,500 live BLAS, no device removal, no hitch beyond one 250 ms frame. Same structures, same card, same
churn, the only difference being that no loop is lifted into a
RayQuery.Memory was never tight in the crashing runs either:
hardware RT BLAS memory: budget 1464 MB, live 257 MB (2132 BLAS), pinned 18 MB; evicted 0, and the title's own working set was unremarkable.The numbers just before the first crash, for reference:
Reproduce
Load a save, stay in the world. On this machine the device goes within 75–85 seconds, twice out of two.
Add
VICTORY_HW_RT_LIFT=0and it stops happening.Logs
Extracts from both runs (hwrt lines and the failure, ANSI stripped):
https://gist.github.com/TheBen420/6b498d0ed931bf11766e418045c6c754
Full play logs are
%LOCALAPPDATA%\victory\logs\victory-nvidia-play-20261130-182458-15680.log(crash) andvictory-nvidia-play-20261130-184557-23808.log(LIFT=0, survived); I can paste any further part of them.Worth knowing
The surviving configuration is not slow — it is the fastest thing I have measured on this title. At the
same spot and draw count (6,137 against 6,206), parked and untouched: 53.8 ms a frame against 56.5 ms
for my build with the light stand-ins in place. So the card-built structures alone are a small win, and the
lifted traversal is the part that would make the title's real ray tracing affordable. That is the piece
that removes the device.
@Yorivel on GitHub · 2026-11-30 19:14 UTC · original
Same here on an RTX 4090 (24 GB), driver 621.40, Windows 11 26300, including a clean build of main at
84bd61e2.84bd61e2exactly, release,scripts/play-nvidia.ps1 -Fps 30with its defaults plusVICTORY_HW_RT=1, DLSS off,VICTORY_LIBRARY_MAP=0; its own newVICTORY_CACHE_DIRwarmed with the launcher's switches (76,449 pipelines) and a new exe path, so a fresh driver cache too. Device removed (0x887A0005) after ~3 min 07 s of play (moving around an interior area), "nothing of ours was running on the card".Two things that may help:
VICTORY_D3D12_DEBUG=1, diag build): no D3D12 error at all before the removal. Its last message isID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_REMOVED: Plug-and-play stop has been exercised on this adapter...). DRED (VICTORY_D3D12_DRED=1): no breadcrumbs, no page fault. No 4101 or nvlddmkm event in the System log either, as you saw.VICTORY_HW_RT_LIFT=0did not survive here, but only tested on the local build, while playing rather than parked: removed after ~2.5 min, and withVICTORY_HW_RT_REFIT=0added after ~1 min 50 s. So the lifted traversal may not be the only trigger, or LIFT=0 only moves it later. I have not run LIFT=0 on clean main yet, so take this with that caveat.Counters just before one of the local removals: BLAS live ~5,300 (built ~9,800, rehydrated ~3,600), structure copies ~1,600, index buffers clamped on the card ~80,000, vertex buffers sanitised ~630,000; BLAS memory 710–830 MB of 1,536 MB, nothing evicted.
While it runs, the reflections look clearly better than the other paths here. Happy to run more switches or a GPU-based validation run if useful.
@TheBen420 on GitHub · 2026-11-30 20:13 UTC · original
Two more crashes with device-removed tracing on (diagnostics build,
VICTORY_D3D12_DRED), and thesignature points somewhere new. Both died the same way,
0x887A0005, while "nothing of ours was running onthe card".
Breadcrumbs came back empty (
device-removed data; none), so it is not one bad command. What is loud isthe layer's own counters in the frames just before the death:
On a background where the same counters read 1–2 page faults a frame and 12 refreshes of 11.6 MB, the world
load with hardware RT takes them to thousands of page faults a frame and 57,000 refreshes claiming 54 GB,
and then the device is gone. The last line any run prints before the removal is:
Zero pages in zero arenas, with dispatches that read. So the read side is alive and the mapped title
memory behind it is empty at the moment the device goes. That is consistent with a GPU-side page fault on
title memory the layer has just unmapped or torn down, and with the bisect: with
VICTORY_HW_RT_LIFT=0noshader reads through the structures, the page-fault rate stays low, and the run survives indefinitely (four
minutes, 56,989 BLAS refits, then sampled stable).
The Windows system log has nothing at all in the minutes around either crash — no display driver reset, no
power event — so this is not the OS resetting the card.
VICTORY_D3D12_DRED=faultsrecorded no faulting address either, which is why I am reporting the countersrather than a VA. If it helps, the memory-side switches I have in the tree are
VICTORY_MEMORY_CARD_MB,VICTORY_MEMORY_FLOOR_MB,VICTORY_MEMORY_NEAR,VICTORY_MEMORY_NO_WAIT,VICTORY_MEMORY_OWNEDandVICTORY_MEMORY_MAP; if any of them is meant to hold the arenas mapped while structures reference them, thatis the knob I would try next.
Full logs on request; play logs are
victory-nvidia-play-20261130-195309-14640.logandvictory-nvidia-play-20261130-200549-16964.login%LOCALAPPDATA%\victory\logs\.@TheBen420 on GitHub · 2026-11-30 20:15 UTC · original
Third crash, and
VICTORY_MEMORY_CARD_MB=1024does not change it: device removed 60 s after launch, same0x887A0005, same page-fault storm into the world load, and the log still ends with title memory at 0 pages in 0 arenas. I have not found a switch that holds those arenas mapped while structures reference them, so I am leaving this with the bisect and the counters above rather than guessing further.@TheBen420 on GitHub · 2026-11-30 21:15 UTC · original
Update on
e1251c31(the tip with #4177 in it): the crash is still there, and it is intermittent.So
VICTORY_HW_RT=1one1251c31can survive ten minutes and can die in eighty seconds with nothing different between the runs. The bisect from before still holds:VICTORY_HW_RT_LIFT=0never died in any run, so the lifted traversal remains the suspect, and the failure mode is a submission that never signals its fence.Worth adding: with RT on, the frame is 76.6 ms at 8,602 draws against 52.1 ms at 5,893 draws with RT off on the same build and spot, and the copies are cheaper with RT on (12.5 ms / 58.3 MB against 16.6 / 67.5) because the light stand-ins stand aside. The picture with RT on is also the best we have seen on this title — the oven and puddle artifacts that the stand-ins leave behind are gone. So this path is worth fixing.
@Yorivel on GitHub · 2026-11-30 22:31 UTC · original
Same on
e1251c31here (RTX 4090, driver 621.40): clean build of that tip, release,VICTORY_HW_RT=1, preload done first. Device removed (0x887A0005) after about 8 minutes of play, so intermittent on this card too, and later than the 1.5–3 min of my earlier runs.One correction to the arena reading, from this run's log:
title memory by address: 0 pages (0 MB) in 0 arenasis in all 21 of its reports, from the first one minutes before the removal. WithVICTORY_HW_RT=1the title's structure builder is off, so those arenas are never filled; the line reads 0 for the whole run and is not a sign of memory being torn down before the crash. (I also hadVICTORY_RT_FAULT_MB=8192set in this run to test that idea; it limits pages in those same arenas, so it changes nothing here.)@Yorivel on GitHub · 2026-11-30 22:49 UTC · original
On
e1251c31(RTX 4090, driver 621.40),VICTORY_HW_RT=1 VICTORY_HW_RT_LIFT=0also loses the device: removed ~1.5 min into the world, same0x887A0005, "nothing of ours was running on the card", 746 MB BLAS live (4,209), nothing evicted. So the lifted traversal is not required for the crash here; something on the structure side (builds, rehydrates, copies/compaction, refits) is enough.Also ruled out: memory pressure. With
VICTORY_VRAM_BUDGET_MB=16384it still died after ~2.5 min with 15.6 GB of 24 GB in use. Windows logs no TDR/4101 or dxgkrnl event at any removal, so it doesn't look like a GPU timeout; it looks like the driver removing the device itself.Next on my side:
VICTORY_HW_RT_REFIT=0on clean main, and a diagnostics build with the debug layer's GPU-based validation.@TheBen420 on GitHub · 2026-12-01 02:32 UTC · original · edited 2026-12-01 04:05 UTC
Update on the newest unreleased main (
7d93ee07, 37 commits past v2026.11.30.03), release build from source, same card: RTX 4080 SUPER, driver 621.40, Ryzen 7 5800X, 64 GB.With
VICTORY_BVH_BUILDER=1 VICTORY_HW_RT=1and my usual switches, the device is removed within about 90 seconds of launch, and shortly after reaching the world on the run that got that far. Three different messages across runs:relay: device lost before publishing queued GPU work;no host list for a state prelude;relay: the device was lost before fence value N was reached. Working set climbs to 26–30 GB before each removal, with the title compiling shaders at the same time.In the same runs water renders fully black with no flicker, and copies rise from about 57 MB to 94.8 MB a frame at the same draw count (about 6,100).
Is the removal expected to be avoided by preparing and warming pipelines before play, rather than letting a first start compile with RT on? I can run whatever sequence you want and report back.
@rvrvrvr221 on GitHub · 2026-12-01 08:59 UTC · original
Three more on an RTX 4090 (driver 621.40), with the official v2026.11.30.03
victory.exe, plus one detail I haven't seen mentioned here.PC: Core i9-13900K, RTX 4090 24 GB, 32 GB DDR5-6400, Windows 11 Pro (build 26300). Series X, 2560x1440, DLSS Balanced (preset M), 30 fps cap,
VICTORY_HW_RT=1withVICTORY_BVH_BUILDER=1(hardware RT kept, the title's builder off).All three:
relay: device lost before publishing queued GPU work; device removed: The GPU device instance has been suspended. (0x887A0005).The detail: in runs 1 and 2 the removal came right after a burst of this warning, 16 lines each:
In run 2 all 16 were in the second before the removal. In run 1 they started about 3 minutes before it and continued up to the second before. Run 3 has none, so it isn't needed for the removal, but it may point at which geometry is being worked on when it happens.
For contrast, the same PC with hardware RT off (launcher defaults, but at DLSS Quality, no frame cap,
VICTORY_WATER_LIGHT=1) had no device removal in 9 starts of the same boat scene; 2 of those 9 ended with the0x80070057close in #4576 instead.@rvrvrvr221 on GitHub · 2026-12-01 09:11 UTC · original
One more on the same RTX 4090 (driver 621.40, official v2026.11.30.03), this time without hardware RT:
VICTORY_BVH_BUILDER=1alone,VICTORY_HW_RTunset. Same settings as my runs above otherwise (Series X, 2560x1440, DLSS Balanced, 30 fps cap, frame generation off).The title's structure builder ran (
the ray-tracing structure builder runs: all of its programs have host pipelines), and the device was removed 3:39 after launch, with the same signature as the hardware path:Steady 30 fps just before, card memory 19.1 of 22.2 GB.
Only this run has the #2945 warning, 80 times, about every 100 frames up to the removal:
None in the
VICTORY_HW_RT=1runs or the 9 runs with ray tracing off. One run only, so it may be a side effect of the builder rather than the cause, but it suggests the removal isn't specific to the hardware path: with either path on, this PC lost the device within 1.5 to 11 minutes, and with both off it didn't.@TheBen420 on GitHub · 2026-12-01 10:37 UTC · original
Four arms of the two ray-tracing switches on the newest main, with video-memory traces.
Hardware: RTX 4080 SUPER 16 GB, driver 621.40, Ryzen 7 5800X, 64 GB, Windows 11. Series X profile, 1080p scene upscaled to 1440p, DLSS DLAA, no frame generation.
Build: unreleased main
de21ed57, release built from source. Arm 4 is the same commit built with--features diagnostics.Per arm: shader cache deleted and rebuilt (
victory shaders— 25,789 translated, 196 that do not translate, about 105 s), machine powered off and back on, one switch changed.VICTORY_BVH_BUILDERVICTORY_HW_RTVICTORY_D3D12_DEBUG=1, both on)Arms 1–3 all end in
relay: device lost before publishing queued GPU work, orthe device was lost before fence value N was reached(0x887A0005).Video memory, from arm 4's log, which reports the card's budget and use every few seconds:
So the card reached 97 % and the session did not die: exhausted video memory alone is not sufficient. Arm 2's system working set climbed about 0.7 GB a minute until its removal; arm 4's peaked at 36.6 GB during load, was trimmed, and settled at 31–32 GB.
Rendering, in every RT arm and every configuration: water is fully black — not dark — and close up its silhouette breaks into black triangles; distant foliage is black too. Unchanged with
VICTORY_AMBIENTandVICTORY_AMBIENT_SPECULARon or off, and with hardware traversal on or off.Questions.
relayknown to fail specifically under this level of video-memory pressure? The removals cluster where the budget is nearly spent, but arm 4 sat at 97 % for twenty minutes without one.No game data or screenshots attached, per the asset policy.
@rvrvrvr221 on GitHub · 2026-12-01 13:00 UTC · original
Follow-up from the same RTX 4090 (driver 621.40), on @TheBen420's two questions and the timing.
#4337 doesn't stop it here. Isolated A/B of #4338 against its parent v2026.11.30.03,
VICTORY_HW_RT=1 VICTORY_BVH_BUILDER=1: device lost in 3 of 3 runs with it and 2 of 3 without, at the same times (details in #4338).The clock starts with the 3D world, not with launch. In the release with both switches on:
So skipping cutscenes doesn't avoid it, and idle time doesn't count towards it. The two runs that lasted 10 to 13 minutes are the exceptions; I can't tell from the logs what was different about them.
This may also explain why #4338 looked like a fix in shorter tests: the runs in #4338 lasted up to 82 s each, and on this card the loss came 1:54 to 2:37 into the scene.
On question 1 (does the debug layer mask it?): a data point from a different failure on this PC. The
0x80070057close in #4576 ended 2 of 6 release starts withVICTORY_WAVE_FOLDED=1; with a diagnostics build of the same commit andVICTORY_D3D12_DEBUG=1, 0 of 3 starts, with the layer active throughout (it logged about 1.8 million messages, almost allid=538resource-state errors). Like arm 4 above, it looks like the layer's slowdown hides these intermittent failures rather than naming them.@transbinaryunicorn-sys on GitHub · 2026-12-01 16:53 UTC · original · edited 2026-12-01 16:55 UTC
Data point from Linux, same time window: on this machine the hang shows up as an NVIDIA Xid 109 instead of
0x887A0005.Setup: RTX 5090 32 GB, driver 615.78.08, Xeon w7-3465X, Linux (Nobara). GE-Proton11-14 with gabeparra's ntdll/wineserver patches (victory-4090's
scripts/linux/build-wine.sh), vkd3d-proton master. Build:main5fabb46eplus a local loader fix (the SSE4a race of #4196, nothing GPU-side), normal release build, no diagnostics. Series X, 4K output, DLSS Performance, FG 3x. Same save for every run.HW RT comes up cleanly under vkd3d-proton too:
XboxBvhBuilder constructed (hardware DXR 1.1), 14 programs lifted, 0 fell back, BLAS/TLAS built (~5,000–7,000 BLAS, 450–850 MB of the 1,536 MB budget). Skipped draws drop from ~1,200 to 1 per frame.Hangs (kernel log):
NVRM: Xid 109 … CTX SWITCH TIMEOUTwith the game's pid, then the GPU sits at 0 % while our CPU threads keep logging. Time after launch: 78 s, 95 s, 84 s, the same window as in this issue.VICTORY_HW_RT=1, refit on, warm cachesVICTORY_HW_RT_REFIT=0, warm cachesVICTORY_HW_RT_LIFT=0So besides the lifted traversal, two more things push it over the edge here: full rebuilds (
REFIT=0) and a cold start. Both mean a lot of BVH build work on the card at once. That fits a context-switch timeout from long, non-preemptible dispatches (a guess, not proven).Stalls:
compute pipelines: this frame waited its most for them; waited_ms=3000–6000, 54 times in the first RT run and 26 in the second.pipeline library … load_ms_each=243: even loading the large RT pipelines from the library takes that long.Linux pitfall that caused the "cold cache" runs: NVIDIA's shader disk cache is shared and defaults to ~1 GB. The RT pipelines pushed it over the limit, and it got cleared (once mid-run), so the next start compiled everything again and hung. A separate path with a bigger limit fixes that:
Related, not this issue: with HW RT on, the giant stretched dark-brown polygons coming out of the player model (#2185) appear constantly, even with
LIFT=0.VICTORY_LATE_WAIT_LISTS=64removes them here as well, at about 40 % of the frame rate (12.5 fps, 33 ms a frame waiting for the card).