AW: Re: Weston: Single CRTC cloning on multiple connectors. How?

Sebert, Holger.ext Holger.Sebert.ext at karlstorz.com
Mon Mar 29 15:00:08 UTC 2021


Hi Pekka,

thanks for pointing me to "drm_info".

I built and installed it and indeed, all Encoder entries look
like this:

...
├───Encoders
│   ├───Encoder 0
│   │   ├───Object ID: 94
│   │   ├───Type: TMDS
│   │   ├───CRTCS: {0, 1, 2}
│   │   └───Clones: {0}
...

where the index ranges from 0 to 9.

Does that mean that the kernel doesn't support cloning displays?

The system is x86_64 with Intel UHD Graphics 630. I cannot image
that such consumer grade hardware does not support such a standard
use-case as display cloning.

Is there maybe some Kernel option that I need to enable?

For testing, I installed Ubuntu 2020.04 and there display cloning
worked perfectly (but on Xorg, not Wayland).

---

By the way, here are the versions I am using:
    Kernel -> 5.10.25
    libdrm -> 2.4.104
    mesa -> 21.0.0
    wayland-protocols -> 1.20
    wayland -> 1.19

Best,
Holger

________________________________________
Von: Pekka Paalanen <ppaalanen at gmail.com>
Gesendet: Freitag, 19. März 2021 15:48:21
An: Sebert, Holger.ext
Cc: wayland-devel at lists.freedesktop.org
Betreff: [Ext] Re: Weston: Single CRTC cloning on multiple connectors. How?

On Fri, 19 Mar 2021 12:40:33 +0000
"Sebert, Holger.ext" <Holger.Sebert.ext at karlstorz.com> wrote:

> Hi,
>
> I hope this is the right place to ask my question, if not, please
> point me into the right direction. Googling around did not bring
> any useful results. --
>
> I am using Weston 9.0.0 and would like to duplicate monitor output
> on various connectors (HDMI, DisplayPort, etc.), i.e. use clone-mode.
>
> I tried the "same-as" parameter in the "output"-section of my
> weston.ini file, but it did not have the desired effect. The relevant
> sections of my weston.ini look like follows:
>
>       [core]
>       backend=drm-backend.so
>
>       ...
>
>       [output]
>       name=HDMI-A-1
>       mode=1920x1080
>
>       [output]
>       name=DP-1
>       same-as=HDMI-A-1
>
>       [output]
>       name=DP-2
>       same-as=HDMI-A-1
>
> The connector names are those which I found in "/sys/class/drm".
> There is exactly one graphics card in my machine ("card0").
>
> Interestingly, setting the resolution to something different than
> "1920x1080" works. So Weston does indeed recognize these entries.
> However, it does not clone the display.
>
> How do I activate display cloning in weston.ini?

Hi,

it looks like you are doing the right thing with weston.ini. I'm
guessing that your hardware does not support what you want though.
Support for shared CRTC clone mode in hardware is rare and might be
limited to just two very particular connectors.

Try this tool:
https://github.com/ascent12/drm_info

It prints a lot of information about what the kernel DRM driver exposes
of the hardware. It also shows which cloning scenarios should be
possible, but requires some deciphering.

For each "Connector", there is a list "Encoders". The list contains the
indices of the encoders that are possible to use with the connector.

For each "Encoder" you have "Clones" which is a list of encoders that
can be clones of each other when driven by the same CRTC. The problem
is that usually this list has only the encoder itself and no other,
meaning that shared-CRTC cloning is not possible. Additionally,
encoders have "CRTCS" which is a list of CRTCs that could be used with
this encoder.

For normal output the pipeline is:
CRTC -> encoder -> connector

With cloning, the pipeline would be:
CRTC --> encoder 1 -> connector A
     '-> encoder 2 -> connector B

If you can find two encoders that each list each other in their clones,
that's encouraging. Then figure out which connectors could be used with
these encoders. Then configure Weston to clone those connectors and
hope it works. It may help to start experimenting with just two
connectors, and keep everything else off until that works.


Thanks,
pq


More information about the wayland-devel mailing list