[SRU] unlock screen -dialog comes up twice

Bug #556255 reported by Martin-Éric Racine on 2010-04-06
330
This bug affects 71 people
Affects Status Importance Assigned to Milestone
GNOME Screensaver
Fix Released
Medium
gnome-screensaver (Ubuntu)
Low
Marc Deslauriers
Lucid
Low
Marc Deslauriers
Maverick
Low
Marc Deslauriers
Natty
Low
Marc Deslauriers

Bug Description

Binary package hint: gnome-screensaver

One issue remaining in Lucid (which I thought had been solved in Karmic, but apparently not since it has returned) is that whenever returning from a locked screen, the password dialog to unlock shows up twice. After unlocking the first time, the screen fades to black, after which the unlock dialog returns again.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gnome-screensaver 2.30.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-19.28-generic 2.6.32.10+drm33.1
Uname: Linux 2.6.32-19-generic i686
Architecture: i386
Date: Tue Apr 6 10:16:28 2010
GnomeSessionIdleInhibited: No
GnomeSessionInhibitors: None
ProcEnviron:
 LANGUAGE=fi_FI:fi:en_US:en
 PATH=(custom, user)
 LANG=fi_FI.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-screensaver
WindowManager: metacity

Martin-Éric Racine (q-funk) wrote :
Chris Coulson (chrisccoulson) wrote :

Not confirming the issue here. Please run "killall gnome-screensaver && gnome-screensaver --debug --no-daemon 2>&1 | tee gnome-screensaver.log", recreate the issue and attach the log file here.

Thanks

Changed in gnome-screensaver (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Martin-Éric Racine (q-funk) wrote :

The issue is not reproducible when gnome-screensaver is run as above in debug mode. It only occurs if gnome-screensaver is launched as normal at GNOME session startup.

Mark M. (earlmagnus) wrote :

Same problem here. Tried the suggested procedure. Problem did not exhibit while debugging.

Leon (leonbo) wrote :

I'm having this too. When I did a ps aux for screensaver, the following came up:

leon 1498 0.0 0.2 173104 8012 ? Ss Apr18 0:05 gnome-screensaver
leon 1499 0.0 0.2 172612 7620 ? Ss Apr18 0:01 /usr/bin/gnome-screensaver

fubarbundy (launchpad-mailtic) wrote :

Changed to confirmed as the requested information-gathering procedure has been tried. This looks like it's maybe just an issue with gnome-screensaver running twice? I have the same (gnome-screensaver AND /usr/bin/gnome-screensaver) as Leon.

My machine was upgraded from a fresh Karmic install to Lucid Beta 2 if that makes a difference.

Changed in gnome-screensaver (Ubuntu):
status: Incomplete → Confirmed
Martin-Éric Racine (q-funk) wrote :

This issue is still unresolved, less than one week before Lucid's release.

Marc Deslauriers (mdeslaur) wrote :

I can't reproduce this.

gnome-screensaver should _not_ be running twice, that's is the problem you are having.

Could you take a look at your session: ~/.config/gnome-session/saved-session to make sure you don't start it in there.

Also, do you have two screensaver files in /etc/xdg/autostart?

That desktop environment are you running?

Changed in gnome-screensaver (Ubuntu):
status: Confirmed → Incomplete
Martin-Éric Racine (q-funk) wrote :

1. Nothing in .config/gnome-session/saved-session/

2. Nope. Only /etc/xdg/autostart/gnome-screensaver.desktop

3. GNOME.

Marc Deslauriers (mdeslaur) wrote :

If you reboot, do you get two gnome-screensaver processes right after logging in?

Chris Coulson (chrisccoulson) wrote :

This is incredibly weird, gnome-screensaver doesn't allow more than one instance to run. The only possible way for this to happen is that one of them doesn't have access to your session bus (which means it's either being started from outside of your actual session where it doesn't have the correct environment, is being started from somewhere with dbus-launch, or is being dbus-activated from a process which can't access to your session bus). In any case, this isn't a gnome-screensaver bug, but a bug in whatever is spawning it

Martin-Éric Racine (q-funk) wrote :

Nope, only one.

Chris Coulson (chrisccoulson) wrote :

Can you try and figure out what you're running in your session which is activating the second gnome-screensaver process then? Without some idea, it will be like looking for a needle in a haystack

Martin-Éric Racine (q-funk) wrote :

Sure, I can try logging in to a vcons when that happens and running "ps auxf" if it helps.

Till Klampaeckel (till-php) wrote :

I can confirm the issue as well. I just updated from 9.10 to 10.04. Rebooted a couple of times, tried the debug mode. Same game.

till@till-laptop:~$ ps auxf |grep [g]nome-screensaver
till 1954 0.0 0.1 176600 7436 ? Ss 09:48 0:00 gnome-screensaver
till 1955 0.0 0.1 176720 7540 ? Ss 09:48 0:00 /usr/bin/gnome-screensaver

Can you provide more pointers as of what to look for?

Till Klampaeckel (till-php) wrote :

Did a little digging.

1) Used the same session, logged out and started an xterm session - no gnome-screensaver.

2) Logged out of the xterm session and logged back into gnome - 1 instance of gnome-screensaver.

Sounds like two get started only when the system boots? Can't figure out how or where there. From what I can tell (through the comments on this bug), there are no duplicate scripts etc..

Martin-Éric Racine (q-funk) wrote :

It just occurred to me: isn't the new GDM a normal GNOME application stared under a GNOME session and then using FUSA to log the user in? If that's the case, the GDM "session" is probably what is starting the first gnome-screensaver instance.

Marc Deslauriers (mdeslaur) wrote :

@Martin-Éric: if that's the case, would it be running under the gdm user, and not your own user?

Marc Deslauriers (mdeslaur) wrote :

If someone could attach a complete "ps auxf" when the problem occurs, that would be great.

Chris Coulson (chrisccoulson) wrote :

Yes, processes started in the gdm greeter session run as the gdm user. In addition to that, we don't run the screensaver in the greeter session anyway

Marcel Kolaja (marcel.kolaja) wrote :

I've noticed this issue too. When I upgraded from Karmic to Lucid it automatically changed the behavior of gnome-screensaver setting to automatically lock the screen when the screensaver is active (setting "Lock screen when screensaver is active" in gnome-screensaver-preferences). When I uncheck this check-box, the issue doesn't happen anymore.

It seems MAYBE since I have unclicked and then re enabled the "lock scree"
check box the problem is gone. I will reply again if it happens any more
otherwise hopefully this will point the devs in the right direction...

I've logged into my account this morning and left it to timeout and bring the screen lock up.

The double login no longer occurs?!?!?!

I haven't done any updates or changed any settings since reporting the issue but it now seems to have sorted itself.

I really don't get this, but obviously I won't be able to help with troubleshooting this anymore.

If I can provide any information then let me know.

Shadow Panther (panther-ru) wrote :

I have same issue here. It started after on of the updates.

ps auxf | grep screen :

gdm 1375 0.0 0.2 17524 4340 ? Ss May13 0:01 /usr/bin/gnome-screensaver
panther 1531 0.0 0.3 18572 6900 ? Ss May13 0:02 /usr/bin/gnome-screensaver
panther 1532 0.0 0.3 18572 6872 ? Ss May13 0:11 gnome-screensaver

So, I have three screensavers, one for GDM, and two for my user. Also, two instances for my user have sequential PIDs, so they were launched simultaneously.

Till Klampaeckel (till-php) wrote :

This issue is totally random for me. It can back a couple of times, but not on a regular basis.

RobertH (rh-roberthale) wrote :

Exactly same issue here, started a few days ago, perhaps after updates, perhaps after changing screensaver from default. However changing back to default makes no difference.

Jonathan Goya (jkgoya) wrote :

Automatic updates popped up this morning (including a gnome-screensaver update), after installing and restarting the problem has gone away for me.

Erik Carstensen (sandberg) wrote :

It still happens for me after those updates.

Peter Bell (peterdbell) wrote :

This issue happened for me throughout yesterday. Every time I locked the screen then came back to unlock it, it would unlock the first time, show me my desktop/applications then immediately lock again and prompt for the password again.

After rebooting this morning, it doesn't appear to be happening today. Didn't check yesterday, but today one instance of gnome-screensaver is present.

hunter` (hunter-87) wrote :

same issue here:

gdm 1772 0.0 0.0 17764 3764 ? Ss 09:58 0:00 /usr/bin/gnome-screensaver
hunter 1997 0.0 0.1 18544 5988 ? Ss 10:01 0:00 /usr/bin/gnome-screensaver
hunter 1998 0.0 0.1 18668 6056 ? Ss 10:01 0:01 gnome-screensaver

3 istances

another issue wich shows up after the second screen unlocking is that i can't click on any input text to type text on chromium browser.
i don't know if it's related with or it's a chromium bug

Sarah Walters (sarah-walters) wrote :

Same problem here. I replaced /usr/bin/gnome-screensaver with a shell script that dumped ps details to a file. It appears to run five times in total - I'm guessing three times on boot, and another two times on login given the 21 second lag.

-rw-r--r-- 1 sarah sarah 14707 2010-07-08 08:41:24.000000000 +1000 gnome-start.1315
-rw-r--r-- 1 sarah sarah 14707 2010-07-08 08:41:24.000000000 +1000 gnome-start.1320
-rw-r--r-- 1 sarah sarah 14588 2010-07-08 08:41:24.000000000 +1000 gnome-start.1323
-rw-r--r-- 1 sarah sarah 17531 2010-07-08 08:41:45.000000000 +1000 gnome-start.1465
-rw-r--r-- 1 sarah sarah 17363 2010-07-08 08:41:45.000000000 +1000 gnome-start.1471

 Below is the shell file I used
#!/bin/sh

ps auxwf >> /var/tmp/gnome-start.$$
cat /proc/self/status >> /var/tmp/gnome-start.$$

Attached are the outputs from a single boot cycle. It's definitely being started by dbus. Any pointers on where to look next are welcome.

Sarah Walters (sarah-walters) wrote :

I know nothing about dbus but happy to do further debugging if anyone can suggest where to look?

Grzegorz Śliwiński (fizyk) wrote :

I got this bug in the recent week along with some upgrade( among them was the latest kernel, I think)

I have the same issue as Grzegorz Śliwiński, occured a few weeks ago with a new update.
Linux nysan 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 06:07:29 UTC 2010 i686 GNU/Linux

Changed in gnome-screensaver (Ubuntu):
status: Incomplete → Confirmed

I can confirm #33 and #34; it just happened recently. Looking at ps I found gnome-screensaver running 3 times!

$ ps auxwww|grep screen
gdm 13219 0.0 0.1 156928 4596 ? Ss Aug11 0:00 /usr/bin/gnome-screensaver
myuser 13444 0.0 0.1 178928 8000 ? Ss Aug11 0:06 gnome-screensaver
myuser 13445 0.0 0.1 178928 7996 ? Ss Aug11 0:05 /usr/bin/gnome-screensaver

I kill all but the gdm instance, then I lock the screen.
Then entering the password ONCE unlocks the screen. Wonderful.
But:

$ ps auxwww|grep screen
gdm 13219 0.0 0.1 156928 4596 ? Ss Aug11 0:00 /usr/bin/gnome-screensaver
myuser 27605 0.5 0.1 178924 7708 ? Ss 18:54 0:00 /usr/bin/gnome-screensaver

another instance has been spawned!

Martin-Éric Racine (q-funk) wrote :

It's becoming obvious that the solution would be for gnome-screensaver to allow only one instance to run per X display. In other words, if someone closes their laptop's lid or selects the Locks Screen option from some menu, gnome-screensaver should immediately exit if it finds an instance of itself running on the same display. Ditto when returning from freeze or hibernate.

Jeff Day (jeff-storago) wrote :

This same thing happens to me, but worse - normally upon returning from the second password prompt to the desktop, I am without keyboard input. The way I solve it is by choosing System > Preferences > Keyboard > Layouts, and then toggling the keyboard layout over to 104-key PC and then back to 105-Key (Intl) PC. After doing this, things are back to normal for the time being. Needless to say, this is quite a dance to do nearly every morning when I unlock my screensaver. I can't say that it (the double lock prompt) happens every time, but it happens more often than not, and the keyboard dropping out happens about 50% of those times.

Miklos Espak (espakm) wrote :

I experienced the same as Jeff. Two gnome-screensavers are running, and after the second unlocking, I cannot type.
For me, it is enough to click on another window on the task bar. Then I can switch back with Alt-TAB, and can type again.

I use Maverick with the regular updates.

sergioroa (s-roa) wrote :

I can confirm the problem in a from 10.04 upgraded 10.10 system

Erik Wahlstrom (edub) wrote :

I will confirm the exact behavior as Miklos... This is really ANNOYING behavior and I imagine it affects most users many times throughout the day.

Glen Mehn (gmehn) wrote :

Same behaviour confirmed (With multiple gnome-screensaver processes running). Manually killing extra processes makes it somewhat OK.

Strangely, this only occurs on one (10.04) of my 3 machines (2 of which are 10.04 and one of which is 10.10). All identical-ish in terms of packages.

This problem occurred on my machine today after the regular packages upgrade on my Ubuntu 10.10 Desktop.
Manually killing extra processes helps.

Gan_HOPE326 (gan) wrote :

I confirm that this happened to me as well, at least twice. When it happens rebooting removes the problem. I don't have any clue about special reasons for this to happens, it looks totally random, and I don't use graphic screen savers, only lock screen. I'm running version 10.04.

Serhiy Zahoriya (xintx-ua) wrote :

Maybe try
$ grep -r "gnome-screensaver" $HOME
$ grep -r "/usr/bin/gnome-screensaver" $HOME
and if that fails, then
$ grep -r "gnome-screensaver" /
$ grep -r "/usr/bin/gnome-screensaver" /
Just a suggestion.

Biji (biji) wrote :

Happy new year, this happened to me after last updates (10.04)
i enabled, proposed, backports, updates, security

Changed in gnome-screensaver (Ubuntu):
assignee: nobody → Marc Deslauriers (mdeslaur)
Changed in gnome-screensaver (Ubuntu Maverick):
assignee: nobody → Marc Deslauriers (mdeslaur)
status: New → Confirmed
Changed in gnome-screensaver (Ubuntu Lucid):
status: New → Confirmed
importance: Undecided → Low
Changed in gnome-screensaver (Ubuntu Maverick):
importance: Undecided → Low
Changed in gnome-screensaver (Ubuntu Lucid):
assignee: nobody → Marc Deslauriers (mdeslaur)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-screensaver - 2.30.2-0ubuntu2

---------------
gnome-screensaver (2.30.2-0ubuntu2) natty; urgency=low

  [ Robert Ancell ]
  * debian/patches/01_libxklavier.patch:
    - Add patch header

  [ Marc Deslauriers ]
  * Use upstream D-Bus service file:
    - debian/org.gnome.Screensaver.service: removed
    - debian/gnome-screensaver.install: remove link
  * debian/17_dont_start_twice.patch: make sure we cannot start twice by
    bailing out if we cannot become the primary owner of the bus name.
    (LP: #556255)
  * debian/18_dont_use_sessionmanager_name_owners.patch: improve
    reliability if gnome-session is started after the screensaver or if
    gnome-session is restarted.
 -- Marc Deslauriers <email address hidden> Wed, 16 Feb 2011 09:20:00 -0500

Changed in gnome-screensaver (Ubuntu Natty):
status: Confirmed → Fix Released
Changed in gnome-screensaver:
importance: Unknown → Medium
status: Unknown → New
fubarbundy (launchpad-mailtic) wrote :

So, made it finally... are you going to be backporting this Marc?

Thanks.

Marc Deslauriers (mdeslaur) wrote :

@fubarbundy: yes, I will...I just need to test it thoroughly before I SRU it.

Changed in gnome-screensaver:
status: New → Fix Released
summary: - unlock screen -dialog comes up twice
+ [SRU] unlock screen -dialog comes up twice
Marc Deslauriers (mdeslaur) wrote :

SRU Request:

Impact: On Lucid and Maverick, gnome-screensaver has a race condition that makes it start twice from time to time, resulting in a poor user experience.

The bug has been addressed by adding a patch that makes sure gnome-screensaver can only be run once, and that when spawned as a Dbus service, it isn't run as a daemon. This upload also contains a second reliability patch to prevent problems when it is started before gnome-session. See attached debdiff.

How to test:

1- Log into system
2- Make sure gnome-screensaver isn't running twice
3- Wait for screensaver default timeout, make sure screen gets locked
4- Start Totem, play a video longer than default timeout. Make sure screensaver doesn't start while video is playing.
5- Close Totem. Wait default timeout again, make sure screensaver comes up.
6- Kill gnome-screensaver process. Select Lock Screen from indicator applet session menu. Make sure screen gets locked. Make sure gnome-screensaver is only running once.

Marc Deslauriers (mdeslaur) wrote :
Marc Deslauriers (mdeslaur) wrote :

Accepted gnome-screensaver into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gnome-screensaver (Ubuntu Lucid):
status: Confirmed → Fix Committed
tags: added: verification-needed
Changed in gnome-screensaver (Ubuntu Maverick):
status: Confirmed → Fix Committed
Martin Pitt (pitti) wrote :

Accepted gnome-screensaver into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

* Martin Pitt <email address hidden>:
> Accepted gnome-screensaver into maverick-proposed, the package will
> build now and be available in a few hours. Please test and give feedback
> here. See https://wiki.ubuntu.com/Testing/EnableProposed for
> documentation how to enable and use -proposed. Thank you in advance!

My bug report was against natty.

Petri Lehtinen (petri) wrote :

The package in lucid-proposed fixed the problem for me. Thanks!

Martin Pitt (pitti) on 2011-03-17
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-screensaver - 2.30.0-0ubuntu2.1

---------------
gnome-screensaver (2.30.0-0ubuntu2.1) lucid-proposed; urgency=low

  * Reliability fixes:
    - debian/org.gnome.Screensaver.service: don't start as a daemon if
      started by dbus.
    - debian/17_dont_start_twice.patch: make sure we cannot start twice by
      bailing out if we cannot become the primary owner of the bus name.
      (LP: #556255)
    - debian/18_dont_use_sessionmanager_name_owners.patch: improve
      reliability if gnome-session is started after the screensaver or if
      gnome-session is restarted.
 -- Marc Deslauriers <email address hidden> Fri, 04 Mar 2011 11:17:13 -0500

Changed in gnome-screensaver (Ubuntu Lucid):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-screensaver - 2.30.0-1ubuntu1.1

---------------
gnome-screensaver (2.30.0-1ubuntu1.1) maverick-proposed; urgency=low

  * Reliability fixes:
    - debian/org.gnome.Screensaver.service: don't start as a daemon if
      started by dbus.
    - debian/17_dont_start_twice.patch: make sure we cannot start twice by
      bailing out if we cannot become the primary owner of the bus name.
      (LP: #556255)
    - debian/18_dont_use_sessionmanager_name_owners.patch: improve
      reliability if gnome-session is started after the screensaver or if
      gnome-session is restarted.
 -- Marc Deslauriers <email address hidden> Fri, 04 Mar 2011 11:11:06 -0500

Changed in gnome-screensaver (Ubuntu Maverick):
status: Fix Committed → Fix Released
Justin Force (justin-force) wrote :

I have 2.30.2-0ubuntu2 in Natty, and this still occurs frequently.

Justin Force (justin-force) wrote :

This still happens to me several times a day with gnome-screensaver 2.30.2-0ubuntu2. It is not fixed.

I think that I may have noticed a correlation between the occurrence of this bug and the use of Ctrl-Alt-L to manually start the screensaver.

Marc Deslauriers (mdeslaur) wrote :

@Justin: could you please file a new bug for that particular issue. This bug, along with the original issue, has been closed.

Thanks.

Justin Force (justin-force) wrote :

I can and will. I worry that the new bug will just be marked as a duplicate and closed, though.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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