[systemd-devel] Multi seats setup How-to
Laércio de Sousa
laerciosousa at sme-mogidascruzes.sp.gov.br
Fri Sep 4 10:12:34 PDT 2015
Arnaud,
You must focus on the graphics/fb* syspaths (since they are tagged as
[MASTER] in udev/logind), not the drm/card* ones. You must attach the
[MASTER] devnode to a new seat in order to create it.
BTW, systemd already ships udev rules to set property ID_AUTOSEAT for
DisplayLink USB 2.0 Docking Stations, so that you don't need to attach them
manually. Maybe these rules should be updated to include USB 3.0 Docking
Stations as well.
2015-09-04 13:00 GMT-03:00 arnaud gaboury <arnaud.gaboury at gmail.com>:
> 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
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
--
*Laércio de Sousa*
*Orientador de Informática*
*Escola Municipal "Professor Eulálio Gruppi"*
*Rua Ismael da Silva Mello, 559, Mogi Moderno*
*Mogi das Cruzes - SPCEP 08717-390*
Telefone: (11) 4726-8313
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150904/aea0e795/attachment-0001.html>
More information about the systemd-devel
mailing list