[PATCH kdrive/ephyr v7 0/9] Xephyr input hot-plugging support and other additions for single-GPU multi-seat
Laércio de Sousa
laerciosousa at sme-mogidascruzes.sp.gov.br
Fri Dec 11 05:43:05 PST 2015
PLEASE NOTE: Xephyr is NOT my preferred approach for single-GPU
multi-seat configuration (mainly due to its current evdev-based
limited support for handling input devices --- no touchpads,
no touchscreens, no joysticks), but it's the easiest one to implement
in the moment. The best approach by far (in Linux specifically) would
require KMS device node splitting, as proposed in
Until such a solution is completely implemented and supported by
video drivers, the most common approach for single-GPU multi-seat
configuration is based on nested X servers, i.e. a bare Xorg server
spanning all desired video outputs, on top of which we launch a nested
X server for each output. My preferred approach in this case would be
Xorg itself with xf86-video-nested driver, but the latter is currently
unmaintained, and I have no knowledge about video drivers and no spare time
to maintain it. The other approach (historically the most used one)
is Xephyr: it's currently actively maintained, it has reasonable graphics
performance (compared to xf86-video-nested) and it has a minimal support for
input devices (keyboard and mouse only), but it still have some gaps
for a more comfortable multi-seat configuration. This patch series
intend to fill them.
This is the v7 of patch series which provides some missing parts
for full single-GPU multi-seat support in Xephyr. The main difference
to v6 is that now ephyr input driver for kdrive won't be loaded
in multi-seat mode, i.e. if -seat option is passed to Xephyr, so that
it'll handle only its seat's input hardware. In this version, we've
also dropped patch to add command-line options -host-display and
-host-auth for Xephyr (use "env DISPLAY=... XAUTHORITY=... Xephyr" instead).
Example of Xephyr-based seat configuration in LightDM 1.12 or newer based
on this patch series (provided that a bare X server on display number :90,
with two outputs named LVDS and VGA, is already running):
xserver-command=env DISPLAY=:90 Xephyr -dpi 96 -sw-cursor -xkbrules evdev -xkblayout br -xkbmodel abnt2 -output LVDS
xserver-command=evn DISPLAY=:90 Xephyr -dpi 96 -sw-cursor -xkbrules evdev -xkblayout br -xkbmodel abnt2 -output VGA
** HISTORY **
v6 adds "-novtswitch" to the list of command-line
arguments ignored by Xephyr.
v5 only builds input hot-plugging for kdrive if one
of CONFIG_UDEV or CONFIG_HAL options is enabled.
v4 drops explicit option -input-hotplug. Since input hot-plugging support
in Xephyr is very unlikely to be used outside multi-seat context,
it's now automatically enabled if, and only if, -seat option is passed.
v3 includes two patches: one that introduces a new flag to better
distinguish between real keyboards and other key input devices (so that
kdrive can grab keyboards only), and another one that prevents kdrive
evdev driver from deliberately renaming keyboard and pointer devices
if they are already named (e.g. from udev), with potential memory leaks.
v2 fixes some problems found in v1, like double-free errors for some
InputOption objects, and memory corruptions when a USB keyboard or mouse is
unplugged and replugged several times, due to the fact that their FDs may not be
successfully unregistered when they are unplugged. It also brings new patches
for improving NewInputDeviceRequest() implementation in hw/kdrive/src/kinput.c
(making use of KdParseKbdOptions() and KdParsePointerOptions() as requested),
and some other minor changes.
Some patches provide new command-line options to make it
easier to launch Xephyr directly from display manager, rather
than from within a user session.
One of them fixes an issue where Xephyr keyboards' LEDs are not toggled
when NumLock, CapsLock, and ScrollLock are pressed.
The most significant one introduces input hotplugging support for
keyboards and pointers with both hal and udev backends.
Laércio de Sousa (8):
kdrive: fix up NewInputDeviceRequest() implementation
kdrive: set "evdev" driver for input devices automatically, if
kdrive: introduce input hot-plugging support for udev and hal backends
kdrive: add options to set default XKB properties
kdrive: don't let evdev driver overwrite existing device names
config/udev: better distinguish between real keyboards and other key
ephyr: ignore "-novtswitch", "-sharevts", and "-layout seatXXX"
ephyr: don't load ephyr input driver if -seat option is passed
Mikhail Krivtsov (1):
kdrive: update evdev keyboard LEDs (#22302)
config/hal.c | 2 +-
config/udev.c | 4 +
config/wscons.c | 2 +-
hw/kdrive/ephyr/ephyrinit.c | 42 +++--
hw/kdrive/linux/evdev.c | 17 +-
hw/kdrive/src/Makefile.am | 8 +
hw/kdrive/src/kdrive.c | 79 ++++++++++
hw/kdrive/src/kinfo.c | 4 +
hw/kdrive/src/kinput.c | 346 +++++++++++++++++++++++++++++++++--------
hw/xfree86/common/xf86Xinput.c | 2 +-
include/input.h | 13 +-
11 files changed, 419 insertions(+), 100 deletions(-)
More information about the xorg-devel