[systemd-devel] Multi seats setup How-to

arnaud gaboury arnaud.gaboury at gmail.com
Fri Sep 4 09:00:06 PDT 2015


On Thu, Sep 3, 2015 at 5:06 PM, arnaud gaboury <arnaud.gaboury at gmail.com> wrote:
>
> On Thu, Sep 3, 2015, 3:46 PM Floris <jkfloris at dds.nl> wrote:
>
>>
>> I was missing one piece of the puzzle. My USB dock station is
>> Plugable® UD-3900 USB 3.0
>>
>> --------------------------------------------------------
>> 1-
>> I had to install the kernel driver for it, following instructions per
>> this displaylink forum[0]. Once the .rpm package installed, I could
>> verify:
>> $ lsmod | grep evdi
>>
>> evdi                   36864  0
>> drm_kms_helper        122880  2 evdi,nouveau
>> drm                   331776  10 ttm,evdi,drm_kms_helper,nouveau
>>
>>
>> # ll /lib/modules/$(uname -r)/extra/evdi.ko
>> -rw-r--r--. 1 root root 63072  3 sept. 14:29
>> /lib/modules/4.1.6-200.fc22.x86_64/extra/evdi.ko
>>
>> ------------------------------------------------
>> 2-
>> Now $ loginctl seat-status seat0 returns something more interesting:
>>
>>   ├─/sys/devices/platform/evdi.0/drm/card1
>>                   │ drm:card1
>>
>> So I guess now I have indeed two cards.
>>
>
> Lets make things clear. The usb dock will be your second seat. I think
> the next steps will be enough:
>
> loginctl attach seat1 /sys/devices/platform/evdi.0/drm/card1
> loginctl attach seat1 /the path to the usb3 hub
>
> everything you didn't attach with loginctl or with an udev rule will
> be part of seat0. So if your nvidia card is for seat0 you don't have
> to write a rule for it.
>
> Ok. So it would be indeed much simpler than first thought.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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"
    ............................................................................
                  ├─/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"
                  ├─/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

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 ?




Thank you for help.


>
> Will try this later when I will get hand on the Fedora box.
> Thank you so much for your clarifications.
>
> 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