VOOZH about

URL: https://wiki.archlinux.org/title/Multiseat

⇱ Multiseat - ArchWiki


Jump to content
From ArchWiki


Related articles

Introduction

In a multiseat setup, a single machine serves multiple independent users, each with their own monitor, keyboard, and mouse. Each set of devices is grouped into a "seat", and each seat gets its own independent login session.

This guide covers both X11 and Wayland sessions using the modern logind-based approach. For legacy X11 multiseat configuration, see Xorg_multiseat.

Requirements

Each seat needs its own graphics device - an integrated APU, a discrete GPU, or a USB graphics adapter. Preferably all devices use the same graphics driver. A single GPU with multiple outputs cannot be split across seats.

Each seat needs its own input devices (keyboard and mouse). A USB hub can be used to connect multiple input devices. This will make device management easier, as the hub can be assigned to a seat instead of individual devices.

Optionally, each seat can have its own audio device, such as a sound card or USB audio interface.

Configuration

Historically, setting up a multiseat system involved writing udev rules and specialized X configurations. With systemd-logind, the process is relatively straightforward.

Configuring multiseat is a two-step process: first, a set of devices (gpu, keyboard, mouse) needs to be assigned to each new seat via loginctl attach. Then a multiseat-capable display manager needs to be enabled via systemctl enable.

Device assignment

Devices can be assigned to seats with

# loginctl attach seat1 /sys/path/to/device

The tricky part is identifying the correct device paths - this will be described in detail for the different device types below.

Commonly, seats are named seat0, seat1, seat2, etc., but more general names of the form seat[a-zA-Z0-9_-]* can be used. Every device not explicitly assigned to another seat belongs to the default seat (seat0). Logind writes persistent udev rules under /etc/udev/rules.d/ so seat assignments will survive reboots.

Graphics devices

List all graphics devices:

$ ls -l /sys/class/drm/card*/device

Each symlink target contains the card's PCI address, which can be used to identify it. For example:

/sys/class/drm/card0/device -> ../../../0000:09:00.0

Cross-reference the PCI address with the output of

$ lspci -nnk | grep -A 3 -E "VGA|3D|Display"

to find out which card it is. Example output:

09:00.0 VGA compatible controller: Advanced Micro Devices ... Navi 22 ... Kernel driver in use: amdgpu

Navi 22 is used in the AMD Radeon RX 6000 series. This card can be assigned to seat1 with:

# loginctl attach seat1 /sys/class/drm/card0

Input devices

List all devices currently attached to the default seat:

$ loginctl seat-status seat0

Scan the list for devices you want to reassign. As an example, the following snippet shows a USB mouse on root hub usb7, downstream of port 7-1:

 └─/sys/devices/pci0000:00/0000:00:08.3/0000:15:00.0/usb7/7-1
 usb:7-1
 └─/sys/devices/pci0000:00/0000:00:08.3/0000:15:00.0/usb7/7-1/7-1.2
 usb:7-1.2
 └─.../input/input9 "USB Optical Mouse"

To attach the root hub (and all its downstream devices), use the usb7 path:

# loginctl attach seat1 /sys/devices/pci0000:00/0000:00:08.3/0000:15:00.0/usb7

To attach only the port that has the mouse attached, include the 7-1 segment:

# loginctl attach seat1 /sys/devices/pci0000:00/0000:00:08.3/0000:15:00.0/usb7/7-1

Verify seat assignments

After assigning devices to seats, verify the assignments with

$ loginctl list-seats
$ loginctl seat-status seat0
$ loginctl seat-status seat1

This should show two seats, with seat1 having the assigned graphics and input devices, and seat0 having the remaining devices.

Display manager

Few display managers handle multiseat reliably. If you run into trouble with your current display manager, it is worth trying a different one. See Display manager#Graphical for a list of available options.

To enable a new display manager, first disable the current one, then enable the new one (replace lightdm with your choice):

# systemctl disable display-manager
# systemctl enable lightdm

Then reboot. Each seat should now have its own independent login screen. After logging in, each seat will run an independent user session.

Reverting to a single-seat setup

Remove all device assignments (implicitly re-assigns each device to seat0):

# loginctl flush-devices

Switch back to your old display manager (replace gdm with your previous display manager):

# systemctl disable display-manager
# systemctl enable gdm

Then reboot.

See also