Skip to contentSkip to conversation

DisplayPort display non-persistent device naming

systemd-devel Pekka Paalanen 2 participants 2 messages Oct 30, 2020 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 3 lines · On Thu, 29 Oct 2020 21:53:34 +0100 Marcin Kocur <[email protected]> wrote:

Hello,

this is the output of turning off and on my display (using power button):

...

Quoted 9 lines

The monitor was visible in xrandr as DP-2, after power off and on it's visible as DP-3 (DP-2 is still there "disconnected").

It's troublesome for:

- GUI display configurators

- scripting

Quoted 8 lines

- for Xorg configuration which stops to work:

Section "Monitor"
    Identifier  "DP-2"
    Option      "Primary" "true"
EndSection

Is this a bug or a feature?

Hi,

this is how the kernel DRM sub-system works. The connector names are not persistent in general, just like you can't expect that the same gfx card appears always at the same /dev/dri/cardN node if you have several. By default, cardN nodes are assigned in the order of which driver instance happens to initialize first and it can be random.

Usually hard-wired (in hardware) connectors just happen to always be discovered in the same order, and if you only have a single gfx card in your machine, the connector naming is practically persistent. This is an accident. It is not guaranteed if you have multiple cards or you have MST connectors.

MST connectors can appear and disappear dynamically. There is a KMS property that attempts to reflect something about the MST topology so that you might have some hope to match a "connector", but this is not in the connector name. The concept of a persistent connector is problematic if the connector is in a MST monitor for daisy-chaining more monitors - you can always unplug the first monitor making the connector disappear (not just become disconnected).

If you want reliable monitor matching, monitor serial number (if present) would be a more reliable method. I'm not sure Xorg config has matching rules for that though, but I suppose RandR based configuration utilities could do it.

If you want to discuss this further, dri-devel mailing list is the place - Cc'd. Nothing to do with systemd here, nor even with udev.

Thanks,
pq

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 47 lines · Pekka Paalanen
Quoted 2 lines · On Thu, 29 Oct 2020 21:53:34 +0100 Marcin Kocur [email protected] wrote:

Hello,
this is the output of turning off and on my display (using power button):

...

Quoted 11 lines

The monitor was visible in xrandr as DP-2, after power off and on it's visible as DP-3 (DP-2 is still there "disconnected").
It's troublesome for:

(quoted diff) +0 -3
-   GUI display configurators
 
-   scripting
 
-   for Xorg configuration which stops to work:
Quoted 5 lines

Section "Monitor"
    Identifier  "DP-2"
    Option      "Primary" "true"
EndSection
Is this a bug or a feature?

Hi,

this is how the kernel DRM sub-system works. The connector names are not persistent in general, just like you can't expect that the same gfx card appears always at the same /dev/dri/cardN node if you have several. By default, cardN nodes are assigned in the order of which driver instance happens to initialize first and it can be random.

Usually hard-wired (in hardware) connectors just happen to always be discovered in the same order, and if you only have a single gfx card in your machine, the connector naming is practically persistent. This is an accident. It is not guaranteed if you have multiple cards or you have MST connectors.

MST connectors can appear and disappear dynamically. There is a KMS property that attempts to reflect something about the MST topology so that you might have some hope to match a "connector", but this is not in the connector name. The concept of a persistent connector is problematic if the connector is in a MST monitor for daisy-chaining more monitors - you can always unplug the first monitor making the connector disappear (not just become disconnected).

Quoted 7 lines

If you want reliable monitor matching, monitor serial number (if present) would be a more reliable method. I'm not sure Xorg config has matching rules for that though, but I suppose RandR based configuration utilities could do it.

If you want to discuss this further, dri-devel mailing list is the place - Cc'd. Nothing to do with systemd here, nor even with udev.

If you really want to reliably match the physical connector, this proposal from Ville may help:

https://lists.freedesktop.org/archives/dri-devel/2019-June/221902.html

In fact, MST connectors already all have a PATH prop. What we're missing is a PATH prop for other connectors as well.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel