Multihead with wayland, similar to

Jonas Ådahl jadahl at gmail.com
Tue Jun 1 10:31:51 UTC 2021


On Tue, Jun 01, 2021 at 11:57:50AM +0200, Pietro Battiston wrote:
> Sorry if I'm bothering again with non-dev questions, but this should be
> my last mail on the topic. I've more or less understand where we stand
> but I need one further clarification:
> 
> Il giorno gio, 27/05/2021 alle 08.23 +0200, Jonas Ådahl ha scritto:
> > [...]
> >  * Introduce "virtual" monitor screen recording to
> >    org.freedestop.portal.ScreenCast
> >    (https://github.com/flatpak/xdg-desktop-portal) and the portal
> >    backend relevant to you.
> > 
> 
> Can you tell me if my understanding is correct?
> 
> - (starting with Mutter 40.0) GNOME can work on headless/virtual
> monitors

Correct.

> - ... so it can also work across a headless/virtual monitor and a real
> one

Correct in theory; there seems to be an issue when mixing that I haven't
fixed yet.

> - ... but PipeWire is unable to isolate one monitor out of a multi-
> monitor desktop if such monitor is a virtual one

With PipeWire, every streamed monitor is streamed in isolation, and be
it virtual or not makes no difference; what needs to know how to select
"virtual" vs "physical" is the entity that creates the streams. For the
portable approach, what is lacking is the API in
org.freedesktop.portal.ScreenCast to request screen casting of a virtual
monitor, and in the GNOME case, the hooks to org.gnome.Mutter.ScreenCast
(implemented in xdg-desktop-portal-gtk) to record from a virtual monitor
instead of a real one.

If you're interested in prototyping that let me know, so I can describe
in detail how it could work.

> - ... and so the same applies to GNOME Remote Desktop?

Currently GNOME Remote Desktop can run headlessly with a pre-created
virtual (headless) monitor; it doesn't yet know how to create them
itself.

> 
> (because my understanding of
> https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698#note_1023317
> is that GNOME Remote Desktop should be perfectly able to stream a
> single Wayland-GNOME virtual monitor...)

In theory, yes it can. For "remote login" (compared to "remote
assistance" which is what it's capable of now) it'll use these virtual
monitors and "configure" them depending on the capbilities and state of
the remote desktop clients. However, right now there is no patch that
does s/RecordMonitor/RecordVirtual/ however, more work is needed her
than switching method to record, as e.g. the size needs to come from the
client, as well as login session management etc.


Jonas

> 
> Thanks again,
> 
> Pietro
> 


More information about the wayland-devel mailing list