# OpenXR long Wait times causing lag

**URL:** <https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629>\
**Category:** XR Development\
**Tags:** unreal-engine, question\
**Created:** [September 7, 2023, 7:55am UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629 "2023-09-07T07:55:17Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![xXbollerXx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xxbollerxx/32/464869_2.png) [@xXbollerXx](https://forums.unrealengine.com/u/xXbollerXx)\
**Post date:** [September 7, 2023, 7:55am UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629/1 "2023-09-07T07:55:17Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/8/5/d85a878bd5d80a6eaba05f62232e546dbcb04154.png)

As you can see, I’m getting long WaitFrame timers called by the OpenXR plugin. This is Trace data captured on the Quest 2.

Any ideas about what this could mean or how to fix it?

---

<div class="post-metadata">

**Author:** ![xXbollerXx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xxbollerxx/32/464869_2.png) [@xXbollerXx](https://forums.unrealengine.com/u/xXbollerXx)\
**Post date:** [September 7, 2023, 8:10am UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629/2 "2023-09-07T08:10:09Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/e/8/1e8e861d5318a7b9e1145d83c7ee09728b67c55e.png)

better screenshot.

---

<div class="post-metadata">

**Author:** ![xXbollerXx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xxbollerxx/32/464869_2.png) [@xXbollerXx](https://forums.unrealengine.com/u/xXbollerXx)\
**Post date:** [September 7, 2023, 2:52pm UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629/3 "2023-09-07T14:52:37Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/2/f/c2fdb8b730eec03c2259835599f8b2b32ba127fa.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/5/a05e8636e0ca9b9ec7ff8ba84795691539b9eb65.png)

found the code thats causing it, but don’t know what else to do

---

<div class="post-metadata">

**Author:** ![Rectus\_SA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rectus\_SA](https://forums.unrealengine.com/u/Rectus_SA)\
**Post date:** [September 7, 2023, 6:23pm UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629/4 "2023-09-07T18:23:24Z")

</div>

This looks like normal behavior. The xrWaitFrame function synchronizes the framerate with the frame timing of the VR hardware. If the application isn’t submitting and rendering the frame in time, it will block until the next frame. It also throttles the framerate down after several missed frames, like you can see on the first image where the baseline goes from 45 fps to 30 fps.

Not sure, but it seems like you might be CPU bound by the render thread.

---

<div class="post-metadata">

**Author:** ![xXbollerXx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xxbollerxx/32/464869_2.png) [@xXbollerXx](https://forums.unrealengine.com/u/xXbollerXx)\
**Post date:** [September 19, 2023, 11:03am UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629/5 "2023-09-19T11:03:17Z")

</div>

i just don’t understand

heres some frame times for a fast frame.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/f/d9f25d4265f3071b51f6bce93ffc3ba9b4a66871.png)

heres some frame times for a slow frame.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/a/90a3534c8beb4383b33e78abcbd42ea23ca9aca6.png)

they’re basically the same apart from the long wait for task calls in both the game and render thread

Edit: I took out the landscape foliage, trees, and it’s better but still not amazing. it’s a small level with not much going on, so I figure the FPS should be good.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/e/f9e9ea7cd2eab47bcba1707bd134b7d10857bb05.png)

---

<div class="post-metadata">

**Author:** ![Rectus\_SA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rectus\_SA](https://forums.unrealengine.com/u/Rectus_SA)\
**Post date:** [September 19, 2023, 3:52pm UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629/6 "2023-09-19T15:52:38Z")

</div>

The runtime will start to throttle the framerate back for longer periods when it sees that the application is consistently missing frames, so you get those big red chunks of 20 fps, even though the actual frame time varies inside it.

It’s hard to tell exactly how the frame timing varies without going through every frame, since the Unreal profiler includes the waiting time. I’m not sure what profiling tools are available for Oculus, but the runtime should have some sort of built-in ones for graphing the actual frame times as the runtime sees it.

---

<div class="post-metadata">

**Author:** ![bart.vsh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bart.vsh](https://forums.unrealengine.com/u/bart.vsh)\
**Post date:** [June 5, 2024, 5:04pm UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629/7 "2024-06-05T17:04:25Z")

</div>

@xXbollerXx Did you end up figuring this out?

---

<div class="post-metadata">

**Author:** ![xXbollerXx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xxbollerxx/32/464869_2.png) [@xXbollerXx](https://forums.unrealengine.com/u/xXbollerXx)\
**Post date:** [June 21, 2024, 9:58am UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629/8 "2024-06-21T09:58:41Z")

</div>

no, sorry.

---

<div class="post-metadata">

**Author:** ![DentonJC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DentonJC](https://forums.unrealengine.com/u/DentonJC)\
**Post date:** [May 29, 2025, 11:26pm UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629/9 "2025-05-29T23:26:22Z")

</div>

Im seeing the same issue on my end. I have optimized the living hell out of my app and still seeing these long WaitTimes.

I was seeing very good performance in ue 5.2, but since updating to 5.5 its been very slow like this. Not sure what changed.

---

<div class="post-metadata">

**Author:** ![Rectus\_SA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rectus\_SA](https://forums.unrealengine.com/u/Rectus_SA)\
**Post date:** [May 30, 2025, 8:16am UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629/10 "2025-05-30T08:16:08Z")

</div>

If it’s throttling to a flat framerate as in the images above, look at what is happening in the frames just before it triggers. The runtime will usually keep throttling for a while before going back to the faster framerate even when you are consistently making it.

---

<div class="post-metadata">

**Author:** ![DentonJC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DentonJC](https://forums.unrealengine.com/u/DentonJC)\
**Post date:** [May 30, 2025, 5:05pm UTC](https://forums.unrealengine.com/t/openxr-long-wait-times-causing-lag/1286629/11 "2025-05-30T17:05:32Z")

</div>

Okay so my issue was that there was some settings missing that didn’t get transfered over from our previous engine upgrade. Not sure exactly which setting made the improvement, but:

Inside DefaultDeviceProfiles.ini:

I added :

[Oculus\_Quest DeviceProfile]  
DeviceType=Android  
BaseProfileName=Android\_Mid  
bIsVisibleForAssets=False  
+CVars=r.Mobile.SoundwaveTargetFrequency=2000  
+CVars=vr.VRS.HMDFixedFoveationDynamic=1  
+CVars=r.Android.DisableVulkanSupport=0  
+CVars=r.Android.DisableOrientationPolling=1  
+CVars=r.Vulkan.AllowFragmentShadingRate=0  
+CVars=fx.NiagaraAllowGPUParticles=1  
+CVars=FX.AllowGPUSorting=1

then in DefaultEngine.ini added:

[/Script/OculusXRHMD.OculusXRHMDRuntimeSettings]  
+SupportedDevices=Quest2  
+SupportedDevices=QuestPro  
+SupportedDevices=Quest3S  
+SupportedDevices=Quest3  
FoveatedRenderingLevel=Low  
ProcessorFavor=FavorCPU

some of those settings may not be applicable to you, or the root issue, but I’m just adding all so I don’t miss any. My frame rate is back to normal now
