Multiple DRI card detection in compositor systemd units

Pekka Paalanen ppaalanen at
Thu Sep 23 13:39:22 UTC 2021

On Wed, 22 Sep 2021 16:16:48 +0000
"Hoosier, Matt" <Matt.Hoosier at> wrote:

> The /dev/dri/by-path idea works, I suppose, if you have different
> physical graphics cards. In my case, that's not true. These are
> virtualized cards that the silicon vendor's DRM drivers use to expose
> different subsets of DRM resources as different cards. So there's
> only one /dev/dri/by-path card here. Think: DRM leases, but with the
> lessees popping out as card nodes rather than arranged dynamically
> using the drm ioctl()'s to manufature leases.

That's the standard solution though, I believe: use devpath for
matching the device, because the device doesn't randomly jump from a
physical connector (e.g. PCIe slot) to another.

But since you have virtual cards, that obviously doesn't work. I'm
afraid you need to solve this with your virtual card provider. Maybe
there could be some sort of virtual bus with persistent addresses which
would make devpath reliable?

I wouldn't expect drmGetVersion()->name to differ between the (virtual)
devices since they are all using the same driver, right?


> The use-case here is to allow separate DRM domains for each of
> several containers. It's not really desirable to try to funnel
> everybody's graphics through a common compositor that runs all the
> connectors.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the wayland-devel mailing list