Double locking a seat causes an X server to be launched and killed

Bug #1403273 reported by Jesús González
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
Fix Released
Medium
Unassigned

Bug Description

If a seat is locked when a (non-resettable) greeter is already executing, a new X server is launched. But anyway, when the X server has finished launching, lightdm decides to switch back to the existing greeter instead of executing a new one, and kills the X server. Therefore the X server launch is useless and a waste of time and resources.

[Test Case]
1. Lock a session (e.g. executing "dm-tool lock").
2. When the greeter is launched, switch back to the locked session using the VT mechanisms (i.e. Ctrl+Alt+F7).
3. Lock the session again.
4. After a short delay, the greeter is activated again. But if you check the lightdm log file, you can observe that a new X server (display :2) has been started then killed once initialized.

[Root cause]
In function seat_lock() in seat.c, an existing greeter is searched using function find_resettable_greeter (seat). If a greeter exists, but is not resettable, then it's not reused (at least at that moment), a new greeter is created, and an X server is launched.

But when the X server launch process has finished and authentication of the new greeter session has succeeded, in the callback function session_authentication_complete_cb() in seat.c, a previous user session is searched, which the previous greeter matches, and therefore that previous session is activated and the new session is stopped (also stopping the associated new X server).

Related branches

Changed in lightdm:
importance: Undecided → Medium
status: New → Triaged
Changed in lightdm:
status: Triaged → Fix Committed
milestone: none → 1.17.0
Changed in lightdm:
status: Fix Committed → Fix Released
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.