[systemd-devel] logind: multiseat without framebuffer graphic cards

Олег Самарин osamarin68 at gmail.com
Sat Nov 24 11:12:34 PST 2012


В Пт., 23/11/2012 в 18:22 +0100, Lennart Poettering пишет:
> > OK. So we need two changes:
> > 
> > (1). Introduce a new udev tag that means "master device" for the seat.
> > Support it with logind.c. Add an udev rule that sets this tag for all
> > framebuffer device
> 
> Yes, and please name this tag "seat-master".
> 

The patch is ready (see attached file). I've tested it on my computer
with two nvidia cards and closed source driver ant on a virtualbox with
one framebuffer device. Seems everything works. But I coudn't test it
with two real framebuffer devices.

> > (2). multi-seat-x should not trigger an error if there is no framebufer
> > device exist on the seat. It is a temporary stuff until X can get device
> > from -seat, so it may look for a specially named config file or just
> > start X without any addition parameters (or with -sharevts only)
> 
> I'd much prefer if this was done in X instead. i.e. via matching the
> -seat parameter when parsing configuration files.
> 

The problem is not the -seat parameter, but the following:

1. The path /usr/lib/systemd/systemd-multi-seat-x path is hardcode in
GDM for all seats except seat0

2. If the seat does not contain а framebuffer device then
systemd-multi-seat-x stops with "Failed to find device node for seat %
s."

So some minimal changes of multi-seat-x are necessary: if there is no
framebuffer device then it just starts X with -sharevts, but without
making a config file. This change is also included in the attached patch

> i.e. xorg.conf currently already knows:
> 
>         MatchProduct
>         MatchDevicePath
>         MatchTag
>         MatchDriver
> 
> Maybe introducing a MatchSeat construct in this style would be the best solution?
> 

It is a good idea and I support it. But I think better it should be
discussed at Xorg rather here.


The next possible activities related to systemd and multi-seat might be:

1. Describe the tag "seat-master" at
http://www.freedesktop.org/wiki/Software/systemd/multiseat
I do not have a write access on this page, but I can post changed pieces
of text here.

2. Make 'loginctl seat-status' to display which device is a seat-master

3. Make 'loginctl attach' capable of adding a device as a seat-master.
For example

# loginctl attach -master
seat1 /sys/devices/pci0000:00/0000:00:06.0/0000:02:00.1/sound/card1

It would create an udev rule with 
ENV{ID_SEAT}="seat1", TAG+="seat-master"

4. Now the case is not resolved if two or more seat-master devices exist
in the same seat and one of them becomes unplugged. Seems according the
login.c, manager_process_seat_device function will destroy the seat, but
this behavior does not look like a correct. The same issue exists with
framebuffer devices.

5. An issue is not related to framebuffer but to user access privileges:
users cann't access /dev/snd/seq device in a multi-seat environment.
This device is used by all MIDI applications, so they do not work (the
workaround is to include users to the audio group, but it causes all
sound card are accessible regardless their seats).

If nobody is opposite, I'm planning to work with these issues and I'd
like to meet any related opinions.

Oleg.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: systemd-logind-site-master.patch
Type: text/x-patch
Size: 3896 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20121124/5d89c287/attachment-0001.bin>


More information about the systemd-devel mailing list