DLSS-G (Vulkan): pacer stops presenting after VK_SUBOPTIMAL_KHR until the swapchain size changes (frozen picture after minimize/restore on Linux/Proton)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start with CommandListContextVK::acquireNextBufferIndex() in source/platforms/sl.chi/vulkan.cpp around lines 681–699, which the issue identifies as passing VK_SUBOPTIMAL_KHR to its caller. Trace how DLSS-G handles that result and how it resumes presenting after swapchain recreation at the same extent. Reproduce the minimize and restore sequence on Linux with Vulkan Frame Generation enabled; done means presenting resumes after the app recreates the swapchain without changing its size.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Streamline version: 2.10.3 (Streamline v2.10.3.9a2e2760 - built on Tue Jan 27 11:01:47 2026), nvngx_dlssg 310.5.2, as shipped in Arknights: Endfield (Unity, Vulkan)
Platform: Linux 7.2, Proton 11-based build, NVIDIA 615.78.08, RTX 4070 Ti, KDE Plasma 6.8 Wayland session (game window on Xwayland), dxvk-nvapi with DXVK_NVAPI_VKREFLEX=1
Summary
With Frame Generation on, minimizing the game window and restoring it freezes the picture: the last frame stays on screen while the game keeps running and rendering. Around the restore, a vkAcquireNextImageKHR or vkQueuePresentKHR made by the DLSS-G pacer returns VK_SUBOPTIMAL_KHR, and from then on the pacer makes no acquire or present calls at all. DLSS-G passes the code to the game through its API error callback (the game logs [streamline][DLSS-G]: API Error: 1000001003), and the game recreates its swapchain at the same size, which doesn't bring presenting back. Only a swapchain with a different extent does (switching to fullscreen), and sl.log then says Backbuffer extent size changed …, feature needs to be recreated.
Steps
- Turn on DLSS Frame Generation, play in windowed mode.
- Minimize the game window, then restore it.
- The picture stays frozen. Alt+Enter (switch to fullscreen, so a new swapchain size) brings it back.
Where VK_SUBOPTIMAL_KHR comes from
Wine's win32u returns VK_SUBOPTIMAL_KHR from a successful acquire or present whenever the swapchain extent doesn't match the window's client rect (acquire, present; upstream wine has the same checks), which is briefly the case around a minimize/restore. The host driver also returned it for a present. Either way the call succeeded: the image was acquired, or queued for presentation.
sl.log (no extra layers; minimize/restore around 20-26-26, Alt+Enter to fullscreen at 20-26-38 and back to windowed at 20-26-40; 1000001003 is VK_SUBOPTIMAL_KHR, 2 is VK_TIMEOUT)
[20-26-26][streamline][warn][tid:2696][96s:815ms:863us]vulkan.cpp:692[acquireNextBufferIndex] m_ddt.AcquireNextImageKHR(m_device, (VkSwapchainKHR)sc->native, timeout, m_acquireSemaphore[m_acquireIndex], nullptr, &bufferIndex) - warning 1000001003
[20-26-28][streamline][info][tid:1204][98s:426ms:226us]dlss_gEntry.cpp:788[slHookVkCreateSwapchainKHR] Requesting swap-chain (2560,1440) with 3 buffers, using 4 buffers
(still frozen)
[20-26-38][streamline][info][tid:1204][108s:399ms:937us]dlss_gEntry.cpp:788[slHookVkCreateSwapchainKHR] Requesting swap-chain (3243,1824) with 3 buffers, using 4 buffers
[20-26-38][streamline][info][tid:2696][108s:456ms:224us]ngx.cpp:99[hasBackbufferSizeChanged] Backbuffer extent size changed from 2560x1440 to 3243x1824, feature needs to be recreated
[20-26-38][streamline][info][tid:2696][108s:494ms:814us]dlfgPresent.cpp:1812[operator ()] Engaging WAR4639162
(presenting again)
[20-26-40][streamline][warn][tid:2696][110s:542ms:148us]vulkan.cpp:690[acquireNextBufferIndex] m_ddt.WaitForFences(m_device, 1, &m_acquireFence[m_acquireIndex], VK_TRUE, timeout) - warning 2
[20-26-40][streamline][info][tid:1204][111s:156ms:790us]dlss_gEntry.cpp:788[slHookVkCreateSwapchainKHR] Requesting swap-chain (2560,1440) with 3 buffers, using 4 buffers
[20-26-40][streamline][info][tid:2696][111s:185ms:969us]ngx.cpp:99[hasBackbufferSizeChanged] Backbuffer extent size changed from 3243x1824 to 2560x1440, feature needs to be recreated
Call counts
In another run, a small Vulkan layer under winevulkan counted calls per second. While frozen: 0 vkAcquireNextImageKHR, 0 vkQueuePresentKHR, while the game keeps submitting work (~1300 submits/s on three queues; the queue that presents gets 120/s instead of ~600/s). After Alt+Enter: 114 presents in the first second, then 240–241/s.
Timeline (minimize, restore and Alt+Enter scripted with xdotool; the picture was already frozen from an earlier minimize when it started)
20:55:22-28 0 presents/s, 0 acquires/s; presenting queue 120 submits/s, other queues ~1300/s
20:55:28.3 minimize
20:55:31.3 restore; the game recreates its swapchain at 2560x1440
20:55:31-34 2 presents, ~2 s apart with all queues idle in between;
the second returns VK_SUBOPTIMAL_KHR (from the driver)
20:55:35-41 0 presents/s, 0 acquires/s; submits as before the minimize
20:55:41.5 Alt+Enter (to fullscreen); swapchain 3243x1824
20:55:42 114 presents
20:55:43- 240-241 presents/s; presenting queue ~600 submits/s
Expected
VK_SUBOPTIMAL_KHR is a success code: the image was acquired, the present was queued. The pacer could treat it like VK_SUCCESS and leave swapchain recreation to the app (passing the code on, if that's useful), or at least resume presenting once the app recreates its swapchain, whether or not the extent changed.
Workaround
A vulkan-1.dll proxy that turns VK_SUBOPTIMAL_KHR into VK_SUCCESS only for calls made from sl.common.dll / sl.dlss_g.dll: https://gist.github.com/zhuran24/014a2c3cead8f5c92977c364bd722a4b. With it, minimize/restore and Alt+Tab no longer freeze the picture (~241 presents/s again within a second of the restore), and the game still recreates its swapchain when the size really changes.
Notes
CommandListContextVK::acquireNextBufferIndex()in sl.chi passesVK_SUBOPTIMAL_KHRup to its caller (v2.10.3, unchanged in v2.14.16). What the DLSS-G plugin does with it isn't in the public source, so I couldn't tell whether newer versions behave differently; the game only ships 2.10.3.- Tested in windowed mode only; not tested with Frame Generation off, or on Windows.
- Lingua principale
- C
- Stelle
- 1.4k
- Fork
- 174
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA-RTX/Streamline
-
Title: Vulkan: VK_FORMAT_R8_UNORM missing in Vulkan::getFormatForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
NVIDIA-RTX/Streamline#133 ·
-
sl.log folder makes it hard to integrate, as many developer has *.log in the exclude filter for git/p4.Forse già presa @Dragon31337 l’ha presa 72 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
NVIDIA-RTX/Streamline#121 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
NVIDIA-RTX/Streamline#120 ·
-
C++23 issueApertabug triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NVIDIA-RTX/Streamline#111 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
NVIDIA-RTX/Streamline#136 · 1 commento · 1 reazione ·
Tutte le issue di NVIDIA-RTX/Streamline
Issue simili
-
ecs_ptr_from_json does not free the buffer of a string longer than 256 bytes on two error pathsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SanderMertens/flecs#2444 ·
I maintainer di solito rispondono entro 1 giorno
-
Status: Opened
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
espressif/esp-eth-drivers#201 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
libsdl-org/SDL#16788 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
cisco/ChezScheme#1110 ·
I maintainer di solito rispondono entro 1 giorno