NVIDIA drivers for Linux should ship a udev rule for tagging any kernel device exposed with these drivers (e.g. /dev/dri/card*) as master-of-seat, so it will work properly with systemd-logind (specially on multiseat setups). systemd-logind already tags any /dev/fb* devices as master-of-seat by default, which is OK for Nouveau open-source drivers, but not for NVIDIA binary ones, since they expose no framebuffer kernel devices.
A suitable udev rule for NVIDIA drivers is the following:
How is this supposed to work? Nvidia’s drivers don’t create sysfs entries. And if they were, it wouldn’t be SUBSYSTEM==“drm”, KERNEL==“card[0-9]*”. This rule will never get applied.
The entries you show are created by the kernel upon module insertion. They don’t match the rule given above. SUBSYSTEM==“drm”, KERNEL==“card[0-9]*” matches for in-kernel drm drivers like nouveau, which create entries in /sys/class/drm, e.g.
> ls /sys/class/drm
card0 card0-DP-2 card0-LVDS-1 controlD64
card0-DP-1 card0-HDMI-A-1 card0-VGA-1 version
My system with the nvidia drivers doesn’t have /sys/class/drm. These entries are created by the opensource drivers in the kernel. Nvidia’s drivers don’t make sysfs entries. The kernel sysfs API is GPL-only.
I’m trying to combine this rule with the other one so that this one is only applied if no DRM kernel device is found (otherwise, apply the other rule above). Do you have any suggestions?