[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Setup a Nvidia multiseat



Op Sun, 10 Aug 2014 04:32:00 +0200 schreef Hugo Vanwoerkom <hvw59601@care2.com>:


<snip>

Could you elaborate? You mean that if you connect, lets say a ps/2 keyboard and an USB keyboard, 2 Nvidia video cards with 2 monitors attached and 2 USB mice and I run systemd, then it will figure out how to make a 2-seater out of this. Meaning 2 users logged on simultaneously. Surely you must set up a proper xorg.conf, how much should it contain? Have you actually tried this or is it your conclusion that "systemd ought to do this"?

Hugo


Three steps are necessary:

1 - Create a /etc/X11/xorg.conf.d/90-nvidia.conf
Unfortunately, this step is always required for a Nvidia card, only the "MatchSeat" option has to be added.
(note, I don't have a xorg.conf file)

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

2 - Tag the Nvidia card for seat1 as a "master-of-seat"
This step is a litter harder. Since you have to figure out where your Nvidia card is. If your card has hdmi you can find the location by looking at the sound card.

$ loginctl seat-status seat0

...
  ├─/sys/devices/pci0000:00/0000:00:05.0/0000:02:00.1/sound/card1
  │ sound:card1 "NVidia"
...
The video part will be
/sys/devices/pci0000:00/0000:00:05.0/0000:02:00.0

Write an udev rule
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"

reboot or use 'udevadm trigger' to apply the new rule

3 - Attach a mouse, keyboard and soundcard
Use loginctl seat-status seat0 to find your devices and "move" them to seat1 with
loginctl attach seat1 <your device>
If you use a usb-hub for the mouse and keyboard attach the hub, so every device you plug into the hub will attached to seat1

You can verify your setup with
$ loginctl seat-status seat1

seat1
	Sessions: *c2
	 Devices:
		  ├─/sys/devices/pci0000:00/0000:00:05.0/0000:02:00.0
		  │ [MASTER] pci:0000:02:00.0
		  ├─/sys/devices/pci0000:00/0000:00:05.0/0000:02:00.1/sound/card1
		  │ sound:card1 "NVidia"
├─/sys/devices/pci0000:00/0000:00:05.0/0000:02:00.1/sound/card1/input14
		  │ │ input:input14 "HDA NVidia HDMI/DP,pcm=3"
└─/sys/devices/pci0000:00/0000:00:05.0/0000:02:00.1/sound/card1/input15
		  │   input:input15 "HDA NVidia HDMI/DP,pcm=7"
                  ...

Finally,
Step 1 is always necessary for a Nvidia card. I don't know if the nvidia-xconfig program is able to add the "MatchSeat" option. Don't use the xorg.conf file, because only seat0 will use it. So the X server on seat1 will give you an error "No device found"

Maybe the Nvidia Maintainers will help us in the future with Step 2. I think it is possible that all Nvidia graphic devices get the "master-of-seat" tag. I will ask them.

Step 3 is always required for a multiseat setup. Unless you have a open source displaylink device.

succes,

floris


Reply to: