How to attach multiple heads to one weston_output correctly.

Sichem Zhou sichem.zh at gmail.com
Fri Sep 13 03:26:20 UTC 2019


Hi pq,

Thanks for your help. Tonight I tried again with no luck, as weston_output
has no disable signal, I was trying to defer output creation until all the
heads are connected, it didn't work, the rest of the compositor
functionalities seems to work, it answers vt_switching and keybindings.
Just there was no actual output.

I digged a bit into weston_output _enable, it does iterate through all
heads in 'pick_crtc'. If I understand correctly, we need to create crtc for
every heads.

While this didn't work, I felt back to create additional output for new
heads. However vI found an interesting bug(it's a weird one). If I try to
connect to new monitors where Weston is running, the new monitor did light
up but how image freezed (rest still working, vt_switching, etc). But If I
try to move the cursor while connecting to new monitors, my image would not
freeze. The same behavior exits both in Weston and my compositor (which
based on libweston). I tried on sway, it didn't have the same issue.  I
wish I could provide more info but in this situation, I really don't know
how to debug.

Thanks,
Sichem

Le jeu. 12 sept. 2019 03 h 50, Pekka Paalanen <ppaalanen at gmail.com> a
écrit :

> 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 --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20190912/7bbbd168/attachment.html>


More information about the wayland-devel mailing list