Minimal latency on multiple monitors using Wayland

Pekka Paalanen ppaalanen at
Wed Jan 12 12:00:14 UTC 2022

On Sun, 9 Jan 2022 10:11:55 +0200
Shachar Arieli <shachar.arieli at> wrote:

> My application renders frames from a camera to multiple physical monitors.
> The application is highly sensitive to latency which needs to be as low as
> possible.
> It is currently running on Ubuntu 20.04 but can be upgraded if required. I
> am using the Nvidia RTX card.
> Under X I open a full screen window for each physical monitor placing each
> window on its own x-screen.
> This allows me to bypass the compositor whilst maintaining v-sync and
> achieve low latency on all windows / monitors.
>    1. Is it possible under Wayland to bypass the composition and render
>    directly to screen for multiple monitors/windows?


with FOSS drivers, yes, but not by force: a Wayland compositor skips
compositing when it can, on its own.

Your app would not "render directly to screen". Instead, your app
renders to an off-screen buffer, which the compositor may or may not
decide to show directly without compositing.

>    2. Is it possible to sync (v-sync) each window to a different physical
>    monitor (This is only possible under X when each monitor is on its own
>    x-screen)?

Yes. Wayland compositors tend to be implemented with independent
refresh loops for each output, and what you want should work
automatically when each window is showing on just one output. V-sync is
the default.

>    3. How much latency is expected to be added by the Wayland compositor
>    when rendering a new full frame at 60fps)?

Depends on the compositor, how it chooses to update the outputs, and
how your app schedules its frames. It should be easy to get less than
one refresh period latency from draw-to-light, even composited,
assuming your drawing doesn't take too long.

If you happen to depend on NVIDIA proprietary drivers, then the story
could be very different. I don't know what the situation is there.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the wayland-devel mailing list