Double login to switch back to my session after closing the guest session

Bug #1633749 reported by Hadrien
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
unity (Ubuntu)
Fix Released
High
Andrea Azzarone
Yakkety
Fix Released
Undecided
Unassigned

Bug Description

Ubuntu 16.10 x64

[Impact]
Right now it can happen that the user is asked to unlock the screen two times, leading to confusion and waste of time

[Test case]
* I have my session open and want to temporarily switch to the guest session. I click on the appropriate item (top right menu of Unity).
  * I am now on the guest session. After I'm done, I close the guest session.
  * I am now in front of a screen where I can input my password to go back to my session. The wallpaper is the default Ubuntu wallpaper as when I am not logged in.
  * After I validate my password, another screen is displayed that asks my again to enter my password. That time, the wallpaper is my personnal wallpaper I have in my session.
  * I enter my password again and I am back to my session.

I did not have to enter my password twice in previous versions of Ubuntu when switching of sessions.

[Regression potential]
* Please make sure that on "user switching" the lockscreen is correctly triggered and a simple tty switch to the old session shows a locked session.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: lightdm 1.19.5-0ubuntu1
ProcVersionSignature: Ubuntu 4.8.0-22.24-generic 4.8.0
Uname: Linux 4.8.0-22-generic x86_64
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Oct 15 18:26:17 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2016-10-14 (0 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
SourcePackage: lightdm
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Hadrien (psydk) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your report; I made the same observation.

Changed in lightdm (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Robert Ancell (robert-ancell) wrote :

The log shows LightDM doing the correct thing - it unlocks the logind session when you get to the greeter. I suspect that Unity has regressed and is not removing its lock screen when this occurs.

Changed in unity (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity (Ubuntu):
status: New → Confirmed
Andrea Azzarone (azzar1)
Changed in unity (Ubuntu):
assignee: nobody → Andrea Azzarone (azzar1)
Revision history for this message
Sebastien Bacher (seb128) wrote :

copying debug info from IRC

"the enviroment variable XDG_SESSION_ID is not set anymore, that's the problem, we're not listening to the correct dbus path"

seems to be another fallover from the systemd user session transition

tags: added: systemd-session
Andrea Azzarone (azzar1)
no longer affects: lightdm (Ubuntu)
Changed in unity (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

The reason is that (user) D-Bus and (user) systemd services don't run in the session any more, as they apply to all sessions of that user. To illustrate, check "systemctl status" and compare the bits that are directly under user@1000.service (user-global services) vs. the bits that are in the logind session (session-XX.scope).

So right now these don't have a "native" XDG_SESSION_ID. The intention is that you don't assume XDG_SESSION_ID and a D-Bus object path, but you query logind for it:

$ busctl call org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager GetUser u `id -u`
o "/org/freedesktop/login1/user/_1000"
$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1/user/_1000 org.freedesktop.login1.User Display
(so) "c1" "/org/freedesktop/login1/session/c1"

This is actually a lot more comfortable if you use libsystemd and sd_uid_get_display(), like in https://cgit.freedesktop.org/polkit/commit/?id=a68f5dfd76 .

As a hack we could poke that into the graphical session units without poking it into *all* user services (as it would be conceptually wrong for e. g. gvfs, keyring, or pulseaudio), e. g. in unity.service's ExecStartPre=. But I think it's actually not difficult to fix it the proper way.

Andrea Azzarone (azzar1)
Changed in unity (Ubuntu):
status: In Progress → Fix Committed
Changed in unity (Ubuntu):
status: Fix Committed → Fix Released
Andrea Azzarone (azzar1)
description: updated
Andrea Azzarone (azzar1)
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Hadrien, or anyone else affected,

Accepted unity into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/unity/7.5.0+16.10.20161112-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in unity (Ubuntu Yakkety):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Alexey Kulik (doctor-rover) wrote :

I have updated my 16.10 yakkety with proposed enabled. Now, unity version is 7.5.0+16.10.20161112-0ubuntu1
The bug is fixed for me.
Thank you!

Revision history for this message
Hadrien (psydk) wrote :

I tested 7.5.0+16.10.20161112-0ubuntu1. The second login screen shows for a short moment but then it disappears automatically after a fraction of second and I am back in my session.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 7.5.0+16.10.20161112-0ubuntu1

---------------
unity (7.5.0+16.10.20161112-0ubuntu1) yakkety; urgency=medium

  [ Marco Trevisan (Treviño) ]
  * LockScreenController: ignore icon_paths_changed signal in
    menumanager for Lockscreen (LP: #1635625)

  [ Andrea Azzarone ]
  * Properly handle the file manager copy dialog in
    FileManagerLauncherIcon and in StorageLauncherIcon. (LP: #1575452,
    LP: #1609845)
  * Correctly position the force quit dialog when scaling is different
    than 1.0 (LP: #1637991)
  * GnomeSession: Retrieve the session id using dbus if $XDG_SESSION_ID
    is not set (LP: #1633749)

 -- Marco Trevisan (Treviño) <mail@3v1n0.net> Sat, 12 Nov 2016 02:13:01 +0000

Changed in unity (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for unity has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.