Skip to content

clutter/frame-clock: Evenly space updates when presentation times are zero

Daniel van Vugt requested to merge vanvugt/mutter:throttle-nvidia into master

This is for the Nvidia-X11 driver where last_presentation_time_us is always zero. Other drivers should be unaffected.

The existing calculate_next_update_time_us algorithm only provides a guarantee of not scheduling faster than the refresh rate in the presence of a valid last_presentation_time_us. When last_presentation_time_us is zero there is no solid foundation to guarantee we're not occasionally scheduling too early. So introduce one now.

By introducing a hard guarantee that updates are never scheduled faster than the refresh rate, we avoid keeping Nvidia's triple (or quad?) buffer queue full. So this avoids the high latency and random stalls experienced on Nvidia.

Closes: #818 (closed), #1273 (closed), #1287 (closed), #1291 (closed), #1583 (closed)

Edited by Daniel van Vugt

Merge request reports