How to attach multiple heads to one weston_output correctly.

Pekka Paalanen ppaalanen at gmail.com
Thu Sep 12 07:49:59 UTC 2019


On Wed, 11 Sep 2019 23:58:07 -0400
Sichem Zhou <sichem.zh at gmail.com> wrote:

> Hi wayland devs,
> 
> I am trying to run multiple monitors in clone mode, which requires one
> output to drive multiple heads. While I can create output for every head
> and attach them with no problem (defaultly new output comes on the right).
> I can't quite get clone mode to work properly.
> 
> Here is steps I do right now:
> In the head_changed_listener:
> 1. Find output in the list,
> 2. If we don't have one, create_with_head.
> 3. If we found one, break, attach and disable the output.
> 4.set_mode(current).
> 5.set_scale(1).
> 6.set_transformation(normal).
> 7.enable_output.
> 
> I got black screen once new monitor attached. Any steps I am missing from
> here? Thanks

Hi,

the shared-crtc clone mode which you are trying to set up completely
depends on hardware support. If you happen to choose two heads that the
hardware does not support cloning, you don't get any error back during
configuration (this could be regarded as a bug in libweston).

I had the idea that you should get back some signal about the output
being forcefully disabled (weston_output::destroy_signal and
weston_compositor::output_destroyed_signal) once it tries to update the
first time, but now I'm not sure if I implemented that.

This inconvenience is because we haven't implemented testing the
configuration during weston_output_enable(). It is tricky to implement,
because we would need the renderer to produce a framebuffer before we
can test. It will also depend on atomic modesetting in the kernel.

We really should handle KMS failures better and do the testing at
configuration stage, but it hasn't been a development priority yet.
Sorry.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20190912/0a456b3d/attachment.sig>


More information about the wayland-devel mailing list