You are reading

Simple multiseat setup on Fedora 17

Fedora 17 (Beefy Miracle) adds rudimentary support for multi-seat configurations. However, documentation on setting up multi-seat configurations is rather sparse. The following guide should get you started. This guide assumes that you are comfortable working on the command line and that you know how to change init levels.

Multi-seat support on Linux is essentially at a beta state. While we think that the risk is small, please be aware that you can damage your system.

Hardware requirements

  • Two video cards
  • Two mice
  • Two keyboards

On the test system, we will use an ASRock motherboard with two ATI/AMD RadeonHD video cards: HD6850 and HD2400XT. The 6850 is on the PCIe x16 slot and the 2400 is on the PCIe x4 slot.

Step 1: Identifying hardware

Once all hardware is installed and Fedora 17 is running on your primary monitor, reboot and enter into run-level 3 by adding the number 3 in grub2 (note artificial line-breaks inserted for formatting and not needed in actual command-line):

linux   /vmlinuz-3.4.0-1.fc17.x86_64 \
root=UUID=c0db7f1b-8622-4d30-9f98-47c806f6c79f ro rd.md=0 rd.lvm=0 \
rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 \
LANG=en_US.UTF-8 3

Upon booting into a virtual terminal, login as root. By default, all hardware is assigned to a special seat called seat0. We can now list all the hardware available on the machine:

[root@kaito ~]$ loginctl seat-status seat0
seat0
Sessions: *11
Devices:
├ /sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
(input:input1) "Power Button"
├ /sys/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0
(input:input0) "Power Button"
├ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0
(drm:card0)
├ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/graphics/fb0
(graphics:fb0) "radeondrmfb"
├ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.1/sound/card1
(sound:card1) "Generic"
│ └ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.1/sound/card1/input15
(input:input15) "HD-Audio Generic HDMI/DP,pcm=3"
├ /sys/devices/pci0000:00/0000:00:11.0/ata4/host3/target3:0:0/3:0:0:0/block/sr0
(block:sr0)
├ /sys/devices/pci0000:00/0000:00:11.0/ata4/host3/target3:0:0/3:0:0:0/scsi_generic/sg2
(scsi_generic:sg2)
├ /sys/devices/pci0000:00/0000:00:12.0/usb3
(usb:usb3)
│ ├ /sys/devices/pci0000:00/0000:00:12.0/usb3/3-1/3-1:1.2/0003:046D:C52B.0006/input/input5
│ │ (input:input5) "Logitech Unifying Device. Wireless PID:101b"
│ └ /sys/devices/pci0000:00/0000:00:12.0/usb3/3-1/3-1:1.2/0003:046D:C52B.0006/input/input6
(input:input6) "Logitech Unifying Device. Wireless PID:200a"
├ /sys/devices/pci0000:00/0000:00:12.1/usb4
(usb:usb4)
├ /sys/devices/pci0000:00/0000:00:12.2/usb1
(usb:usb1)
├ /sys/devices/pci0000:00/0000:00:13.0/usb5
(usb:usb5)
├ /sys/devices/pci0000:00/0000:00:13.1/usb6
(usb:usb6)
├ /sys/devices/pci0000:00/0000:00:13.2/usb2
(usb:usb2)
├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0
(sound:card0) "SB"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input10
│ │ (input:input10) "HDA ATI SB Front Headphone"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input11
│ │ (input:input11) "HDA ATI SB Line Out Side"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input12
│ │ (input:input12) "HDA ATI SB Line Out CLFE"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input13
│ │ (input:input13) "HDA ATI SB Line Out Surround"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input14
│ │ (input:input14) "HDA ATI SB Line Out Front"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input7
│ │ (input:input7) "HDA ATI SB Line"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input8
│ │ (input:input8) "HDA ATI SB Front Mic"
│ └ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input9
(input:input9) "HDA ATI SB Rear Mic"
├ /sys/devices/pci0000:00/0000:00:14.5/usb7
(usb:usb7)
├ /sys/devices/virtual/misc/kvm
| (misc:kvm)
├ -----------------------------------------------------------------------
├ /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0/drm/card1
(drm:card1)
├ /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0/graphics/fb1
(graphics:fb1) "radeondrmfb"
├ /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.1/sound/card2
(sound:card2) "HDMI"
│ └ /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.1/sound/card2/input16
(input:input16) "HDA ATI HDMI HDMI/DP,pcm=3"
├ /sys/devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.0/input/input2
(input:input2) "CHESEN PS2 to USB Converter"
├ /sys/devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.1/input/input3
(input:input3) "CHESEN PS2 to USB Converter"
└ /sys/devices/pci0000:00/0000:00:12.1/usb4/4-2/4-2:1.0/input/input4
(input:input4) "Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)"

The list above has been rearranged and modified for ease of presentation: the hardware list has been separated into two with a separator line. We will use all the hardware below the line as part of a second seat that we will seat2.

We will assume that we are initially connected to the system on seat0 via the 6850 and using the Logitech Unifying Device as our keyboard and mouse. Please ensure that you are not currently using hardware on seat0 that will be mapped to seat2. Note that the session index may be different on your system.

Step 2: Assigning devices to the second seat

In order to test that multi-seat deployment works correctly, we will first assign hardware manually to the second seat; eventually, we will automate it using udev. Seats are created based on graphics cards. Hence we will start by assigning a graphics card:

loginctl attach seat2 /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0/drm/card1
loginctl attach seat2 /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0/graphics/fb1

Let us then add the sound card and the input devices:

loginctl attach seat2 /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.1/sound/card2/input16
loginctl attach seat2 /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.1/sound/card2
loginctl attach seat2 /sys/devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.0/input/input2
loginctl attach seat2 /sys/devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.1/input/input3
loginctl attach seat2 /sys/devices/pci0000:00/0000:00:12.1/usb4/4-2/4-2:1.0/input/input4

Now, if everything went well, you should be able to see that the hardware has been partitioned into two seats:

[root@kaito ~]$ loginctl seat-status seat0
seat0
Sessions: *11
Devices:
├ /sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
(input:input1) "Power Button"
├ /sys/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0
(input:input0) "Power Button"
├ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/drm/card0
(drm:card0)
├ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/graphics/fb0
(graphics:fb0) "radeondrmfb"
├ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.1/sound/card1
(sound:card1) "Generic"
│ └ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.1/sound/card1/input15
(input:input15) "HD-Audio Generic HDMI/DP,pcm=3"
├ /sys/devices/pci0000:00/0000:00:11.0/ata4/host3/target3:0:0/3:0:0:0/block/sr0
(block:sr0)
├ /sys/devices/pci0000:00/0000:00:11.0/ata4/host3/target3:0:0/3:0:0:0/scsi_generic/sg2
(scsi_generic:sg2)
├ /sys/devices/pci0000:00/0000:00:12.0/usb3
(usb:usb3)
│ ├ /sys/devices/pci0000:00/0000:00:12.0/usb3/3-1/3-1:1.2/0003:046D:C52B.0006/input/input5
│ │ (input:input5) "Logitech Unifying Device. Wireless PID:101b"
│ └ /sys/devices/pci0000:00/0000:00:12.0/usb3/3-1/3-1:1.2/0003:046D:C52B.0006/input/input6
(input:input6) "Logitech Unifying Device. Wireless PID:200a"
├ /sys/devices/pci0000:00/0000:00:12.1/usb4
(usb:usb4)
├ /sys/devices/pci0000:00/0000:00:12.2/usb1
(usb:usb1)
├ /sys/devices/pci0000:00/0000:00:13.0/usb5
(usb:usb5)
├ /sys/devices/pci0000:00/0000:00:13.1/usb6
(usb:usb6)
├ /sys/devices/pci0000:00/0000:00:13.2/usb2
(usb:usb2)
├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0
(sound:card0) "SB"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input10
│ │ (input:input10) "HDA ATI SB Front Headphone"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input11
│ │ (input:input11) "HDA ATI SB Line Out Side"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input12
│ │ (input:input12) "HDA ATI SB Line Out CLFE"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input13
│ │ (input:input13) "HDA ATI SB Line Out Surround"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input14
│ │ (input:input14) "HDA ATI SB Line Out Front"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input7
│ │ (input:input7) "HDA ATI SB Line"
│ ├ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input8
│ │ (input:input8) "HDA ATI SB Front Mic"
│ └ /sys/devices/pci0000:00/0000:00:14.2/sound/card0/input9
(input:input9) "HDA ATI SB Rear Mic"
├ /sys/devices/pci0000:00/0000:00:14.5/usb7
(usb:usb7)
└ /sys/devices/virtual/misc/kvm
(misc:kvm)
[root@kaito ~]$ loginctl seat-status seat2
seat2
Sessions: *12
Devices:
├ /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0/drm/card1
(drm:card1)
├ /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0/graphics/fb1
(graphics:fb1) "radeondrmfb"
├ /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.1/sound/card2
(sound:card2) "HDMI"
│ └ /sys/devices/pci0000:00/0000:00:04.0/0000:02:00.1/sound/card2/input16
(input:input16) "HDA ATI HDMI HDMI/DP,pcm=3"
├ /sys/devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.0/input/input2
(input:input2) "CHESEN PS2 to USB Converter"
├ /sys/devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.1/input/input3
(input:input3) "CHESEN PS2 to USB Converter"
└ /sys/devices/pci0000:00/0000:00:12.1/usb4/4-2/4-2:1.0/input/input4
(input:input4) "Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)"

If your display manager is set to GDM, start runlevel 5, and you should see an independent login screen on each monitor. GDM does tend to be flaky and you may need to switch a couple of times between runlevels 3 and 5 before you see login screens on both seats.

Next steps

If everything above worked, we can automate the process.