I keep running into hitches in my project packaged in Unreal Engine 5.8.3 while in true fullscreen mode (even in a clean Third Person Template project).
Your CPU profile already shows the hitch is not a game-thread spike. IDXGIOutput::WaitForVBlank_NoBusyWait is about 96 ms of the 148 ms CPU frame, and D3D12_Present is almost the same. That is the swap chain waiting on a vblank while the GPU is idle, which is what you get when the game is fullscreen on a display that is not the one the engine is presenting to, or when the frame rate and the monitor are fighting.
You are on Windows 10 with three monitors at 75 Hz and you only tested on one of them. Try r.D3D12.AllowFullscreenMode=1 and r.D3D12.AllowTearing=1 together, and also r.D3D12.UseAllowTearing=1 which you already tried alone. Without both fullscreen mode and tearing, Present still waits for vblank even if the game is rendering faster than 75 fps. In the NVIDIA control panel, set the game to the specific monitor (not “auto-select”), and set VSync to off for that monitor, not Fast. Fast vsync still inserts a wait when the engine presents on the wrong output.
Also set r.VSync=0 and rhi.SyncSlackMS=0, and make sure the packaged game is not using the editor’s windowed mode. In Project Settings, Engine > General Settings, set Default Window Mode to Fullscreen and Default Window Width/Height to the resolution you actually want, so it does not fullscreen onto a different display. If the hitch disappears when you run the packaged build with only one monitor enabled, it is the multi-monitor present path, not Lumen or Nanite. The GPU numbers in that same capture are under 0.5 ms on the GPU and 1.5 ms on the CPU, so those console variables that zero out streaming and occlusion are not the cause of these spikes.
Vsync is already disabled in both Unreal Engine and the Nvidia Control Panel.
I tested the commands you suggested, but the result is the same.
Also, these settings do not exist here: Project Settings, Engine > General Settings, set Default Window Mode to Fullscreen and Default Window Width/Height.
I tested with a single monitor (I disconnected the other two), but the result was the same.
I don’t understand why IDXGIOutput::WaitForVBlank_NoBusyWait is causing those stutters, especially since there is no clear indication of the underlying cause. I’ve tested all the fixes related to synchronization between Unreal Engine and Windows, but nothing works.
Does anyone have any other ideas on how I could identify or fix these stutters?
I encountered similar periodic hitches in UE 5.8.4 and found a reproducible workaround for my DX11 and DX12 Shipping builds. Sharing my findings in case they help you investigate.
Game hitched approximately every 1.06 seconds in Shipping Fullscreen mode (60 fps bounded), while Development build and windowed mode were smooth.
Alt-Tab or changing resolution temporarily removed the hitch; loading another map brings it back.
Switching Windows from 59.94 Hz to 60 Hz removed it; switching back reproduced it.
DX11 workaround:
while using WindowedFullscreen instead of Fullscreen, this setting in DefaultEngine.ini eliminated the hitch in my tests:
[SystemSettings]
r.D3D11.UseAllowTearing=0
DX12 workaround:
There is a specific difference in Development vs Shipping. In WindowsD3D12Viewport.cpp, for Developmenet build startup of FRHIFrameFlipStatTrackingRunnable is guarded by UE_INPUT_LATENCY_TRACKING (which is disabled in Shipping).
I added project-side C++ code to start this existing worker once the DX12 game viewport and its native swap chain were available:
bool UMyAwesomeGameInstance::TickPlayTime(float DeltaTime)
{ #if PLATFORM_WINDOWS && UE_BUILD_SHIPPING
if (!bDX12FlipTrackerStarted && GEngine && GEngine->GameViewport && GDynamicRHI && GDynamicRHI->GetInterfaceType() == ERHIInterfaceType::D3D12 && FSlateApplication::IsInitialized()) {
const TSharedPtr Window = GEngine->GameViewport->GetWindow();
FSlateRenderer* Renderer = FSlateApplication::Get().GetRenderer();
FRHIViewport* Viewport = Window && Renderer ? static_cast<FRHIViewport*>(Renderer->GetViewportResource(Window)) : nullptr;
IDXGISwapChain NativeSwapChain = Viewport ? static_cast<IDXGISwapChain*>(Viewport->GetNativeSwapChain()) : nullptr;
TRefCountPtr SwapChain;
if (NativeSwapChain && SUCCEEDED(NativeSwapChain->QueryInterface(IID_PPV_ARGS(SwapChain.GetInitReference())))) {
FRHIFrameFlipStatTrackingRunnable::Create(MoveTemp(SwapChain));
bDX12FlipTrackerStarted = true;
}
} #endif
…
Here, SwapChain is a TRefCountPtr obtained from the game viewport’s native swap chain. I keep the worker alive across map loads and balance the call during shutdown:
FRHIFrameFlipStatTrackingRunnable::Release();
The implementation is guarded for Windows Shipping and checks that the active RHI is DX12. It uses the RHICore module and its internal DXGIUtilities.h header.
The worker waits for vertical blank on its own thread and reads presentation statistics. This helped on my machine, but I still Don’t understand why its activity prevents the timing/hitch problem…