[question] can multiple compositor share surfaces

Simon Ser contact at emersion.fr
Wed May 22 06:11:48 UTC 2019

On Tuesday, May 21, 2019 6:56 PM, Damian Ivanov <damianatorrpm at gmail.com> wrote:
> Hello Simon,
> I imagine many possible usecases for example:
> Two compositors, one crashes the surfaces are not deleted and you are
> logged out to your gdm/sddm login vt, but the other compositor takes
> ownership of the surfaces and starts another 'backup compositor' or
> another example would be an alternative approach for remote control.
> Is two compositors sharing surfaces currently technical possible with wayland?

This is not possible with the Wayland core protocol.

In the X11 model, the X11 server has ownership over the windows, but
allows X11 clients to manage windows (WMs). In case the X11 server
dies, the whole session gets lost (same as a Wayland compositor dying).
Obviously this also has security implications.

This is not "surface sharing" though. It's "one process owns the
surfaces and another manages them".

It would certainly be possible to design a protocol that would allow
some Wayland clients to become "WMs". It's not obvious to me that it
would work well (it would be easy to mess up the "each frame is
perfect" design of Wayland, add complexity, add latency, etc). This is
also not something that would work in all compositors.

But if you're a compositor writer, this is technically possible.

Side note, crash resistance is something that has been investigated by
the Arcan project. I haven't looked at it in detail, but here's an
article about it:

> On Tue, May 21, 2019 at 4:06 PM Simon Ser contact at emersion.fr wrote:
> > On Tuesday, May 21, 2019 2:44 PM, Damian Ivanov damianatorrpm at gmail.com wrote:
> >
> > > Hello,
> > > Is it possible for two separate compositors to share the same list of
> > > surfaces or connect to the other compositor and receive the surfaces
> > > or connect to the wayland-0 file and receive new surfaces as well?
> >
> > Hi,
> > Can you explain what you're trying to achieve? What is your end goal?
> > Thanks,
> > --
> > Simon Ser
> > https://emersion.fr

More information about the wayland-devel mailing list