DLSS-G (Vulkan): game and pacer queues wait on the same binary semaphore, which deadlocks on Linux/Proton

Open
#127 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c

Research direction

Start with the Vulkan DLSS-G submission paths for nv.sl.dlss_g.cmdQ.game and nv.sl.dlss_g.cmdQ.pacer, then review stall-dump-trace.txt and nms_fix.c.txt. Reproduce the handoff under Linux/Proton, including a frame-time spike, and confirm the game and pacer queues no longer deadlock in vkDeviceWaitIdle.

Written by the indexing model from the issue text.

Description

Streamline version: 2.12.0 (as shipped in No Man's Sky, Vulkan), nvngx_dlssg 310.7
Platform: Linux, Proton (GE-Proton 11-7), NVIDIA 610.57.04, RTX 5080. HAGS reported as enabled by Wine.

Summary
In the Vulkan DLSS-G path, nv.sl.dlss_g.cmdQ.game and nv.sl.dlss_g.cmdQ.pacer both wait on the same binary semaphore for one handoff. The Vulkan spec doesn't allow a binary semaphore to be waited on while another queue is already waiting on it, and each signal satisfies exactly one wait. On Windows this seems to work because WDDM binary semaphores are backed by monitored fences, where waits don't consume. On Linux, the NVIDIA driver gives the signal to whichever queue's wait executes first, and the game queue deadlocks. The app then hangs in vkDeviceWaitIdle called from sl.dlss_g.dll.

Sequence (captured with per-submit fences and global submission order)

G26939 cmdQ.game      signals X
G26940 cmdQ.swapchain waits cmdCtx.pacer.semaphore>=637, signals Y
G26941 cmdQ.game      waits X + Y, signals X      <- never completes
G26942 cmdQ.pacer     waits X + cmdCtx.pacer.acquire-semaphore.N, signals cmdCtx.pacer.semaphore / present-semaphore   <- completes

The design expects G26941 to consume X and re-signal it before the pacer consumes it. But G26941 is also waiting on Y. When X's signal lands first, the pacer's (later-submitted) wait takes it, and G26941 can never proceed. It's timing-dependent: it runs fine for thousands of frames and then deadlocks at a frame-time spike, reliably at the NMS loading-screen-to-gameplay transition. It happens even with Frame Generation set to Off, since the plugin still routes presents through the pacer.

Expected
Either use a timeline semaphore (or two separate binary semaphores) for the game-to-pacer handoff, or make sure no two queues wait on the same binary semaphore at once.

Confirmed workaround
A Vulkan layer that swaps these semaphores for timeline semaphores (each signal is ++n, each wait is >= latest n submitted) fixes it completely: 6X MFG runs stably on Linux.

Related (minor)
VkSetPresentConfigNV is chained into vkQueuePresentKHR even though the device was created without VK_NV_present_metering.

Full analysis and workaround layer (Proton tracker): https://github.com/ValveSoftware/Proton/issues/438#issuecomment-5902067647

nms_fix.c.txt
stall-dump-trace.txt

Dominant language
C
Stars
1.4k
Forks
174
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA-RTX/Streamline

All issues in NVIDIA-RTX/Streamline

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.