display number selection algorithm does not work properly when several xlocal or vnc sessions start at once
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Light Display Manager |
Fix Released
|
High
|
Unassigned | ||
lightdm (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
when we start in multi-seat configuration
[Seat:0]
type=xlocal
xserver-
xserver-
xserver-
[Seat:1]
type=xlocal
xserver-
xserver-
xserver-
lightdm start two X-server with the same display, e.g.
[+0.00s] DEBUG: Loading seat Seat:0
[+0.00s] DEBUG: Starting seat
[+0.00s] DEBUG: Starting new display for greeter
[+0.00s] DEBUG: Starting local X display
[+0.01s] DEBUG: Could not run plymouth --ping: Failed to execute child process "plymouth" (No such file or directory)
[+0.01s] DEBUG: Using VT 7
[+0.01s] DEBUG: Activating VT 7
[+0.01s] DEBUG: Logging to /var/log/
[+0.01s] DEBUG: Writing X server authority to /var/run/
[+0.01s] DEBUG: Launching X Server
[+0.02s] DEBUG: Launching process 7327: /usr/bin/X :0 -config /etc/X11/xorg.conf -layout Seat-0 -auth /var/run/
[+0.02s] DEBUG: Waiting for ready signal from X server :0
[+0.02s] DEBUG: Loading seat Seat:1
[+0.02s] DEBUG: Starting seat
[+0.02s] DEBUG: Starting new display for greeter
[+0.02s] DEBUG: Starting local X display
[+0.02s] DEBUG: Using VT 8
[+0.02s] DEBUG: Activating VT 8
[+0.04s] DEBUG: Logging to /var/log/
[+0.04s] DEBUG: Writing X server authority to /var/run/
[+0.04s] DEBUG: Launching X Server
[+0.04s] DEBUG: Launching process 7332: /usr/bin/X -novtswitch -sharevts :0 -config /etc/X11/xorg.conf -layout Seat-1 -auth /var/run/
[+0.04s] DEBUG: Waiting for ready signal from X server :0
the source of the problem is a new implementation of get_free_
We start both X-servers almost simultaneously, so the fist one (Seat-0) does not have enough time to create "/tmp/.X0-lock" file. Thus "lightdm" decide that display ":0" is free and use them for the second X-server.
There are several way to resolve a problem
1) start second seat after the first one started
2) make display number configurable for each seat, so the user can tweak it (solve the problem partially)
3) move old display selection scheme to global scope and use it from both xlocal and vnc seats
Changed in lightdm: | |
status: | Fix Committed → Fix Released |
Ups...
I fix a problem by a way (2) "make display number configurable for each seat" and unfortunately i forget to store original "lightdm.log"..., so i use a fixed "lightdm.log" and replace ":1" with ":0".
Some places were omitted, please treat all mentions of ":1" in the "lightdm.log" from post above as ":0"