[systemd-devel] Multi seats setup How-to

arnaud gaboury arnaud.gaboury at gmail.com
Sat Sep 5 02:41:39 PDT 2015


On Fri, Sep 4, 2015 at 9:36 PM, Floris <jkfloris at dds.nl> wrote:
>
>> I can't create a new seat1, no idea why.
>>
>> Here is my current configuration:
>>
>> -nvidia card + nvidia driver + nouveau blacklisted
>> - USB 3 dock station with displaylink driver + systemd service
>> - gdm
>> - systemd 219
>>
>>
>> ---------------------------------------------------------------------------
>> $ loginctl seat-status
>>         Sessions: *1 c1
>>          Devices:
>>
>>
>> ├─/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
>>                   │ drm:card0
>>
>> ├─/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/renderD128
>>                   │ drm:renderD128
>>
>> ├─/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/graphics/fb0
>>                   │ [MASTER] graphics:fb0 "nouveaufb"
>
>
> there is still some nouveau on your system, but if this belongs to seat0
> this isn't a problem for now.

Unfortunately, I didn't care at first which nvidia driver was
installed by default in Fedora22. And of course, nouveau was the one
indeed.
So I installed nvidia driver and blacklisted nouveau.
>
>>
>> ............................................................................
>>                   ├─/sys/devices/platform/evdi.0/graphics/fb1
>>                   │ [MASTER] graphics:fb1 "evdidrmfb" [*]
>
>
>
>>                   ├─/sys/devices/platform/evdi.1/drm/card2
>>                   │ drm:card2
>>                   ├─/sys/devices/platform/evdi.1/graphics/fb2
>>                   │ [MASTER] graphics:fb2 "evdidrmfb" [*]
>
>
> [*] attach these two also to seat1, or maybe seat1 and seat2. Your the usb3
> displaylink has two monitor outputs, so you can create three seats ;-)

After nvidia driver was intalled:

 # loginctl attach seat1 /sys/devices/platform/evdi.0/graphics/fb1
# systemctl restart systemd-udev-trigger.service
$  loginctl list-seats

SEAT
seat0
seat1

2 seats listed. AT LEAST

Thank you for your help and advices.

>
>>                   ├─/sys/devices/virtual/misc/kvm
>>                   │ misc:kvm
>>                   └─/sys/devices/virtual/misc/rfkill
>>                     misc:rfkill
>>
>> -------------------------------------------------------------------------------------
>>
>> # loginctl attach seat1 /sys/devices/platform/evdi.1/drm/card2
>> then same for usb devices
>>
>>
>> $ ls /etc/udev/rules.d
>> 72-seat-drm-platform-evdi_0.rules
>> 72-seat-drm-platform-evdi_1.rules
>> 72-seat-input-pci-0000_00_14_0-usb-0_10_4_1_1_1.rules
>> 72-seat-input-pci-0000_00_14_0-usb-0_10_4_2_1_2.rules
>> 72-seat-usb-pci-0000_00_14_0.rules
>> 72-seat-usb-pci-0000_00_14_0-usb-0_10_4.rules
>> 99-displaylink.rules
>
>
>
>> 99-nvidia_seats.rules

I cleaned the /etc/udev/rules.d directory.
>
>
> If your nvidia card is only for seat0, you can remove this rule.
> (everything without a rule belongs to seat0)
>
>
>>
>> NB: All the 72-seat* have been created when I run $ loginctl attache
>> seat1 MyDevice
>>
>> ----------------------------
>> $ udevadmn info /sys/devices/platform/evdi.1/drm/card2
>>
>> P: /devices/platform/evdi.1/drm/card2
>> N: dri/card2
>> E: DEVNAME=/dev/dri/card2
>> E: DEVPATH=/devices/platform/evdi.1/drm/card2
>> E: DEVTYPE=drm_minor
>> E: ID_FOR_SEAT=drm-platform-evdi_1
>> E: ID_PATH=platform-evdi.1
>> E: ID_PATH_TAG=platform-evdi_1
>> E: ID_SEAT=seat1
>> E: MAJOR=226
>> E: MINOR=2
>> E: SUBSYSTEM=drm
>> E: TAGS=:seat:seat1:uaccess:
>> E: USEC_INITIALIZED=160111782
>> ------------------------------------------------------------
>>
>> $ cat /etc/udev/rules.d/99-displaylink.rules
>>  (shipped with the displaylink .rmp driver)
>> ---------------------------------------
>> ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR}=="DisplayLink",
>> MODE="0660", RUN+="/bin/systemctl start displaylink.service"
>> ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_VENDOR}=="DisplayLink",
>> RUN+="/bin/systemctl stop displaylink.service"
>> ----------------------------------------------
>>
>> $ cat /etc/udev/rules.d/99-nvidia_seats.rules
>> ----------------------------------------------------------
>> # provide a suitable udev rule to tag your NVIDIA card as "master-of-seat"
>>   SUBSYSTEM=="drm", KERNEL=="card[0-9]*", ATTRS{vendor}=="0x10de",
>> DRIVERS=="nvidia", TAG+="master-of-seat"
>>
>>   SUBSYSTEM=="pci", ATTRS{vendor}=="0x10de", DRIVER=="nvidia",
>> TAG+="seat", TAG+="master-of-seat"
>> ----------------------------------------------------------------
>>
>> cat /etc/udev/rules.d/72-seat-drm-platform-evdi_1.rules
>> -----------------------------------------------
>> TAG=="seat", ENV{ID_FOR_SEAT}=="drm-platform-evdi_1", ENV{ID_SEAT}="seat1"
>> -------------------------------------------------
>>
>> cat
>> /etc/udev/rules.d/72-seat-input-pci-0000_00_14_0-usb-0_10_4_1_1_1.rules
>> --------------------------------------
>>
>> TAG=="seat", ENV{ID_FOR_SEAT}=="input-pci-0000_00_14_0-usb-0_10_4_1_1_1",
>> ENV{ID_SEAT}="seat1"
>> ---------------------------------------------------
>>
>>
>>
>> # systemctl restart systemd-udev-trigger.service (or even reboot)
>>
>> $ loginctl show-session (two users logged in)
>>   SESSION        UID USER             SEAT
>>          2       1001 Martin           seat0
>>          1       1000 Louis            seat0
>>         c1         42 gdm              seat0
>> 3 sessions listed.
>>
>> $ loginctl list-seats
>>
>> SEAT
>> seat0
>>
>> 1 seats listed.
>>
>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>
>> What am I missing? Why can't I create seat1 ?
>> Maybe # rm /etc/udev/rules.d/72*  and try again ?
>>
>>
>
> attach the [MASTER] graphics:fb* to seat1 and it should work.
>
>
> success,
>
> floris
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel



-- 

google.com/+arnaudgabourygabx


More information about the systemd-devel mailing list