Logging out from a FUS session does not reliably return to VT7

Bug #851612 reported by Rick Spencer on 2011-09-16
146
This bug affects 23 people
Affects Status Importance Assigned to Milestone
Light Display Manager
High
Robert Ancell
lightdm (Ubuntu)
High
Robert Ancell

Bug Description

[Problem]
Logging out of a second user session results in a black screen with blinking cursor, until you manually switch to vt7. Might also be caused when screen is locked because of inactivity.

[Impact]
Frequency of occurrence may be about 1 in 4. Not a hardware-specific problem, so can be encountered by most users.

[Development Fix]
Adding a VT_WAITACTIVE after the VT_ACTIVATE ioctl helps reduce the chance of a race condition between LightDM, the kernel, ConsoleKit, and X, but is not a complete solution. This change was introduced to Precise as of version 1.1.2-0ubuntu1 on Feb 10th.

[Stable Fix]
The development change was not a complete fix. Thus the change is not valid for SRUing.

[Text Case]
1. Have a multi-user system
2. Start up and log in as a user
3. Use the User Menu to switch to another user
4. You will be at the Unity Greeter, log in as the second user
5. The second user session will load
6. Choose Log Out from the power/setting menu
7. You will be at the Unity Greeter
8. select and enter the password for the logged in user
Broken Behavior:
The screen turns black and shows a blinking cursor
Manually switching to VT7 shows the first user session, and works fine

Fixed Behavior:
Automatically returned to VT7 after entering the password for the first user

[Regression Potential]
<fill me in with a discussion of likelihood and potential severity of regressions and how users could get inadvertently affected.

[Original Report]
Steps:
1. Have a multi-user system
2. Start up and log in as a user
3. Use the Use Menu to switch to another user
4. You will be at the Unity Greeter, log in as the second user
5. The second user session will load
6. Choose Log Out from the power/setting menu
7. You will be at the Unity Greeter
8. select and enter the password for the logged in user

Result:
The screen turns black and shows a blinking cursor
Manually switching to VT7 shows the first user session, and works fine

Expected:
Automatically returned to VT7 after entering the password for the first user

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: lightdm 0.9.7-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic i686
NonfreeKernelModules: wl
ApportVersion: 1.23-0ubuntu1
Architecture: i386
Date: Fri Sep 16 08:19:11 2011
InstallationMedia: Ubuntu-Netbook 10.04 "Lucid Lynx" - Alpha i386 (20100329)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: lightdm
UpgradeStatus: Upgraded to oneiric on 2011-09-11 (4 days ago)

summary: - Logging out from a FUSA session does not reliably return to VT7
+ Logging out from a FUS session does not reliably return to VT7
Robert Ancell (robert-ancell) wrote :

Confirmed the behaviour. Note from my logs LightDM is doing the correct thing and switching to the right VT (only relevant log items shown):
[+24642.17s] DEBUG: User bob authorized
...
[+24642.19s] DEBUG: Greeter requests session ubuntu
[+24642.20s] DEBUG: Switching to existing session for user bob
[+24642.20s] DEBUG: Unlocking display
[+24642.20s] DEBUG: Unlocking ConsoleKit session 30641b34844b43284750e91300000009-1316130205.440319-86078405
[+24642.22s] DEBUG: Activating VT 7
[+24642.22s] DEBUG: Stopping greeter display being switched from
[+24642.22s] DEBUG: Stopping display
...
[+24644.03s] DEBUG: Releasing VT 8
...
[+24644.03s] DEBUG: Display stopped

Changed in lightdm (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in lightdm (Ubuntu Oneiric):
assignee: nobody → Robert Ancell (robert-ancell)
Changed in lightdm (Ubuntu Oneiric):
milestone: none → ubuntu-11.10
Robert Ancell (robert-ancell) wrote :

I just tried this today and it's behaving correctly for me (lightdm 1.0.0, unity-greeter 0.1.1).

Sebastien Bacher (seb128) wrote :

Robert, do you know if there was a recent fix for it? I run into it yesterday with current Oneiric, I will try today with the current updates though

Hernando Torque (htorque) wrote :

Seems to work with those versions.

Robert Ancell (robert-ancell) wrote :

No, there were no changes in lightdm around this code. It's possible that something in the kernel/video drivers changed?

tags: added: rls-mgr-o-tracking
Hernando Torque (htorque) wrote :

Seems this needed more tries - I'm still getting it. Whenever I'm hitting the bug, the X process from the second user is still around after logging out (I guess it doesn't matter that it's not having the "-background none" parameter?).

Changed in lightdm:
status: New → Triaged
importance: Undecided → High
Martin Pitt (pitti) wrote :

I sometimes get this bug as well, but in most cases it works. I get perhaps one failure in four tries. So the reproduction recipe has to be carried out several times, possibly with reboots in between.

Changed in lightdm (Ubuntu Oneiric):
milestone: ubuntu-11.10 → oneiric-updates

I think I experienced the same thing just now. I was testing a few different shells, lxpanel, gnome-shell, unity-2d, and unity. Sometimes, when logging out, I was not presented with a login screen. I've also noticed that this can happen when the screen is automatically locked because of inactivity.

Michael Kozma (myckeul) wrote :

This bug persist in final release of Oneiric...

I have upgraded another computer from 11.04 to 11.10 yesterday an this bug is happened to on this computer.

I can't switch to another user if a session is opened and i can't return to my session ... I must restart to login.

ninebelow (jared-7) wrote :

I am having a similar problem with 11.10 and user switching. I seem to be missing the switch user menu option which is sorely missed, but if I lock the screen and then switch users and try logging in as another user after entering the password it does not start a session and I end up having to Ctrl-Alt-F2 and rebooting the system using command line.

Changed in xorg-server (Ubuntu):
importance: Undecided → High
Changed in xorg-server (Ubuntu Oneiric):
importance: Undecided → High
Robert Ancell (robert-ancell) wrote :

Still no progress on finding out why this is occurring. Some speculation:
- ConsoleKit is intercepting the VT switch and stopping it working. GDM uses ConsoleKit to do the VT switching but this is not easy to do in LightDM with the current architecture (it doesn't assume that CK is available, it switches before the session is started).
- The X server is not correctly getting the frambuffer when the VT switch occurs - unlikely as it's not occurring with GDM, but could be a timing issue.

Need some Kernel/ConsoleKit/X experience to find where what stage of the VT switch is failing.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg-server (Ubuntu Oneiric):
status: New → Confirmed
Changed in xorg-server (Ubuntu):
status: New → Confirmed
Anthony Hook (anthonyhook) wrote :

I am also experiencing this issue.

Martin Pitt (pitti) on 2011-12-09
Changed in lightdm (Ubuntu):
milestone: oneiric-updates → ubuntu-12.04-beta-1
Robert Ancell (robert-ancell) wrote :

Chris Halse Rogers had a look into this and he came to the conclusion that adding a VT_WAITACTIVE after the VT_ACTIVATE ioctl may help the situation. It looks like there is a race condition somewhere between LightDM, the kernel, ConsoleKit and X and adding the VT_WAITACTIVE either solves this (or hides it). Sebastian Bacher tried this patch and it seemed to improve the situation for him, I've been running with that patch today and it seems good too. So I've made that change to master.

Changed in lightdm:
status: Triaged → Fix Committed
Changed in lightdm (Ubuntu):
status: Triaged → Fix Committed
Changed in lightdm:
assignee: nobody → Robert Ancell (robert-ancell)
Bryce Harrington (bryce) on 2012-02-03
Changed in xorg-server (Ubuntu):
assignee: nobody → Chris Halse Rogers (raof)
status: Confirmed → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.1.2-0ubuntu1

---------------
lightdm (1.1.2-0ubuntu1) precise; urgency=low

  * New upstream release:
    - Add regression tests for getting the user language and layout
    - Stop accidentally distributing libsystem
    - Fix introspection bindings not containing any methods (LP: #920810)
    - lightdm-set-defaults can now set the autologin user
    - Add Python greeter regression tests (representative of all introspection
      based greeters)
    - Wait for the VT to become active when switching to avoid a suspected
      race condition somewhere between LightDM, X, ConsoleKit and the kernel.
      (LP: #851612)
    - Stop lightdm_greeter_start_session_sync() blocking on success.
  * debian/lightdm.prerm:
    - Fix incorrect location of lightdm binary (found by Rolf Anders)
 -- Robert Ancell <email address hidden> Fri, 10 Feb 2012 17:32:47 +1100

Changed in lightdm (Ubuntu):
status: Fix Committed → Fix Released
Robert Ancell (robert-ancell) wrote :

Putting back to triaged - the uploaded fix solves some of the problems but there's still a lockup that is being worked on.

Changed in lightdm (Ubuntu):
status: Fix Released → Triaged
Martin Pitt (pitti) on 2012-03-02
Changed in lightdm (Ubuntu):
milestone: ubuntu-12.04-beta-1 → ubuntu-12.04-beta-2
tags: added: blocks-hwcert-enablement
Shih-Yuan Lee (fourdollars) wrote :

This debdiff is for oneiric.
Please help to sponsor this patch.
Thanks.

The attachment "lightdm_patch_for_oneiric.debdiff" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Martin Pitt (pitti) wrote :

Shih-Yuan, Robert said that there is still a lockup, and it is not yet fixed properly in precise. So it seems a little premature to upload this to stable at this point? Also, the SRU policy forbids this, bugs need to be fixed in the development release (precise) first.

Thanks!

Shih-Yuan Lee (fourdollars) wrote :

Martin, no problem.
I'm sorry to disturb you.

Bryce Harrington (bryce) on 2012-03-22
description: updated
Bryce Harrington (bryce) wrote :

Unsubscribing sponsors as per Martin Pitt's comment #21, as the patch is not suitable for SRU.

However, I've gone ahead and fleshed out the SRU request in the description. Hopefully that'll save a bit of work if/when a valid fix does become available.

Shih-Yuan, thank you for your attention to this problem and for proposing the patch.

description: updated
Bryce Harrington (bryce) on 2012-03-28
Changed in xorg-server (Ubuntu Oneiric):
status: Confirmed → Triaged
Martin Pitt (pitti) on 2012-03-30
Changed in lightdm (Ubuntu):
milestone: ubuntu-12.04-beta-2 → ubuntu-12.04
Jesse Sung (wenchien) wrote :

Seems that this fix does not work well with a multiseat setup...

Saw this in lightdm.log (system call interrupted because of ctrl-alt-del pressed):
[+2.97s] DEBUG: New display ready, switching to it
[+2.97s] DEBUG: Activating VT 8
[+77.56s] WARNING: Error using VT_WAITACTIVE 8 on /dev/console: Interrupted system call
[+77.56s] DEBUG: Got signal 15 from process 1
[+77.56s] DEBUG: Caught Terminated signal, shutting down

And in x-1-greeter.log:
[+0.48s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.48s] DEBUG: Loading user /org/freedesktop/Accounts/User1001
[+0.50s] DEBUG: Loading user /org/freedesktop/Accounts/User1000
[+50.56s] WARNING: Error getting session list from org.freedesktop.DisplayManager: Timeout was reached

On vt7, unity-greeter would get stuck after password input.
On vt8, unity-greeter appears after that "getting session list timeout", which is about a minute later than vt7, and does not have a password input field.

Jesse Sung (wenchien) wrote :

Forgot to mention that I'm using precise with lightdm 1.2.0-0ubuntu2.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lightdm (Ubuntu Precise):
status: New → Confirmed
Changed in xorg-server (Ubuntu Precise):
status: New → Confirmed
Eric Erfanian (eric-erfanian) wrote :

I am also experiencing this problem with lightdm 1.4 and lightdm-kde on Arch Linux. Steps to reproduce:

1. Login as User1.
2. Start a new session as User2.
3. Switch back to User1.
4. Log out as User1.

5. Screen sits with blinking cursor. I can manually switch to User2 using FN + F8, or what-have-you.

Once I log out both users lightdm returns to the login screen as expected. I am able to reproduce this bug every time.

jhoechtl (johann-hoechtl) wrote :

This bug seems to be fixed by this descriptions:

https://bugzilla.redhat.com/show_bug.cgi?id=859347

Changed in xorg-server (Ubuntu Oneiric):
status: Triaged → Won't Fix
Changed in lightdm (Ubuntu Oneiric):
status: Triaged → Won't Fix
kao (kao1985) wrote :

Experiencing it on Ubuntu 14.04, lightdm 1.9.6
Steps to reproduce
1. Login as user1 (starts session on vt7)
2. Switch to user2 (starts session on vt8)
3. Try to switch to user1 session.
Attempt brings to black X screen (just cross mouse pointer). It seems lightdm starts X only on vt9.

Thus, there are three X terminals (vt7, vt8, vt9).
Switching to another user is possible via manual ctrl-alt-f[7-8] only
Attempt to switch via indicator-session always brings to vt9

Robert Ancell (robert-ancell) wrote :

I'm going to close this bug, since it's so old and the exact causes are unclear. If you are experiencing issues like this please open new bugs as that will make it easier to work out the issue. Also see bug 1566073 which may resolve some of these problems.

Changed in lightdm:
status: Fix Committed → Fix Released
Changed in lightdm (Ubuntu Oneiric):
assignee: Robert Ancell (robert-ancell) → nobody
no longer affects: xorg-server (Ubuntu)
no longer affects: xorg-server (Ubuntu Oneiric)
no longer affects: xorg-server (Ubuntu Precise)
Changed in lightdm (Ubuntu):
status: Triaged → Fix Released
no longer affects: lightdm (Ubuntu Oneiric)
no longer affects: lightdm (Ubuntu Precise)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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