gud: set PATH connector property

Simon Ser contact at emersion.fr
Thu Mar 2 11:49:14 UTC 2023


On Wednesday, March 1st, 2023 at 19:07, Noralf Trønnes <noralf at tronnes.org> wrote:

> > Would it be possible to set the PATH connector property based on the
> > USB port used by gud?
> > 
> > This would give user-space a persistent identifier for the connector:
> > if the user plugs in a USB display on a given port, the PATH would be
> > the same even if the machine rebooted or the displays were plugged in
> > in a different order.
> > 
> > DP-MST already sets this. User-space can use this property to store
> > output configuration metadata.
> 
> drm_mode_connector_set_path_property() docs:
> 
> This creates a property to expose to userspace to specify a connector
> path. This is mainly used for DisplayPort MST where connectors have a
> topology and we want to allow userspace to give them more meaningful names.
> 
> Here it says that it's about giving meaningful names to connectors, I
> think it would be useful to know that a HDMI-A connector is on a USB
> adapter for instance and not on the laptop/motherboard.

FWIW, the DP-MST PATH properties look like "mst:92-1".

> You mention output configuration however, why does userspace use the
> path to a connector when storing the multi display config and not some
> unique property on the displays themselves like the serial number?

It depends on the use-case. The reason why I'm asking about PATH is
that Sway users want a way to configure specifically by port and not by
sink. For instance, let's say I have a one USB display at home and
another USB display at work. I always use the same USB port to connect
USB displays. I want the USB display to always be arranged on the left
of my primary display, as long as that USB port is used, regardless of
which specific USB display is plugged in.

See the wlroots patch [1] and the original Sway issue [2].

[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3979
[2]: https://github.com/swaywm/sway/issues/7062


More information about the dri-devel mailing list