MultiSeat - Logind adds seats out of order

Bug #1627675 reported by BytEvil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd
New
Undecided
Unassigned

Bug Description

[root@KODI ~]# loginctl list-seats
SEAT
seat2
seat1
seat0

3 seats listed.

Udev Seat Rules: /etc/udev/rules.d/72-seats.rules

# 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:14.0/usb1/1-3/1-3.3/*", ENV{ID_SEAT}="seat0", TAG+="seat0"
TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/*", ENV{ID_SEAT}="seat0", TAG+="seat0"

# assign video cards
TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:01.0/0000:01:00.0/*", ENV{ID_SEAT}="seat0", TAG+="seat0"
TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:10.0/0000:06:00.0/*", ENV{ID_SEAT}="seat1", TAG+="seat1"
TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:09.0/0000:05:00.0/*", ENV{ID_SEAT}="seat2", TAG+="seat2"

LightDM Config: /etc/lightdm/lightdm.conf

[LightDM]
run-directory = /run/lightdm
logind-check-graphical = true
minimum-vt=7

[Seat:*]
greeter-session = lightdm-gtk-greeter
greeter-hide-users = false
session-wrapper = /etc/lightdm/Xsession
pam-autologin-service = lightdm-autologin
user-session = gnome

[Seat:seat0]
xserver-layout=seat0
xserver-command=/usr/bin/X0 :0 -nolisten tcp vt7 -sharevts -novtswitch
autologin-guest=false
autologin-user=vis
autologin-user-timeout=0

[Seat:seat1]
xserver-layout=seat1
xserver-command=/usr/bin/X1 :1 -nolisten tcp vt8 -sharevts -novtswitch
autologin-user=vis1
autologin-user-timeout=1

[Seat:seat2]
xserver-layout=seat2
xserver-command=/usr/bin/X2 :2 -nolisten tcp vt9 -sharevts -novtswitch
autologin-user=vis2
autologin-user-timeout=2

Looking at systemctl status lightdm.service I see that the seat number is automatically being added to the xserver command overriding what I had on the xserver command.

● lightdm.service - Light Display Manager
   Loaded: loaded (/usr/lib/systemd/system/lightdm.service; disabled; vendor preset: disabled)
   Active: active (running) since Пн 2016-09-26 13:24:47 SAMT; 3s ago
     Docs: man:lightdm(1)
 Main PID: 3440 (lightdm)
    Tasks: 7 (limit: 4915)
   CGroup: /system.slice/lightdm.service
           ├─3440 /usr/bin/lightdm
           ├─3446 /usr/lib/xorg-server/Xorg :0 -layout seat2 -seat seat2 -auth /run/lightdm/root/:0 -nolisten tcp
           ├─3447 /usr/lib/xorg-server/Xorg :1 -layout seat1 -seat seat1 -auth /run/lightdm/root/:1 -nolisten tcp
           └─3449 /usr/lib/xorg-server/Xorg :2 -layout seat0 -seat seat0 -auth /run/lightdm/root/:2 -nolisten tcp vt7 -novtswitch

I tried putting the full set of options on the xsever-command line in lightdm.conf but the system added same options to the end of it overriding the seat number.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I'm not sure what the problem is here - is it because the seats are "seat2", "seat1", "seat0" instead or "seat0", "seat2", "seat1"?

LightDM just adds the seats in the order logind defines. It seems to have correctly matched what 'loginctl list-seats' shows so I think it's doing the right thing.

Changed in lightdm:
status: New → Incomplete
Revision history for this message
BytEvil (itemcode) wrote :

After reboot seats order changed randomly.

[root@KODI ~]# loginctl list-seats
SEAT
seat1
seat0
seat2

● lightdm.service - Light Display Manager
   Loaded: loaded (/usr/lib/systemd/system/lightdm.service; disabled; vendor preset: disabled)
   Active: active (running) since Ср 2016-09-28 10:26:05 SAMT; 2s ago
     Docs: man:lightdm(1)
 Main PID: 2127 (lightdm)
    Tasks: 7 (limit: 4915)
   CGroup: /system.slice/lightdm.service
           ├─2127 /usr/bin/lightdm
           ├─2132 /usr/lib/xorg-server/Xorg :1 :0 -layout seat1 -seat seat1 -auth /run/lightdm/root/:0 -nolisten tcp
           ├─2134 /usr/lib/xorg-server/Xorg :0 :1 -layout seat0 -seat seat0 -auth /run/lightdm/root/:1 -nolisten tcp vt7 -novtswitch
           └─2148 /usr/lib/xorg-server/Xorg :2 :2 -layout seat2 -seat seat2 -auth /run/lightdm/root/:2 -nolisten tcp

сен 28 10:26:04 KODI systemd[1]: Starting Light Display Manager...
сен 28 10:26:05 KODI systemd[1]: Started Light Display Manager.

lightdm.conf now is:

[LightDM]
run-directory = /run/lightdm
logind-check-graphical = true
minimum-vt=7

[Seat:*]
greeter-session = lightdm-gtk-greeter
greeter-hide-users = false
session-wrapper = /etc/lightdm/Xsession
pam-autologin-service = lightdm-autologin
user-session = gnome

[Seat:seat2]
xserver-command = /usr/bin/X2 :2
xserver-layout = seat2
autologin-user = vis2
autologin-user-timeout = 0

[Seat:seat1]
xserver-command = /usr/bin/X1 :1
xserver-layout = seat1
autologin-user = vis1
autologin-user-timeout = 0

[Seat:seat0]
xserver-command = /usr/bin/X0 :0
xserver-layout = seat0
autologin-user = vis
autologin-user-timeout = 0

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Re-assigning to systemd - the seats are controlled by logind and lightdm just uses the order it is given. The cause might be logind or some script that is setting the seats.

affects: lightdm → systemd
Changed in systemd:
status: Incomplete → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.