Discussion:
[systemd-devel] loginctl - multi-seats
arnaud gaboury
2014-08-23 13:10:00 UTC
Permalink
Archlinux 3.16.1
systemd 215-4
Xorg 1.16


Until now, I have been enable to set a dual seat following the
archwiki[1]. In short, I had to modify the /etc/X11/xorg.conf
accordingly, then $ startx -- layout seat0 -config
xorg.conf.multiseat.

I am now trying to migrate to the new facilities for multiseats from
loginctl[2] and Xorg 1.16 with rootless X[3]. Documentation is very
rare, and I find it difficult to set up the global scheme.

I understand from loginctl(1) I have to first create 1 new seat with
loginctl using 1 existing graphic device:
$ attach seat1 /sys/bus/pci/device/0000:00:01.0@ (my graphic card as
listed by $lspci).

Then, I will attach a usb keyboard & mouse the same way, right ?

Now, as for the monitor & session layout, i have no idea how to deal
with it and the global /etc/X11/xorg.conf . Same as before or is there
now a more specific way?

Then, once I have created seat1, I am left with two seats : seat0 and
seat1. I understand I have to
bind a user session login to a specific seat, right ? Concretely, how do it ?

Thank you for any hint/pointer/suggestion about the path to follow.
--
[1]https://wiki.archlinux.org/index.php/Xorg_multiseat
[2]http://www.freedesktop.org/wiki/Software/systemd/multiseat/
[3]https://www.archlinux.org/news/xorg-server-116-is-now-available/
arnaud gaboury
2014-08-23 14:26:33 UTC
Permalink
Post by arnaud gaboury
I understand from loginctl(1) I have to first create 1 new seat with
listed by $lspci).
Not a very good start :-(

$ lspci
01:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce
GTX 770] (rev a1)

# loginctl attach seat1 /sys/bus/pci/devices/0000:01:00.0
Could not attach device: No such device

$ ls -al /sys/bus/pci/devices/0000:01:00.0
lrwxrwxrwx 1 root root 0 Aug 23 13:56
/sys/bus/pci/devices/0000:01:00.0 ->
../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/

# loginctl attach seat1 /sys/bus/pci/devices/0000:01:00.0
Could not attach device: No such device

---------------------------------------------------------
from loginctl(1):
attach NAME DEVICE...
Persistently attach one or more devices to a seat. The devices
should be specified via device paths in the /sys file system. To
create a new seat, attach at least one graphics card to a
previously unused seat name.
---------------------------------------------------------------

What is wrong in my command to create seat1 ?
Andrei Borzenkov
2014-08-23 14:35:34 UTC
Permalink
В Sat, 23 Aug 2014 16:26:33 +0200
Post by arnaud gaboury
Post by arnaud gaboury
I understand from loginctl(1) I have to first create 1 new seat with
listed by $lspci).
Not a very good start :-(
$ lspci
01:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce
GTX 770] (rev a1)
# loginctl attach seat1 /sys/bus/pci/devices/0000:01:00.0
Could not attach device: No such device
$ ls -al /sys/bus/pci/devices/0000:01:00.0
lrwxrwxrwx 1 root root 0 Aug 23 13:56
/sys/bus/pci/devices/0000:01:00.0 ->
../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/
# loginctl attach seat1 /sys/bus/pci/devices/0000:01:00.0
Could not attach device: No such device
---------------------------------------------------------
attach NAME DEVICE...
Persistently attach one or more devices to a seat. The devices
should be specified via device paths in the /sys file system. To
create a new seat, attach at least one graphics card to a
previously unused seat name.
---------------------------------------------------------------
What is wrong in my command to create seat1 ?
You probably want graphic device under it, something like

/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0

You can only add devices that have udev tag seat (those with
TAGS=...:seat:... in properties).
Damian Ivanov
2014-08-23 14:42:30 UTC
Permalink
You can get a list of all usable devices including their path by
loginctl seat-status seat0
after that attach a monitor and keyboard (and optionally mouse) and if
you run the right distribution (I've tried with openSUSE and Fedora)
and run gdm as login manager, you new gdm should pop up as soon as you
attach the gpu.
arnaud gaboury
2014-08-23 14:56:58 UTC
Permalink
Post by Damian Ivanov
You can get a list of all usable devices including their path by
loginctl seat-status seat0
loginctl seat-status seat0
seat0
Sessions: *c2 c1
Devices:
├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input6
│ input:input6 "Power Button"
├─/sys/device...XSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input5
│ input:input5 "Power Button"
├─/sys/device...0000:00/0000:00:01.0/0000:01:00.1/sound/card1
│ sound:card1 "NVidia"
│ ├─/sys/device...00:00:01.0/0000:01:00.1/sound/card1/input18
│ │ input:input18 "HDA NVidia HDMI/DP,pcm=3"
│ ├─/sys/device...00:00:01.0/0000:01:00.1/sound/card1/input19
│ │ input:input19 "HDA NVidia HDMI/DP,pcm=7"
│ ├─/sys/device...00:00:01.0/0000:01:00.1/sound/card1/input20
│ │ input:input20 "HDA NVidia HDMI/DP,pcm=8"
│ └─/sys/device...00:00:01.0/0000:01:00.1/sound/card1/input21
│ input:input21 "HDA NVidia HDMI/DP,pcm=9"
├─/sys/devices/pci0000:00/0000:00:14.0/usb1
│ usb:usb1
│ ├─/sys/devices/pci0000:00/0000:00:14.0/usb1/1-11
│ │ usb:1-11
│ ├─/sys/device.../1-13:1.0/0003:046D:C52E.0004/input/input16
│ │ input:input16 "Logitech USB Receiver"
lines 1-23...skipping...
seat0
Sessions: *c2 c1
Devices:
├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input6
│ input:input6 "Power Button"
├─/sys/device...XSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input5
│ input:input5 "Power Button"
├─/sys/device...0000:00/0000:00:01.0/0000:01:00.1/sound/card1
│ sound:card1 "NVidia"
│ ├─/sys/device...00:00:01.0/0000:01:00.1/sound/card1/input18
│ │ input:input18 "HDA NVidia HDMI/DP,pcm=3"
│ ├─/sys/device...00:00:01.0/0000:01:00.1/sound/card1/input19
│ │ input:input19 "HDA NVidia HDMI/DP,pcm=7"
│ ├─/sys/device...00:00:01.0/0000:01:00.1/sound/card1/input20
│ │ input:input20 "HDA NVidia HDMI/DP,pcm=8"
│ └─/sys/device...00:00:01.0/0000:01:00.1/sound/card1/input21
│ input:input21 "HDA NVidia HDMI/DP,pcm=9"
├─/sys/devices/pci0000:00/0000:00:14.0/usb1
│ usb:usb1
│ ├─/sys/devices/pci0000:00/0000:00:14.0/usb1/1-11
│ │ usb:1-11
│ ├─/sys/device.../1-13:1.0/0003:046D:C52E.0004/input/input16
│ │ input:input16 "Logitech USB Receiver"
│ ├─/sys/device.../1-13:1.1/0003:046D:C52E.0005/input/input17
│ │ input:input17 "Logitech USB Receiver"
│ └─/sys/device.../1-14:1.0/0003:046D:C03E.0006/input/input22
│ input:input22 "Logitech USB-PS/2 Optical Mouse"
├─/sys/devices/pci0000:00/0000:00:14.0/usb2
│ usb:usb2
├─/sys/devices/pci0000:00/0000:00:1a.0/usb5
│ usb:usb5
│ └─/sys/devices/pci0000:00/0000:00:1a.0/usb5/5-1
│ usb:5-1
├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0
│ sound:card0 "PCH"
│ ├─/sys/device...000:00:1b.0/sound/card0/hdaudioC0D0/input10
│ │ input:input10 "HDA Digital PCBeep"
│ ├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/input11
│ │ input:input11 "HDA Intel PCH Front Mic"
│ ├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/input12
│ │ input:input12 "HDA Intel PCH Rear Mic"
│ ├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/input13
│ │ input:input13 "HDA Intel PCH Line"
│ ├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/input14
│ │ input:input14 "HDA Intel PCH Line Out"
│ └─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/input15
│ input:input15 "HDA Intel PCH Front Headphone"
├─/sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/usb3
│ usb:usb3
├─/sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/usb4
│ usb:usb4
├─/sys/devices/pci0000:00/0000:00:1d.0/usb6
│ usb:usb6
Post by Damian Ivanov
after that attach a monitor and keyboard (and optionally mouse) and if
I do not see anything about "monitor", neither keyborad. As you can
see, mostly sound and usb stuffs.
I thought first thins was to attach a grahic card, which is not the
same as a monitor.
Post by Damian Ivanov
you run the right distribution (I've tried with openSUSE and Fedora)
Not sure what you call "right distro". I am on archlinux
Post by Damian Ivanov
and run gdm as login manager, you new gdm should pop up as soon as you
attach the gpu.
No login manager. Boot in runlevel 3 then $ startx
Post by Damian Ivanov
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Damian Ivanov
2014-08-23 15:00:29 UTC
Permalink
With right distro I mean which carry the patches so the multiseat
stuff works. Don't know if Arch has them. Last time I tried gdm was
_required_ for a graphical multi-seat session.

With monitor I meant the gpu... and you need to figure out which of
the usb devices is your keyboard.
Lennart Poettering
2014-08-25 17:14:14 UTC
Permalink
Post by Damian Ivanov
With right distro I mean which carry the patches so the multiseat
stuff works. Don't know if Arch has them. Last time I tried gdm was
_required_ for a graphical multi-seat session.
I worked with Ray to get support for this into gdm, I am not sure
whether any other DM was ever updated to support this too.

If you are interested in making this work with other DMs, please work
with the projects in question and point them to the docs:

http://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/

I even handed out multi-seat hw to a couple of projects for free, to
make this easy, but I am not sure anything ever came out of it.

Lennart
--
Lennart Poettering, Red Hat
Laércio de Sousa
2014-08-25 17:48:27 UTC
Permalink
Post by Lennart Poettering
I worked with Ray to get support for this into gdm, I am not sure
whether any other DM was ever updated to support this too.
Stefan BrÃŒns at openSUSE is currently working to bring logind multiseat
support to KDM (based on original patch from Martin Briza at Red Hat):
https://git.reviewboard.kde.org/r/112294/

Ubuntu Multiseat team is currently working with Robert Ancell to implement
automatic multiseat support in LightDM:
https://code.launchpad.net/~ubuntu-multiseat/lightdm/new-automatic-multiseat/+merge/231903

I can see no current work on supporting this feature in SDDM, but I believe
Martin Briza will make it some day:
https://github.com/sddm/sddm/issues/78
--
*Laércio de Sousa*
*Orientador de Informática*
*Escola Municipal "Professor Eulálio Gruppi"*
*Rua Ismael da Silva Mello, 559, Mogi Moderno*
*Mogi das Cruzes - SPCEP 08717-390*
Telefone: (11) 4726-8313
arnaud gaboury
2014-08-23 14:50:31 UTC
Permalink
Post by Andrei Borzenkov
You probably want graphic device under it, something like
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
# loginctl attach seat1 /sys/bus/pci/devices/0000:01:00.0/drm/card0
No error thrown, but:

# loginctl list-seats
SEAT
seat0

1 seats listed.
No new seat1 !


% udevadm info --query=all --path=/sys/bus/pci/devices/0000:01:00.0
P: /devices/pci0000:00/0000:00:01.0/0000:01:00.0
E: DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0
E: DRIVER=nvidia
E: ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 770]
E: ID_PCI_CLASS_FROM_DATABASE=Display controller
E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
E: ID_VENDOR_FROM_DATABASE=NVIDIA Corporation
E: MODALIAS=pci:v000010DEd00001184sv000010B0sd00001184bc03sc00i00
E: PCI_CLASS=30000
E: PCI_ID=10DE:1184
E: PCI_SLOT_NAME=0000:01:00.0
E: PCI_SUBSYS_ID=10B0:1184
E: SUBSYSTEM=pci
E: USEC_INITIALIZED=53240

I guess I am on the right device directory.
Post by Andrei Borzenkov
You can only add devices that have udev tag seat (those with
TAGS=...:seat:... in properties).
Will learn how to read TAGS. It is new to me for now.
--
google.com/+arnaudgabourygabx
Andrei Borzenkov
2014-08-23 15:09:24 UTC
Permalink
В Sat, 23 Aug 2014 16:50:31 +0200
Post by arnaud gaboury
Post by Andrei Borzenkov
You probably want graphic device under it, something like
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
# loginctl attach seat1 /sys/bus/pci/devices/0000:01:00.0/drm/card0
# loginctl list-seats
SEAT
seat0
1 seats listed.
No new seat1 !
% udevadm info --query=all --path=/sys/bus/pci/devices/0000:01:00.0
P: /devices/pci0000:00/0000:00:01.0/0000:01:00.0
E: DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0
E: DRIVER=nvidia
E: ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 770]
E: ID_PCI_CLASS_FROM_DATABASE=Display controller
E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
E: ID_VENDOR_FROM_DATABASE=NVIDIA Corporation
E: MODALIAS=pci:v000010DEd00001184sv000010B0sd00001184bc03sc00i00
E: PCI_CLASS=30000
E: PCI_ID=10DE:1184
E: PCI_SLOT_NAME=0000:01:00.0
E: PCI_SUBSYS_ID=10B0:1184
E: SUBSYSTEM=pci
E: USEC_INITIALIZED=53240
I guess I am on the right device directory.
Post by Andrei Borzenkov
You can only add devices that have udev tag seat (those with
TAGS=...:seat:... in properties).
Will learn how to read TAGS. It is new to me for now.
P: /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
N: dri/card0
E: DEVNAME=/dev/dri/card0
E: DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
E: DEVTYPE=drm_minor
E: ID_FOR_SEAT=drm-pci-0000_01_00_0
E: ID_PATH=pci-0000:01:00.0
E: ID_PATH_TAG=pci-0000_01_00_0
E: MAJOR=226
E: MINOR=0
E: SUBSYSTEM=drm
E: TAGS=:seat:uaccess:
E: USEC_INITIALIZED=189616
Damian Ivanov
2014-08-23 15:26:04 UTC
Permalink
I would try with an openSUSE/Fedora Live CD first, because I know it
works and if it works for you too but fails on Arch, you may be
missing some patches/config and we could see where it fails maybe.
Especially the gdm thing required a few patches a while ago, don't
know if they are all upstream now. For multiseat on command line level
you need kmscon with that I was able to make multseat command line
session but I could not start X/wayland from there yet. The multi-seat
GUI session is auto-initalized by gdm as soon as a new seat is created
(at least thats what happens for me on openSUSE/Fedora), but that
requires gdm running and set as default.
arnaud gaboury
2014-08-23 15:30:32 UTC
Permalink
Post by Damian Ivanov
I would try with an openSUSE/Fedora Live CD first, because I know it
works and if it works for you too but fails on Arch, you may be
missing some patches/config and we could see where it fails maybe.
Especially the gdm thing required a few patches a while ago, don't
know if they are all upstream now. For multiseat on command line level
you need kmscon with that I was able to make multseat command line
session but I could not start X/wayland from there yet. The multi-seat
GUI session is auto-initalized by gdm as soon as a new seat is created
(at least thats what happens for me on openSUSE/Fedora), but that
requires gdm running and set as default.
Thank you for advices. I will install gdm. But in anay case, I want
create a new seat1, and now I am unable to do it (see the TAGS story
in this thread.)
arnaud gaboury
2014-08-23 15:28:27 UTC
Permalink
Ok, I see. I do not have this tag for my card.
I see you use xf86-video-nouveau. Am I correct? Shall I the install
xf86-video-nouveau ?
--
google.com/+arnaudgabourygabx
Andrei Borzenkov
2014-08-23 15:34:49 UTC
Permalink
В Sat, 23 Aug 2014 17:28:27 +0200
Post by arnaud gaboury
Ok, I see. I do not have this tag for my card.
I see you use xf86-video-nouveau. Am I correct?
No, I use nVidia binary drivers.
Post by arnaud gaboury
Shall I the install
xf86-video-nouveau ?
Lennart Poettering
2014-08-25 17:11:05 UTC
Permalink
Post by arnaud gaboury
Post by arnaud gaboury
I understand from loginctl(1) I have to first create 1 new seat with
listed by $lspci).
Not a very good start :-(
$ lspci
01:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce
GTX 770] (rev a1)
# loginctl attach seat1 /sys/bus/pci/devices/0000:01:00.0
Could not attach device: No such device
$ ls -al /sys/bus/pci/devices/0000:01:00.0
lrwxrwxrwx 1 root root 0 Aug 23 13:56
/sys/bus/pci/devices/0000:01:00.0 ->
../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/
# loginctl attach seat1 /sys/bus/pci/devices/0000:01:00.0
Could not attach device: No such device
---------------------------------------------------------
attach NAME DEVICE...
Persistently attach one or more devices to a seat. The devices
should be specified via device paths in the /sys file system. To
create a new seat, attach at least one graphics card to a
previously unused seat name.
---------------------------------------------------------------
What is wrong in my command to create seat1 ?
The way to go is to start with looking at "loginctl seat-status
seat0". This will show you all hardware currently assigned to seat0. Use
the device paths showmn to then create additional seats out of them, in
different combinations.

Not all devices can be assigned to seats, they have to be marked in udev
for that. loginctl shows you all that.

Lennart
--
Lennart Poettering, Red Hat
arnaud gaboury
2014-08-25 18:49:52 UTC
Permalink
Post by Lennart Poettering
The way to go is to start with looking at "loginctl seat-status
seat0". This will show you all hardware currently assigned to seat0. Use
the device paths showmn to then create additional seats out of them, in
different combinations.
Not all devices can be assigned to seats, they have to be marked in udev
for that. loginctl shows you all that.
Lennart
I couldn't go anywhere. Like a bozo, I sticked to the old-fashion way
of artificially splinting my nvidia driver. I totally missed the DRM
driver/mode setting stuff.
I have since then installed xf86-video-modesetting on Arch, will
rebuild my custom Kernel, install nouveau ...
Poma gave me everything I need in his post. Thanks again to him.
I am confident I will build a real dual seat.
poma
2014-08-23 16:20:58 UTC
Permalink
Post by arnaud gaboury
Archlinux 3.16.1
systemd 215-4
Xorg 1.16
Until now, I have been enable to set a dual seat following the
archwiki[1]. In short, I had to modify the /etc/X11/xorg.conf
accordingly, then $ startx -- layout seat0 -config
xorg.conf.multiseat.
I am now trying to migrate to the new facilities for multiseats from
loginctl[2] and Xorg 1.16 with rootless X[3]. Documentation is very
rare, and I find it difficult to set up the global scheme.
I understand from loginctl(1) I have to first create 1 new seat with
listed by $lspci).
Then, I will attach a usb keyboard & mouse the same way, right ?
Now, as for the monitor & session layout, i have no idea how to deal
with it and the global /etc/X11/xorg.conf . Same as before or is there
now a more specific way?
Then, once I have created seat1, I am left with two seats : seat0 and
seat1. I understand I have to
bind a user session login to a specific seat, right ? Concretely, how do it ?
Thank you for any hint/pointer/suggestion about the path to follow.
/etc/lightdm/lightdm.conf
[LightDM]
minimum-display-number=0
minimum-vt=1
user-authority-in-system-dir=true

[SeatDefaults]
greeter-session=lightdm-greeter
session-wrapper=/etc/X11/xinit/Xsession

[Seat:0]
xserver-command=/usr/bin/Xorg
xserver-config=/etc/X11/xorg.conf.nouveau

[Seat:1]
xdg-seat=seat-fu
xserver-command=/usr/bin/Xorg -sharevts -novtswitch

~~~~~~~~~~~~~~~~~~~~~~~~~~

/etc/X11/xorg.conf.nouveau
Section "Device"
Identifier "nvidia0"
Driver "nouveau"
EndSection

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ loginctl seat-status seat0
seat0
Sessions: *1086 c15
Devices:
...
├─/sys/devices/pci0000:00/0000:00:10.0/0000:01:00.0/drm/card1
│ drm:card1
├─/sys/devices/pci0000:00/0000:00:10.0/0000:01:00.0/graphics/fb0
│ [MASTER] graphics:fb0 "nouveaufb"
...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ udevadm info -q env -p /sys/class/drm/card1
DEVNAME=/dev/dri/card1
DEVPATH=/devices/pci0000:00/0000:00:10.0/0000:01:00.0/drm/card1
DEVTYPE=drm_minor
ID_FOR_SEAT=drm-pci-0000_01_00_0
ID_PATH=pci-0000:01:00.0
ID_PATH_TAG=pci-0000_01_00_0
MAJOR=226
MINOR=1
SUBSYSTEM=drm
TAGS=:seat:uaccess:
USEC_INITIALIZED=67185

~~~~~~~~~~~~~~~~~~~~~~

$ man 1 loginctl
attach [NAME] [DEVICE...]
...
flush-devices

~~~~~~~~~~~~~~~~~~~~~~

/etc/udev/rules.d/72-seat-drm-pci-0000_00_04_1-usb-0_6_1_0.rules
TAG=="seat", ENV{ID_FOR_SEAT}=="drm-pci-0000_00_04_1-usb-0_6_1_0", ENV{ID_SEAT}="seat-fu"

/etc/udev/rules.d/72-seat-graphics-pci-0000_00_04_1-usb-0_6_1_0.rules
TAG=="seat", ENV{ID_FOR_SEAT}=="graphics-pci-0000_00_04_1-usb-0_6_1_0", ENV{ID_SEAT}="seat-fu"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ loginctl seat-status seat-fu
seat-fu
Sessions: *1 c1
Devices:
├─/sys/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/drm/card0
│ drm:card0
└─/sys/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/graphics/fb1
[MASTER] graphics:fb1 "udldrmfb"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ udevadm info -q env -p /sys/class/drm/card0
DEVNAME=/dev/dri/card0
DEVPATH=/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/drm/card0
DEVTYPE=drm_minor
ID_FOR_SEAT=drm-pci-0000_00_04_1-usb-0_6_1_0
ID_PATH=pci-0000:00:04.1-usb-0:6:1.0
ID_PATH_TAG=pci-0000_00_04_1-usb-0_6_1_0
ID_SEAT=seat-fu
MAJOR=226
MINOR=0
SUBSYSTEM=drm
TAGS=:seat:seat-fu:uaccess:
USEC_INITIALIZED=465981

~~~~~~~~~~~~~~~~~~~~~~~

$ modinfo -n nouveau
/lib/modules/3.15.10-200.fc20.x86_64/kernel/drivers/gpu/drm/nouveau/nouveau.ko

$ rpm -qf /usr/lib64/xorg/modules/drivers/nouveau_drv.so
xorg-x11-drv-nouveau-1.0.10-1.fc20.x86_64

$ modinfo -n udl
/lib/modules/3.15.10-200.fc20.x86_64/kernel/drivers/gpu/drm/udl/udl.ko

$ rpm -qf /usr/lib64/xorg/modules/drivers/modesetting_drv.so
xorg-x11-drv-modesetting-0.8.0-2.fc20.x86_64

$ rpm -q systemd
systemd-208-21.fc20.x86_64

$ rpm -qf /usr/bin/Xorg
xorg-x11-server-Xorg-1.14.4-11.fc20.x86_64

$ rpm -qf /etc/lightdm/lightdm.conf
lightdm-1.11.4-1.fc20.x86_64


Xorg without root
https://lists.fedoraproject.org/pipermail/test/2014-July/122190.html


Don't forget to post config here when you're done. ;)


poma
arnaud gaboury
2014-08-23 16:31:08 UTC
Permalink
Post by poma
Don't forget to post config here when you're done. ;)
Ok, now I have a roadmap. TY so much.

I will post here AND modify the old multi-seat archwiki, when successful.

Ty for the link to the fedora thread. I guess soon each user will then
be able to start a systemd user instance x session, with one sea
attached to his session. Am I right?
arnaud gaboury
2014-08-23 16:43:26 UTC
Permalink
Post by poma
$ udevadm info -q env -p /sys/class/drm/card1
DEVNAME=/dev/dri/card1
DEVPATH=/devices/pci0000:00/0000:00:10.0/0000:01:00.0/drm/card1
DEVTYPE=drm_minor
ID_FOR_SEAT=drm-pci-0000_01_00_0
ID_PATH=pci-0000:01:00.0
ID_PATH_TAG=pci-0000_01_00_0
MAJOR=226
MINOR=1
SUBSYSTEM=drm
USEC_INITIALIZED=67185
~~~~~~~~~~~~~~~~~~~~~~
$ udevadm info -q env -p /sys/class/drm/card0
DEVNAME=/dev/dri/card0
DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
DEVTYPE=drm_minor
ID_FOR_SEAT=drm-pci-0000_01_00_0
ID_PATH=pci-0000:01:00.0
ID_PATH_TAG=pci-0000_01_00_0
ID_SEAT=seat1
MAJOR=226
MINOR=0
SUBSYSTEM=drm
TAGS=:seat:seat1:uaccess:
USEC_INITIALIZED=1196


Then, I can see I have now a graphical card attached to seat1 !! Great
news and first step.
Still can't understand why $ loginctl list-seats does not return
anything about seat1.
arnaud gaboury
2014-08-23 17:21:59 UTC
Permalink
I do not understand why I can't see any output about my
/sys/class/drm/card0 when running
------------------------------
$ loginctl seat-status seat0
The only entry I see referring to graphics is this line (I boot in EUFI).
├─/sys/devices/platform/efi-framebuffer.0/graphics/fb0
│ [MASTER] graphics:fb0 "EFI VGA"
------------------------------
I understand there is by default NO card assigned to seat0 ? Shall I
then attach one?

As mentioned in previous post, card0 is now attached to seat1
------------------------------
$ udevadm info -q env -p /sys/class/drm/card0
DEVNAME=/dev/dri/card0
DEVPATH=/devices/pci0000:00/
~~~~~~~~
TAGS=:seat:seat1:uaccess:
----------------------------

Shall I have some kind of card1 attached to seat0 ?


It seems to me that in Poma config files, there is card0 and card1. As
for my hardware, I have only one card, the nvidia 770, with two
connectors.
----------------------
ls /sys/class/drm/
card0@ version
---------------------

Please, let me see the light :-)
poma
2014-08-23 18:33:46 UTC
Permalink
Post by arnaud gaboury
I do not understand why I can't see any output about my
/sys/class/drm/card0 when running
------------------------------
$ loginctl seat-status seat0
The only entry I see referring to graphics is this line (I boot in EUFI).
├─/sys/devices/platform/efi-framebuffer.0/graphics/fb0
│ [MASTER] graphics:fb0 "EFI VGA"
------------------------------
I understand there is by default NO card assigned to seat0 ? Shall I
then attach one?
As mentioned in previous post, card0 is now attached to seat1
------------------------------
$ udevadm info -q env -p /sys/class/drm/card0
DEVNAME=/dev/dri/card0
DEVPATH=/devices/pci0000:00/
~~~~~~~~
----------------------------
Shall I have some kind of card1 attached to seat0 ?
It seems to me that in Poma config files, there is card0 and card1. As
for my hardware, I have only one card, the nvidia 770, with two
connectors.
----------------------
ls /sys/class/drm/
---------------------
Please, let me see the light :-)
:)
http://www.freedesktop.org/wiki/Software/systemd/multiseat
...
Definition of Terms
- A *seat* consists of all hardware devices assigned to a specific workplace. It consists of at least one graphics device, ...


poma
Damian Ivanov
2014-08-23 18:48:55 UTC
Permalink
Yeah, so tl,dr what this is trying to say with one GPU and two
connectors, no multiseat possible using logind (yet, though this
was/is a planned feature). This is not a systemd/logind problem rather
than the driver provides you only one path per GPU (not a seperate per
port/connector). You could get some cheap displaylink device (must be
usb 2!!) like http://plugable.com/products/uga-165/ or a usb hub with
displaylink device (which I own and it can be used as a connect the
monitor and 4 usb devices + Network interface + audio input/output or
as an usb docking station)
http://www.amazon.com/Plugable-Universal-DisplayLink-1920x1080-High-Speed/dp/B002PONXAI/ref=sr_1_1?s=electronics&ie=UTF8&qid=1408819630&sr=1-1&keywords=plugable+usb+2.0+docking+station
(and this is device has even a preset rule shipped with udev that by
just plugging it in a new seat is created and everything attached to
that docking station is part of the seat)
Post by arnaud gaboury
Post by arnaud gaboury
I do not understand why I can't see any output about my
/sys/class/drm/card0 when running
------------------------------
$ loginctl seat-status seat0
The only entry I see referring to graphics is this line (I boot in EUFI).
├─/sys/devices/platform/efi-framebuffer.0/graphics/fb0
│ [MASTER] graphics:fb0 "EFI VGA"
------------------------------
I understand there is by default NO card assigned to seat0 ? Shall I
then attach one?
As mentioned in previous post, card0 is now attached to seat1
------------------------------
$ udevadm info -q env -p /sys/class/drm/card0
DEVNAME=/dev/dri/card0
DEVPATH=/devices/pci0000:00/
~~~~~~~~
----------------------------
Shall I have some kind of card1 attached to seat0 ?
It seems to me that in Poma config files, there is card0 and card1. As
for my hardware, I have only one card, the nvidia 770, with two
connectors.
----------------------
ls /sys/class/drm/
---------------------
Please, let me see the light :-)
:)
http://www.freedesktop.org/wiki/Software/systemd/multiseat
...
Definition of Terms
- A *seat* consists of all hardware devices assigned to a specific workplace. It consists of at least one graphics device, ...
poma
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
arnaud gaboury
2014-08-23 19:55:59 UTC
Permalink
Post by Damian Ivanov
Yeah, so tl,dr what this is trying to say with one GPU and two
connectors, no multiseat possible using logind (yet, though this
was/is a planned feature). This is not a systemd/logind problem rather
than the driver provides you only one path per GPU (not a seperate per
port/connector).
I understand now. But in fact, I have one single card but can plug two
monitors: one on HDMI and the other one on VGA.
Shall i understand there is nothing to do with these two plugin outputs?
arnaud gaboury
2014-08-23 20:11:17 UTC
Permalink
On Sat, Aug 23, 2014 at 9:55 PM, arnaud gaboury
Post by arnaud gaboury
Post by Damian Ivanov
Yeah, so tl,dr what this is trying to say with one GPU and two
connectors, no multiseat possible using logind (yet, though this
was/is a planned feature). This is not a systemd/logind problem rather
than the driver provides you only one path per GPU (not a seperate per
port/connector).
I understand now. But in fact, I have one single card but can plug two
monitors: one on HDMI and the other one on VGA.
Shall i understand there is nothing to do with these two plugin outputs?
To be more precised, I have on the back of my computer two HDMI ports
and two Display Ports. Can't these two ports be used instead of buying
a usb display link ?
--
google.com/+arnaudgabourygabx
Damian Ivanov
2014-08-23 20:28:16 UTC
Permalink
Can't these two ports be used instead of buying a usb display link ?
Yes. That's what it actually mean's. I've read that people want to
improve the drivers in that part in the future, so this could be done,
but at the moment, no it's not possible.
arnaud gaboury
2014-08-23 20:31:58 UTC
Permalink
Post by Damian Ivanov
Can't these two ports be used instead of buying a usb display link ?
Yes. That's what it actually mean's. I've read that people want to
improve the drivers in that part in the future, so this could be done,
but at the moment, no it's not possible.
TY Damian for all your precious details. I understand now the whole scheme.
Post by Damian Ivanov
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Lennart Poettering
2014-08-25 17:17:39 UTC
Permalink
Post by Damian Ivanov
Yeah, so tl,dr what this is trying to say with one GPU and two
connectors, no multiseat possible using logind (yet, though this
was/is a planned feature).
It was/is? I have no intention to support this kind of multi-seat on
non-DRM drivers, and as long as they only expose one device to
userspace. We assign devices to seats, after all, and we won't assign a
device to two seats.

Lennart
--
Lennart Poettering, Red Hat
David Herrmann
2014-08-25 21:27:53 UTC
Permalink
Hi

On Mon, Aug 25, 2014 at 7:17 PM, Lennart Poettering
Post by Lennart Poettering
Post by Damian Ivanov
Yeah, so tl,dr what this is trying to say with one GPU and two
connectors, no multiseat possible using logind (yet, though this
was/is a planned feature).
It was/is? I have no intention to support this kind of multi-seat on
non-DRM drivers, and as long as they only expose one device to
userspace. We assign devices to seats, after all, and we won't assign a
device to two seats.
Multiseat with only a single DRM driver is not possible so far. This
is NOT a limitation of logind, but rather of DRM. There have been
ideas how to fix this, but so far no-one pushed it to the upstream
kernel. For now you need at least one separate DRM card per seat.

Thanks
David
arnaud gaboury
2014-08-23 19:31:48 UTC
Permalink
I have been able to write some udev rules.d for usb mouse/keyboard.
I plugout the device, then
$ dmesg | tail -n 4
~~~~~~
[21145.269421] input: Logitech USB-PS/2 Optical Mouse as
/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/0003:046D:C03E.000E/input/input30
~~~~~~~~~~
$ udevadm info --query=all --path=/devices/pci0000:00/0000:00:14.0
~~~~~~~
ID_FOR_SEAT=input-pci-0000_00_14_0-usb-0_5_1_0

Fine.

Now it seems I am at a dead end for my graphic card. As already
stated, I have only one card:/sys/class/drm/card0

I can not attach this physical device to more than one seat. So, for
the graphical display, I have no idea about to deal with. The tweak I
was using before was when using this xorg.conf:
--------------------------------------------------------
Section "ServerLayout"
Identifier "MultiSeat"
Screen 0 "Screen0"
Screen 1 "screen1" leftOf "Screen0"
EndSection

Section "ServerFlags"
Option "AllowMouseOpenFail" "true"
Option "AutoAddGPU" "off"
EndSection

## DEVICE SECTION ##
# Two identifiers (nvidia0 & nvidia1) #
# 1 Driver (nvidia) with 1 BusID : the graphic card #

Section "Device"
Identifier "nvidia0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:1:0:0"
Option "NoLogo" "1"
Option "UseDisplaydevice" "DFP"
Screen 0
EndSection

Section "Device"
Identifier "nvidia1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:1:0:0"
Option "NoLogo" "1"
Option "UseDisplaydevice" "DFP"
Screen 1
EndSection

## SCREEN SECTION ##
# Two screens, each one attached to 1 device #

Section "Screen"
Identifier "Screen0"
Device "nvidia0"
Monitor "CRT-0"
DefaultDepth 24
Subsection "Display"
Depth 24
EndSubsection
EndSection

Section "Screen"
Identifier "Screen1"
Device "nvidia1"
Monitor "DFP-1"
DefaultDepth 24
Subsection "Display"
Depth 24
EndSubsection
EndSection

## INPUT DEVICE SECTION ##
# 2 keyboards & 2 mouses #
# Driver is evdev. To list a device, open a terminal and test mouse
and event number #
# # cat /dev/input/mouse0 ... for mouse. Good when weird symboles when
moving the mouse #
# # cat /dev/input/event0 ... for keyboard #

Section "Inputdevice"
Identifier "keyboard0"
Driver "evdev"
Option "Device" "/dev/input/event14"
Option "XkbModel" "evdev"
Option "Xkblayout" "ch"
Option "XkbVariant" "fr"
Option "terminate:ctrl_alt_bksp"
EndSection

Section "Inputdevice"
Identifier "keyboard1"
Driver "evdev"
Option "Device" "/dev/input/event18"
Option "XkbModel" "evdev"
Option "Xkblayout" "ch"
Option "XkbVariant" "fr"
Option "terminate:ctrl_alt_bksp"
EndSection

Section "Inputdevice"
Identifier "mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse0"
EndSection

Section "Inputdevice"
Identifier "mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse1"
EndSection

-----------------------------

I do not know how to reproduce this when using two nvidia devices, as
shown in the xorg.conf. The only idea I have in mind is to "create" a
card1 in drm subsystem, but it sounds to me like a weird method.

Thank you for suggestion for the graphic card device.
arnaud gaboury
2014-08-25 14:25:18 UTC
Permalink
Post by poma
Don't forget to post config here when you're done. ;)
poma
Until now, I have unfortunately not be able to write a working
xorg.conf to dual seat with only one graphic card. I tried many
settings with xorg.conf and lightdm.conf, but still no luck.
Damian Ivanov
2014-08-25 15:37:29 UTC
Permalink
BTW: I guess http://dvdhrm.wordpress.com/2013/09/01/splitting-drm-and-kms-device-nodes/
was the post for splitting the GPU into different devices so that it
would be possible for logind
Post by arnaud gaboury
Post by poma
Don't forget to post config here when you're done. ;)
poma
Until now, I have unfortunately not be able to write a working
xorg.conf to dual seat with only one graphic card. I tried many
settings with xorg.conf and lightdm.conf, but still no luck.
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Damian Ivanov
2014-08-25 15:40:12 UTC
Permalink
and found also the bug report https://bugs.freedesktop.org/show_bug.cgi?id=66501
and that I asked the same question before :)
https://lists.fedoraproject.org/pipermail/devel/2013-October/190840.html
Post by Damian Ivanov
BTW: I guess http://dvdhrm.wordpress.com/2013/09/01/splitting-drm-and-kms-device-nodes/
was the post for splitting the GPU into different devices so that it
would be possible for logind
Post by arnaud gaboury
Post by poma
Don't forget to post config here when you're done. ;)
poma
Until now, I have unfortunately not be able to write a working
xorg.conf to dual seat with only one graphic card. I tried many
settings with xorg.conf and lightdm.conf, but still no luck.
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
poma
2014-09-02 06:27:15 UTC
Permalink
...
Post by poma
/etc/lightdm/lightdm.conf
[LightDM]
minimum-display-number=0
minimum-vt=1
user-authority-in-system-dir=true
[SeatDefaults]
greeter-session=lightdm-greeter
session-wrapper=/etc/X11/xinit/Xsession
[Seat:0]
xserver-command=/usr/bin/Xorg
xserver-config=/etc/X11/xorg.conf.nouveau
[Seat:1]
xdg-seat=seat-fu
xserver-command=/usr/bin/Xorg -sharevts -novtswitch
~~~~~~~~~~~~~~~~~~~~~~~~~~
/etc/X11/xorg.conf.nouveau
Section "Device"
Identifier "nvidia0"
Driver "nouveau"
EndSection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ loginctl seat-status seat0
seat0
Sessions: *1086 c15
...
├─/sys/devices/pci0000:00/0000:00:10.0/0000:01:00.0/drm/card1
│ drm:card1
├─/sys/devices/pci0000:00/0000:00:10.0/0000:01:00.0/graphics/fb0
│ [MASTER] graphics:fb0 "nouveaufb"
...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ udevadm info -q env -p /sys/class/drm/card1
DEVNAME=/dev/dri/card1
DEVPATH=/devices/pci0000:00/0000:00:10.0/0000:01:00.0/drm/card1
DEVTYPE=drm_minor
ID_FOR_SEAT=drm-pci-0000_01_00_0
ID_PATH=pci-0000:01:00.0
ID_PATH_TAG=pci-0000_01_00_0
MAJOR=226
MINOR=1
SUBSYSTEM=drm
USEC_INITIALIZED=67185
~~~~~~~~~~~~~~~~~~~~~~
$ man 1 loginctl
attach [NAME] [DEVICE...]
...
flush-devices
~~~~~~~~~~~~~~~~~~~~~~
/etc/udev/rules.d/72-seat-drm-pci-0000_00_04_1-usb-0_6_1_0.rules
TAG=="seat", ENV{ID_FOR_SEAT}=="drm-pci-0000_00_04_1-usb-0_6_1_0", ENV{ID_SEAT}="seat-fu"
/etc/udev/rules.d/72-seat-graphics-pci-0000_00_04_1-usb-0_6_1_0.rules
TAG=="seat", ENV{ID_FOR_SEAT}=="graphics-pci-0000_00_04_1-usb-0_6_1_0", ENV{ID_SEAT}="seat-fu"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ loginctl seat-status seat-fu
seat-fu
Sessions: *1 c1
├─/sys/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/drm/card0
│ drm:card0
└─/sys/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/graphics/fb1
[MASTER] graphics:fb1 "udldrmfb"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ udevadm info -q env -p /sys/class/drm/card0
DEVNAME=/dev/dri/card0
DEVPATH=/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/drm/card0
DEVTYPE=drm_minor
ID_FOR_SEAT=drm-pci-0000_00_04_1-usb-0_6_1_0
ID_PATH=pci-0000:00:04.1-usb-0:6:1.0
ID_PATH_TAG=pci-0000_00_04_1-usb-0_6_1_0
ID_SEAT=seat-fu
MAJOR=226
MINOR=0
SUBSYSTEM=drm
USEC_INITIALIZED=465981
~~~~~~~~~~~~~~~~~~~~~~~
$ modinfo -n nouveau
/lib/modules/3.15.10-200.fc20.x86_64/kernel/drivers/gpu/drm/nouveau/nouveau.ko
$ rpm -qf /usr/lib64/xorg/modules/drivers/nouveau_drv.so
xorg-x11-drv-nouveau-1.0.10-1.fc20.x86_64
$ modinfo -n udl
/lib/modules/3.15.10-200.fc20.x86_64/kernel/drivers/gpu/drm/udl/udl.ko
$ rpm -qf /usr/lib64/xorg/modules/drivers/modesetting_drv.so
xorg-x11-drv-modesetting-0.8.0-2.fc20.x86_64
$ rpm -q systemd
systemd-208-21.fc20.x86_64
$ rpm -qf /usr/bin/Xorg
xorg-x11-server-Xorg-1.14.4-11.fc20.x86_64
$ rpm -qf /etc/lightdm/lightdm.conf
lightdm-1.11.4-1.fc20.x86_64
Xorg without root
https://lists.fedoraproject.org/pipermail/test/2014-July/122190.html
This is a bare minimum config achieved for a multi(dual)seat setup via lightdm-1.11.7

~~~~~~~~~~~~~~~~~~~~~~~~~
/etc/lightdm/lightdm.conf
[LightDM]
minimum-vt=1
[SeatDefaults]
session-wrapper=/etc/X11/xinit/Xsession
[Seat:seat0]
xserver-config=/etc/X11/xorg.conf.nouveau

~~~~~~~~~~~~~~~

/etc/X11/xorg.conf.nouveau
Section "Device"
Identifier "nvidia0"
Driver "nouveau"
EndSection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ loginctl
SESSION UID USER SEAT
c1 105 lightdm seat-fu
c2 105 lightdm seat0
1 501 poma seat0
2 502 pia seat-fu


root tty1 /usr/bin/X :0 -seat seat0 -novtswitch -auth /var/run/lightdm/root/:0 -nolisten tcp vt1 -config /etc/X11/xorg.conf.nouveau
root ? /usr/bin/X :1 -seat seat-fu -sharevts -auth /var/run/lightdm/root/:1 -nolisten tcp


kernel-3.15.10-201.fc20.x86_64
systemd-208-21.fc20.x86_64
xorg-x11-server-Xorg-1.14.4-11.fc20.x86_64
lightdm-1.11.7-1.fc20.x86_64
lightdm-gtk-1.8.6-1.fc20.x86_64


poma
poma
2014-09-04 03:40:36 UTC
Permalink
$ systemctl get-default
graphical.target

~~~~~~~~~~~~~~~~

$ systemctl show display-manager -p Id
Id=lightdm.service

~~~~~~~~~~~~~~~~~~

$ systemctl is-enabled display-manager
enabled

~~~~~~~

$ systemctl is-active display-manager
active

~~~~~~~~~~~~~~~~~~~~~~~

$ lightdm --show-config
[LightDM]
A minimum-vt=1

[SeatDefaults]
A session-wrapper=/etc/X11/xinit/Xsession

[Seat:seat0]
A xserver-config=/etc/X11/xorg.conf.nouveau

Sources:
A /etc/lightdm/lightdm.conf

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ grep -v ^# /etc/lightdm/lightdm.conf
[LightDM]
minimum-vt=1

[SeatDefaults]
session-wrapper=/etc/X11/xinit/Xsession

[Seat:seat0]
xserver-config=/etc/X11/xorg.conf.nouveau

~~~~~~~~~~~~~~~~~~~~~~~~~~

$ cat /etc/X11/xorg.conf.nouveau
Section "Device"
Identifier "nvidia0"
Driver "nouveau"
EndSection

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ alternatives --display lightdm-greeter
lightdm-greeter - status is manual.
link currently points to /usr/share/xgreeters/lightdm-gtk-greeter.desktop
/usr/share/xgreeters/lightdm-gtk-greeter.desktop - priority 20
Current `best' version is /usr/share/xgreeters/lightdm-gtk-greeter.desktop.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ grep -v ^# /etc/lightdm/lightdm-gtk-greeter.conf
[greeter]
font-name=Sans 20
xft-antialias=true
xft-dpi=96
xft-hintstyle=hintfull
xft-rgba=rgb
show-indicators=~host;~spacer;~clock;~spacer;~session;~power

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ grep -i drivers /var/log/Xorg.0.log
[ 30.397] (II) Loading /usr/lib64/xorg/modules/drivers/nouveau_drv.so

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ ps axu | grep [X]org
root 584 0.3 1.2 219960 42272 tty1 Ss+ 04:26 0:02 /usr/libexec/Xorg.bin :0 -config /etc/X11/xorg.conf.nouveau -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt1 -novtswitch

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ loginctl list-sessions
SESSION UID USER SEAT
c1 989 lightdm seat0
1 1001 poma seat0

2 sessions listed.

~~~~~~~~~~~~~~~~~~~~~~~~

$ ls /etc/udev/rules.d/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ loginctl seat-status seat0
seat0
Sessions: *1 c1
Devices:
...
│ ├─/sys/devices/pci0000:00/0000:00:04.0/usb2/2-5/2-5:1.0/sound/card0
│ │ sound:card0 "Set"
│ ├─/sys/devices/pci0000:00/0000:00:04.0/usb2/2-5/2-5:1.3/0003:0D8C:000C.0003/input/input6
│ │ input:input6 "C-Media USB Headphone Set "
│ ├─/sys/devices/pci0000:00/0000:00:04.0/usb2/2-9/2-9:1.0/0003:1997:2433.0004/input/input7
│ │ input:input7 " Mini Keyboard"
│ └─/sys/devices/pci0000:00/0000:00:04.0/usb2/2-9/2-9:1.1/0003:1997:2433.0005/input/input8
│ input:input8 " Mini Keyboard"
...
│ ├─/sys/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/drm/card1
│ │ drm:card1
│ └─/sys/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/graphics/fb1
│ [MASTER] graphics:fb1 "udldrmfb"
...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ loginctl attach seat1 \
/sys/devices/pci0000:00/0000:00:04.0/usb2/2-5/2-5:1.0/sound/card0 \
/sys/devices/pci0000:00/0000:00:04.0/usb2/2-5/2-5:1.3/0003:0D8C:000C.0003/input/input6 \
/sys/devices/pci0000:00/0000:00:04.0/usb2/2-9/2-9:1.0/0003:1997:2433.0004/input/input7 \
/sys/devices/pci0000:00/0000:00:04.0/usb2/2-9/2-9:1.1/0003:1997:2433.0005/input/input8 \
/sys/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/drm/card1 \
/sys/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/graphics/fb1
==== AUTHENTICATING FOR org.freedesktop.login1.attach-device ===
Authentication is required for attaching a device to a seat.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ ls -1 /etc/udev/rules.d/
72-seat-drm-pci-0000_00_04_1-usb-0_6_1_0.rules
72-seat-graphics-pci-0000_00_04_1-usb-0_6_1_0.rules
72-seat-input-pci-0000_00_04_0-usb-0_5_1_3.rules
72-seat-input-pci-0000_00_04_0-usb-0_9_1_0.rules
72-seat-input-pci-0000_00_04_0-usb-0_9_1_1.rules
72-seat-sound-pci-0000_00_04_0-usb-0_5_1_0.rules

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ cat /etc/udev/rules.d/72-seat-*
TAG=="seat", ENV{ID_FOR_SEAT}=="drm-pci-0000_00_04_1-usb-0_6_1_0", ENV{ID_SEAT}="seat1"
TAG=="seat", ENV{ID_FOR_SEAT}=="graphics-pci-0000_00_04_1-usb-0_6_1_0", ENV{ID_SEAT}="seat1"
TAG=="seat", ENV{ID_FOR_SEAT}=="input-pci-0000_00_04_0-usb-0_5_1_3", ENV{ID_SEAT}="seat1"
TAG=="seat", ENV{ID_FOR_SEAT}=="input-pci-0000_00_04_0-usb-0_9_1_0", ENV{ID_SEAT}="seat1"
TAG=="seat", ENV{ID_FOR_SEAT}=="input-pci-0000_00_04_0-usb-0_9_1_1", ENV{ID_SEAT}="seat1"
TAG=="seat", ENV{ID_FOR_SEAT}=="sound-pci-0000_00_04_0-usb-0_5_1_0", ENV{ID_SEAT}="seat1"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ su -c 'systemctl restart systemd-udev-trigger.service'
Password:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ grep -i drivers /var/log/Xorg.1.log
[ 1438.393] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
[ 1438.397] (II) modesetting: Driver for Modesetting Kernel Drivers: kms

~~~~~~~~~~~~~~~~~~~~~~

$ ps axu | grep [X]org
root 584 0.2 1.5 222520 52104 tty1 Ss+ 04:26 0:04 /usr/libexec/Xorg.bin :0 -config /etc/X11/xorg.conf.nouveau -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt1 -novtswitch
root 1797 0.6 1.1 226756 38024 ? Sl 04:50 0:01 /usr/libexec/Xorg.bin :1 -seat seat1 -sharevts -auth /var/run/lightdm/root/:1 -nolisten tcp

~~~~~~~~~~~~~~~~~~~~~~~~

$ loginctl list-sessions
SESSION UID USER SEAT
c1 989 lightdm seat0
1 1001 poma seat0
c2 989 lightdm seat1
2 1002 pia seat1

4 sessions listed.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ loginctl seat-status seat1
seat1
Sessions: *3 c2
Devices:
├─/sys/devices/pci0000:00/0000:00:04.0/usb2/2-5/2-5:1.0/sound/card0
│ sound:card0 "Set"
├─/sys/devices/pci0000:00/0000:00:04.0/usb2/2-5/2-5:1.3/0003:0D8C:000C.0003/input/input6
│ input:input6 "C-Media USB Headphone Set "
├─/sys/devices/pci0000:00/0000:00:04.0/usb2/2-9/2-9:1.0/0003:1997:2433.0004/input/input7
│ input:input7 " Mini Keyboard"
├─/sys/devices/pci0000:00/0000:00:04.0/usb2/2-9/2-9:1.1/0003:1997:2433.0005/input/input8
│ input:input8 " Mini Keyboard"
├─/sys/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/drm/card1
│ drm:card1
└─/sys/devices/pci0000:00/0000:00:04.1/usb1/1-6/1-6:1.0/graphics/fb1
[MASTER] graphics:fb1 "udldrmfb"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ loginctl seat-status seat0
seat0
Sessions: *1 c1
Devices:
...
├─/sys/devices/pci0000:00/0000:00:10.0/0000:01:00.0/drm/card0
│ drm:card0
├─/sys/devices/pci0000:00/0000:00:10.0/0000:01:00.0/drm/renderD128
│ drm:renderD128
└─/sys/devices/pci0000:00/0000:00:10.0/0000:01:00.0/graphics/fb0
[MASTER] graphics:fb0 "nouveaufb"

~~~~~~~~~~~~~~~~~

$ hostnamectl status | grep 'System\|Kernel'
Operating System: Fedora 22 (Rawhide)
Kernel: Linux 3.17.0-0.rc3.git0.1.fc22.x86_64

$ rpm -qf /usr/bin/systemctl
systemd-216-3.fc22.x86_64

$ rpm -qf /usr/libexec/Xorg.bin
xorg-x11-server-Xorg-1.16.0-4.fc22.x86_64

$ rpm -qf /etc/lightdm/lightdm.conf
lightdm-1.11.8-1.fc21.x86_64

$ rpm -qf /etc/lightdm/lightdm-gtk-greeter.conf
lightdm-gtk-1.9.0-1.fc21.x86_64

$ man 1 systemctl :)


poma
poma
2015-05-14 16:48:41 UTC
Permalink
To conclude.

$ loginctl
SESSION UID USER SEAT
1 1000 poma
c3 105 lightdm seat1
c4 105 lightdm seat0

3 sessions listed.

$ ps ax | grep [X]org
1344 ? Sl 0:00 /usr/libexec/Xorg :0 -seat seat1 -sharevts -auth /var/run/lightdm/root/:0 -nolisten tcp
1347 tty1 Ss+ 0:00 /usr/libexec/Xorg :1 -seat seat0 -auth /var/run/lightdm/root/:1 -nolisten tcp vt1 -novtswitch


$ grep -i LoadModule /var/log/Xorg.0.log
… (II) LoadModule: "glx"
… (II) LoadModule: "modesetting" <--
… (II) LoadModule: "fbdev"
… (II) UnloadModule: "fbdev"
… (II) LoadModule: "vesa"
… (II) UnloadModule: "vesa"
… (II) LoadModule: "glamoregl"
… (II) LoadModule: "fb"

$ fbset -i -fb /dev/fb1 | grep Name
Name : udldrmfb


$ grep -i LoadModule /var/log/Xorg.1.log
… (II) LoadModule: "glx"
… (II) LoadModule: "nouveau" <--
… (II) LoadModule: "nv"
… (II) UnloadModule: "nv"
… (II) LoadModule: "modesetting"
… (II) LoadModule: "fbdev"
… (II) UnloadModule: "fbdev"
… (II) LoadModule: "vesa"
… (II) UnloadModule: "vesa"
… (II) LoadModule: "dri2"
… (II) LoadModule: "fb"
… (II) LoadModule: "shadowfb"
… (II) UnloadModule: "modesetting"
… (II) LoadModule: "exa"
… (II) LoadModule: "evdev"

$ fbset -i | grep Name
Name : nouveaufb


# Xorg -version

X.Org X Server 1.17.1
Release Date: 2015-02-10
X Protocol Version 11, Revision 0
...
Build ID: xorg-x11-server 1.17.1-12.fc21

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

All in all,
in X.Org X Server 1.17.1 modules are automatically induced in multi-seat environment,
therefore additional configuration files for Xorg X server are no longer necessary,
and overall *minimum* lightdm's config is:
~~~~~~~~~~~~~~~~~~~~~

$ lightdm --show-config
[LightDM]
A minimum-vt=1

[SeatDefaults]
A session-wrapper=/etc/X11/xinit/Xsession

~~~~~~~~
Sources:
A /etc/lightdm/lightdm.conf

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ lightdm --version
lightdm 1.14.0


That's super cool, isn't it.

Laércio de Sousa
2014-08-25 16:26:01 UTC
Permalink
I've just started following this discussion (so I don't know if it my reply
will be correctly chained), and I would like to make some comments:

* Starting with version 1.16, Xorg server no longer handles VTs if it was
started as a non-seat0 X server i.e., if -seat option with a non-seat0
value was passed. So there's no need to pass option -sharevts or using
systemd-multi-seat-x wrapper with this version.

* Moreover, a new xorg.conf entry called "MatchSeat" was introduced in
version 1.16. It allows configuring multiseat even if you're using non-KMS
video drivers. For example, with you have a NVIDIA graphics card with
binary driver, you can configure a secondary seat with the following
xorg.conf:

Section "Device"
Identifier "card0"
Driver "nvidia"
MatchSeat "seat-1"
EndSection

provided you tag another suitable device (e.g. a USB hub) as
"master-of-seat" and attach it to "seat-1".

About configuring multiseat using a single multi-head graphics card, the
only current available way to do this is with nested X servers:

1. Start a bare X server properly configured to span all available
monitors. It should be already running when your display manager service
starts.

2. On top of this host X server, start a nested X server for each seat. The
nested X server window geometry (size & position) should be calculated to
fit a given monitor. Currently there are two options for nested X servers:
* Xephyr (must be built with option --enable-kdrive-evdev, supports
input device coldplugging only)
* Xorg + xf86-video-nested driver (early development, best option for
multiseat)

Next Xephyr release (1.17) will have support to a special "-output NAME"
option which will make it fit a given output monitor. Desired NAME value
can be obtained by running "xrandr -display <HOSTX-DISPLAY> -q".

I'm already using this scheme to set up a 3-seat system (1 integrated Intel
graphics device for seat0 + 1 Silicon Motion SM501 dual-head PCI graphics
card for the other seats). Since nested X servers don't touch VTs, I'm
afraid of using such X servers with seat0.
--
*Laércio de Sousa*
*Orientador de Informática*
*Escola Municipal "Professor Eulálio Gruppi"*
*Rua Ismael da Silva Mello, 559, Mogi Moderno*
*Mogi das Cruzes - SPCEP 08717-390*
Telefone: (11) 4726-8313
Lennart Poettering
2014-08-25 18:13:47 UTC
Permalink
Post by Laércio de Sousa
I've just started following this discussion (so I don't know if it my reply
* Starting with version 1.16, Xorg server no longer handles VTs if it was
started as a non-seat0 X server i.e., if -seat option with a non-seat0
value was passed. So there's no need to pass option -sharevts or using
systemd-multi-seat-x wrapper with this version.
I think we can remove the entire wrapper now, right? Would be happy to
merge a patch that kills it of.

Lennart
--
Lennart Poettering, Red Hat
Laércio de Sousa
2014-08-25 18:27:58 UTC
Permalink
Post by Lennart Poettering
I think we can remove the entire wrapper now, right? Would be happy to
merge a patch that kills it of.
I agree. Or at least make systemd build option --disable-multi-seat-x the
default for a while, until all major Linux distros ship with xorg-server
1.16.
--
*Laércio de Sousa*
*Orientador de Informática*
*Escola Municipal "Professor Eulálio Gruppi"*
*Rua Ismael da Silva Mello, 559, Mogi Moderno*
*Mogi das Cruzes - SPCEP 08717-390*
Telefone: (11) 4726-8313
Lennart Poettering
2014-08-26 02:08:38 UTC
Permalink
Post by Laércio de Sousa
Post by Lennart Poettering
I think we can remove the entire wrapper now, right? Would be happy to
merge a patch that kills it of.
I agree. Or at least make systemd build option --disable-multi-seat-x the
default for a while, until all major Linux distros ship with xorg-server
1.16.
I thik we should drop it. I added this to the TODO list now.

Lennart
--
Lennart Poettering, Red Hat
arnaud gaboury
2014-08-25 18:59:42 UTC
Permalink
Post by Laércio de Sousa
provided you tag another suitable device (e.g. a USB hub) as
"master-of-seat" and attach it to "seat-1".
I will switch to nouveau, as I do not want to go this way.
Post by Laércio de Sousa
About configuring multiseat using a single multi-head graphics card, the
I will forget this trick. As seats will not ask for huge graphic
ressources (no hard gaming), best is to engage in a clean fashion with
DRM support drivers.

TY for your long answer. I see this kind of stuff is of interest, and
solid documentation quite rare.
Lennart Poettering
2014-08-25 17:09:25 UTC
Permalink
Post by arnaud gaboury
Archlinux 3.16.1
systemd 215-4
Xorg 1.16
Until now, I have been enable to set a dual seat following the
archwiki[1]. In short, I had to modify the /etc/X11/xorg.conf
accordingly, then $ startx -- layout seat0 -config
xorg.conf.multiseat.
I am now trying to migrate to the new facilities for multiseats from
loginctl[2] and Xorg 1.16 with rootless X[3]. Documentation is very
rare, and I find it difficult to set up the global scheme.
I understand from loginctl(1) I have to first create 1 new seat with
listed by $lspci).
Then, I will attach a usb keyboard & mouse the same way, right ?
Now, as for the monitor & session layout, i have no idea how to deal
with it and the global /etc/X11/xorg.conf . Same as before or is there
now a more specific way?
Then, once I have created seat1, I am left with two seats : seat0 and
seat1. I understand I have to
bind a user session login to a specific seat, right ? Concretely, how do it ?
Thank you for any hint/pointer/suggestion about the path to follow.
Note that the multi-seat stuff is about assigning kernel devices to
seats. Drivers that do not follow the kernel driver model and DRM are
hence not really supported (such as the nvidia driver), and if you want
to "split" a single gfx card into two seats, then we can't cover this
either.

For the first issue please use the open source nvidia driver, or work
with nvidia, to get them to open up the closed source one.

For the second issue, please work with the driver authors, to possibly
allow turning one graphics card into two DRM devices, so that we can
individually assign them to different things.

Lennart
--
Lennart Poettering, Red Hat
Loading...