Enable Phase Sync

Phase Sync is a frame timing management technique used to manage latency adaptively. It is available for Oculus Quest and Oculus Quest 2 apps as an option in the latest Oculus Integration package.

To activate Phase Sync adaptive frame timing, see Enable Phase Sync.

More About Phase Sync

Phase Sync provides Oculus Quest and Quest 2 apps an alternative to the traditional fixed-latency mode to manage frame timing. Fixed-latency mode means frames are composited as early as possible to avoid the missing the current frame and needing to reuse a stale frame. Stale frames can negatively impact the user experience.

In contrast to fixed-latency, Phase Sync handles frame timing adaptively according to the app’s workload. The goal of Phase Sync is to have a frame finish rendering just before the compositor needs the completed frame. This reduces rendering latency without missing frames.

The adaptive frame timing offered by Phase Sync should be enabled for apps that target both Quest and Quest 2. Note that Quest 2 has more CPU and GPU resources than Quest and can render frames too early, increasing latency, and Phase Sync helps reduce this latency.

The following image shows the difference between a fixed latency and when Phase Sync is enabled for a typical multi-threaded VR app.

Chart comparing Phase Sync to Fixed Latency

Note the following when Phase Sync is enabled:

  • There is no additional performance overhead.
  • If the app’s workload fluctuates violently or spikes frequently, Phase Sync may cause more stale frames than when Phase Sync is not enabled.
  • Late-Latching and Phase Sync typically complement each other.
  • If extra latency mode and Phase Sync are both enabled, extra latency mode will be ignored.

Enable Phase Sync

To use the Phase Sync feature, you must upgrade to the latest Oculus Integration package and use the Unity 2019.4 version or higher.

To enable Phase Sync:

  1. Open your project in Unity.
  2. From the menu, go to Edit > Project Settings.
  3. From the left navigation pane, select XR Plugin Management, and click Install XR Plugin Management.
  4. Click the Android tab and select Oculus to install the Oculus XR plugin, which enables the VR support.
  5. From the left navigation pane, under XR Plugin Management, click Oculus to open and modify the settings.
  6. Select Phase Sync to enable the frame timing management technique.

    Phase Sync option

Testing Phase Sync

After enabling Phase Sync in your app, you can verify that it is active and see how much latency it has saved by examining the logcat logs.

adb logcat -s VrApi

Logcat output when Phase Sync is active

  • If Phase Sync is not active, the Lat value is Lat=0 or Lat=1, indicating extra latency mode.
  • If Phase Sync is active, the Lat value is Lat=-1, indicating the latency is managed dynamically.

The Prd value indicates the render latency as measured by the runtime. To calculate how much latency Phase Sync has saved, compare the Prd values between when Phase Sync is active and not active. For example, if the Prd with Phase Sync is 35ms and the Prd without is 45ms, you saved 10ms of latency with Phase Sync.

To more easily compare performance with and without Phase Sync, you can turn it on and off with an adb shell setprop. You must restart the app after changing the setprop for the change to have effect.

  • Turn off: adb shell setprop debug.oculus.phaseSync 0
  • Turn on: adb shell setprop debug.oculus.phaseSync 1

Further Learning