Nondeterministic graphic cards device names

graphic cardkernelmultiseatudevxorg

My system contains three graphic cards, one radeon and two nvidia.

I'm trying to configure a multiseat setup but the "device name" of the graphic cards is not stable, it change from one boot to another.

exemple

  • boot 1

    Radeon card
    /sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/drm/card1

    Nvidia 1 card
    /sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/drm/card0

    Nvidia 2 card
    /sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/drm/card2

  • boot 2

    Radeon card
    /sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/drm/card0

    Nvidia 1 card
    /sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/drm/card1

    Nvidia 2 card
    /sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/drm/card2

etc…

This problem make any multiseat configuration unstable (i use loginctl) because assigning a device to a seat is based on these device names. Another real issue is that this alters the connector names of the graphic cards (ie VGA-1 becomes VGA-2 etc..) both at the kernel level and Xorg level so i cannot do any monitor configuration through xorg.conf nor use the "video=" kernel option, which is needed in my setup to force to enable an old crt monitor without EDID.

Is it normal that this "card0" "card1".. is nondeterministic, is it a bug or something that can be configured (udev or something like that) ?

EDIT:

As user @dirkt said on the comments, at systemd level it is nondeterministic and in fact the multiseat configuration in itself is OK. My main issue is the unreliability of the output names. I need them at the kernel level to specify "video=VGA-1:e" to force output to be enabled. And i need at xorg level to use
Option "Monitor-VGA-1" "Monitor-x".

Best Answer

I have not managed to fix the issue but I've found a workaround for output names:

  • In the kernel boot options, I activate both three VGA connectors:

    video=VGA-1:e video=VGA-2:e video=VGA-3:e
    
  • In the device section of xorg.conf i define monitor option for all possible outputs, unrelevant ones are simply ignored:

    Option "Monitor-VGA-1"  "my-monitor"
    Option "Monitor-VGA-2"  "my-monitor"
    Option "Monitor-VGA-3"  "my-monitor"
    

This is hackish but it solves my main issues.

I still not accept this answer now because I'm interested in a better, cleaner solution.

Related Question