← Back to team overview

desktop-packages team mailing list archive

[Bug 851362] Re: display number selection algorithm does not work properly when several xlocal or vnc sessions start at once

 

** Branch linked: lp:~ubuntu-desktop/lightdm/ubuntu

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to lightdm in Ubuntu.
https://bugs.launchpad.net/bugs/851362

Title:
  display number selection algorithm does not work properly when several
  xlocal or vnc sessions start at once

Status in Light Display Manager:
  Fix Released
Status in “lightdm” package in Ubuntu:
  Fix Committed

Bug description:
  when we start in multi-seat configuration

  [Seat:0]
  type=xlocal
  xserver-command=/usr/bin/X
  xserver-layout=Seat-0
  xserver-config=/etc/X11/xorg.conf

  [Seat:1]
  type=xlocal
  xserver-command=/usr/bin/X -novtswitch -sharevts
  xserver-layout=Seat-1
  xserver-config=/etc/X11/xorg.conf

  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/lightdm/:0.log
  [+0.01s] DEBUG: Writing X server authority to /var/run/lightdm/root/:0
  [+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/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
  [+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/lightdm/:0.log
  [+0.04s] DEBUG: Writing X server authority to /var/run/lightdm/root/:0
  [+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/lightdm/root/:1 -nolisten tcp vt8 -novtswitch
  [+0.04s] DEBUG: Waiting for ready signal from X server :0

  the source of the problem is a new implementation of get_free_display_number() in "xserver-local.c" and "xserver-xvnc.c".
  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/lightdm/+bug/851362/+subscriptions