Instructions

Interested in setting up your own multiseat system? Follow these instructions:

1. Name Your Seats

Come up with names for your seats. You must have a primary seat named seat0. All other seat names must begin with seat (see the rules for seat naming). Note that VT switching (and thus fast user switching) is (currently) only possible on seat0.

HINT: When naming your seats, use a dash between prefix seat and your seat name suffix (e.g.: seat-1). This convention is consistent with machine-generated seat names like seat-usb-pci-0000_00_1d_0-usb-0_1_2. It will also allow in the future the possibility of supporting globbing in LightDM's seat config sections (e.g. [Seat:seat*] would match any seat, but [Seat:seat-*] would match any non-seat0 seat).

2. Configure Seat Hardware

Assign hardware devices to your seats by setting up udev rules.

Per-Device Configuration

A device that is associated with a seat must be configured as follows:

  • It MUST be tagged with seat. This is required, even for seat0. The existing udev rules do this properly 99% of the time, but exotic hardware, proprietary drivers, or unusual circumstances may require you to write your own udev rules to tag a device with seat or to prevent a device from being tagged with seat.

  • Tag it with the seat name (e.g., seat-1). This is optional for seat0 but required for other seats.

  • Set the ID_SEAT property to the seat name (e.g., seat-1). This is optional for seat0 but required for other seats.

master-of-seat

One of the devices for your seat MUST be tagged with master-of-seat. This tag signals to logind that the seat hardware is ready (enough) to start a display manager on that seat. If the tag doesn't exist on any of the seat's hardware, logind won't tell the display manager about the seat, and might not set device permissions properly if a user logs into that seat (TODO: confirm).

The udev rules that come with open-source video drivers tag the video card with master-of-seat for you. You should only need to set up a rule to tag master-of-seat if you are using a proprietary video card driver.

It is recommended that you apply the master-of-seat tag to the video card, but you may tag a different device instead. Tagging the video card with master-of-seat is recommended because it is often the only device that is critical for the seat.

[UPDATE 2014-09-05] nvidia-graphics-drivers-* packages for Ubuntu 14.10 (utopic) and later will ship a udev rule that tags devices /dev/dri/card* with NVIDIA proprietary drivers as master-of-seat.

Example #1

Example system #1 has two seats (seat0 and seat-1) and uses open-source video drivers. The file /etc/udev/rules.d/99-multiseat.rules was created and the following rules were added to it:

  • # assign USB ports
    TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:1d.7/usb2/*", ENV{ID_SEAT}="seat-1", TAG+="seat-1"
    
    # assign video cards
    TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:07.0/0000:03:00.0/*", ENV{ID_SEAT}="seat-1", TAG+="seat-1"

Example #2

Example system #2 has two seats (seat0 and seat-1) and uses the proprietary NVIDIA driver. The file /etc/udev/rules.d/99-multiseat.rules was created and the following rules were added to it:

  • # add master-of-seat tag to video cards (0x10de is NVIDIA vendor id)
    SUBSYSTEM=="drm", KERNEL=="card[0-9]*", ATTRS{vendor}=="0x10de", DRIVERS=="nvidia", TAG+="master-of-seat"
    
    # assign USB ports
    TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/*", ENV{ID_SEAT}="seat-1", TAG+="seat-1"
    
    # assign video cards
    TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/*", ENV{ID_SEAT}="seat-1", TAG+="seat-1"

Tips and Troubleshooting

You MUST NOT have any newlines in a rule.

Use udevadm trigger after you edit your rules to make them take effect

Use udevadm info --export-db to see what udev did with your devices (to debug your rules).

3. Install PPA Packages

Upgrade to the packages in the multiseat PPA by running the following commands:

  • sudo apt-add-repository ppa:ubuntu-multiseat/ppa
    sudo apt-get update
    sudo apt-get upgrade

4. Configure lightdm

For Ubuntu 14.04 LTS (trusty) only

Automatic multiseat support for 1.12 series (see below) was backported to version 1.10.3, which is available in trusty-updates repository. However, in order to avoid breaking previous setups, this feature was made optional, and disabled by default.

In order to enable automatic multiseat support in LightDM 1.10.3 and later, you'll need to add the following config to your lightdm.conf file:

  • [LightDM]
    logind-load-seats=true

For Ubuntu 14.10 (utopic) and later

NOTE: All these settings also apply for Ubuntu 14.04 LTS (trusty) with lightdm package upgraded from trusty-updates repository and automatic multiseat support enabled (see above).

Available lightdm packages starting from 1.11.7 already include a patch for automatic multiseat support, so no additional settings in lightdm.conf are required in principle. However, if you want to customize some settings for automatically added seats (like autologin-user or xserver-command), you can use [Seat:seat*] config sections.

For example, if a new seat named seat-Foo is added, the following config section will be loaded, if available:

  • [Seat:seat-Foo]
    autologin-user=user1
    xserver-command=X -core -dpms -s 0

It may happen that your system boots so fast that LightDM service is started before your graphics drivers are properly loaded. If this is your case, you'll want to add the following config to your lightdm.conf file:

  • [LightDM]
    logind-check-graphical=true

This setting will tell LightDM to wait until graphics devices are ready before spawning greeters/autostarting sessions on them.

5. (if needed) Configure X.Org Server

Suppose you need to modify your xorg.conf to change some video driver settings for seat-1. You have a couple of options:

  1. Create a file like /etc/X11/xorg.conf.seat-1 that contains all X settings for seat-1, then set xserver-config in your /etc/lightdm/lightdm.conf:

    • [Seat:seat-1]
      xserver-config=/etc/X11/xorg.conf.seat-1

    Note: This will not work if you use the systemd-multi-seat-x wrapper because it generates its own config file that overrides the xserver-config value. There's also no way to do such a thing if you use gdm instead of lightdm (e.g. if you have installed Ubuntu GNOME), because it doesn't support passing custom config file to X server.

  2. Create a file like /etc/X11/xorg.conf.d/90-seat-1.conf and put the settings there. This config file will be read by all seats, so use the MatchSeat directive to target the settings to a particular seat. For example:

    • Section "Device"
          Identifier "card0"
          Driver "nvidia"
          Option "NoLogo" "True"
          MatchSeat "seat-1"
      EndSection

6. Reboot

7. Profit!

MultiseatTeam/Instructions (last edited 2014-12-16 13:01:43 by 187-11-244-53)