[systemd-devel] Multi seats setup How-to
arnaud gaboury
arnaud.gaboury at gmail.com
Thu Sep 3 06:25:54 PDT 2015
On Thu, Sep 3, 2015 at 2:12 PM, Floris <jkfloris at dds.nl> wrote:
> Op Thu, 03 Sep 2015 13:51:06 +0200 schreef arnaud gaboury
> <arnaud.gaboury at gmail.com>:
>
>> On Thu, Sep 3, 2015 at 1:26 PM, arnaud gaboury <arnaud.gaboury at gmail.com>
>> wrote:
>>>
>>> I plan to use the systemd mutli-seat features, but I am not sure at
>>> all how I must proceed and in waht order. I understand the main
>>> principle for mouse and keyboard: detect the device then
>>> $ loginctl attach seatNumber DevicePath
>>> As for the graphic card, I am lost.
>>>
>>> OS: Fedora 22
>>> gdm
>>> 1 nvidia card
>>> 1 USB3 plugable dockin station for the second monitor
>>> Nvidia driver (I would like to avoid using Nouveau if possible).
>>>
>
>> Following this old blog[0], it seems I must FIRST assign the graphic
>> card to seat1. So I guess first is to take care of the /etc/X11 stuff.
>> Once I have correctly configured it, I must be able to see two cards,
>> right ?
>>
>
> Here are the steps I took to make my multi seat with Debian Sid:
>
> 1. Install the nvidia drivers and blacklist the nouveau drivers.
> 2. Locate with loginctl seat-status seat0 the address of the graphic
> device you want to be seat1
>
> Maybe there is no graphic device, but I have:
> ├─/sys/devices/pci0000:00/0000:00:05.0/0000:02:00.1/sound/card2
> │ sound:card2 "NVidia"
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.
$ udevadmin info /sys/devices/platform/evdi.0/drm/card1
P: /devices/platform/evdi.0/drm/card1
N: dri/card1
E: DEVNAME=/dev/dri/card1
E: DEVPATH=/devices/platform/evdi.0/drm/card1
E: DEVTYPE=drm_minor
E: ID_FOR_SEAT=drm-platform-evdi_0
E: ID_PATH=platform-evdi.0
E: ID_PATH_TAG=platform-evdi_0
E: MAJOR=226
E: MINOR=1
E: SUBSYSTEM=drm
E: TAGS=:seat:uaccess:
E: USEC_INITIALIZED=51309590
NB: no driver section. Is it still ok ?
-----------------------------------------------------------
3-
A new udev rule is shipped with the package.
/etc/udev/rules.d/99-displaylink.rules
-------------------------------------------------------------
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"
----------------------------------------------------
and the systemd service is active and loaded when I plug the dock station
----------------------------------------------------------------
Now following your advices, I shall write:
/etc/udev/rules.d/72-seat-1.rules
SUBSYSTEM=="drm", DEVPATH=="/devices//platform/evdi.0/drm/card1",
TAG+="seat", TAG+="master-of-seat", ENV{ID_AUTOSEAT}="1",
ENV{ID_SEAT}="seat1"
and this:
/etc/udev/rules.d/99-nvidia_seats.rules
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"
Then do the xorg.conf stuff, reload and attach keyboard + mouse ?
> so the the gpu is /sys/devices/pci0000:00/0000:00:05.0/0000:02:00.0
> use udevadm info /sys/bus/pci/devices/0000:00:05.0/0000:02:00.0
> to make sure the address is right
>
> $ udevadm info /sys/bus/pci/devices/0000:00:05.0/0000:02:00.0
> P: /devices/pci0000:00/0000:00:05.0/0000:02:00.0
> E: DEVPATH=/devices/pci0000:00/0000:00:05.0/0000:02:00.0
> E: DRIVER=nvidia
> E: ID_AUTOSEAT=1
> E: ID_MODEL_FROM_DATABASE=GF119 [GeForce GT 610]
> E: ID_PCI_CLASS_FROM_DATABASE=Display controller
> E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
> E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
> E: ID_SEAT=seat1
> E: ID_VENDOR_FROM_DATABASE=NVIDIA Corporation
> E: MODALIAS=pci:v000010DEd0000104Asv00003842sd00002615bc03sc00i00
> E: PCI_CLASS=30000
> E: PCI_ID=10DE:104A
> E: PCI_SLOT_NAME=0000:02:00.0
> E: PCI_SUBSYS_ID=3842:2615
> E: SUBSYSTEM=pci
> E: TAGS=:seat1:seat:master-of-seat:
> E: USEC_INITIALIZED=4003578
>
> 3. Make an udev rule for the gpu:
> $ cat /etc/udev/rules.d/72-seat-1.rules
> SUBSYSTEM=="pci", DEVPATH=="/devices/pci0000:00/0000:00:05.0/0000:02:00.0",
> TAG+="seat", TAG+="master-of-seat", ENV{ID_AUTOSEAT}="1",
> ENV{ID_SEAT}="seat1"
>
> 4. create a x11 conf for the nvidia device
> $ cat /etc/X11/xorg.conf.d/90-nvidia.conf
> Section "Device"
> Identifier "Seat0"
> Driver "nvidia"
> BusID "PCI:1:0:0"
> Option "ProbeAllGpus" "FALSE"
> MatchSeat "seat0"
> EndSection
>
>
> Section "Device"
> Identifier "Seat1"
> Driver "nvidia"
> BusID "PCI:2:0:0"
> Option "ProbeAllGpus" "FALSE"
> MatchSeat "seat1"
> EndSection
>
>
> 5. reboot or trigger udev to load the rule
> 6. Check if the seat is created
> $ loginctl list-seats
> SEAT
> seat0
> seat1
>
> 2 seats listed.
>
> 7. use loginctl attach and connect all other devices to seat1
>
>
> success,
>
> floris
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[0]http://www.displaylink.org/forum/showthread.php?t=64026
--
google.com/+arnaudgabourygabx
More information about the systemd-devel
mailing list