Bug 306186 - Password Dialog stays on top of all windows after unlocking the desktop
Summary: Password Dialog stays on top of all windows after unlocking the desktop
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 4.9.0
Platform: Gentoo Packages Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 305083 306941 307473 308116 309321 309412 310924 311721 312292 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-03 06:48 UTC by Michael Kopp
Modified: 2012-12-28 07:18 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10


Attachments
screenshot of the situation after unlock (600.92 KB, image/png)
2012-09-03 06:49 UTC, Michael Kopp
Details
Kwin Support Info (4.84 KB, text/x-nfo)
2012-11-01 12:23 UTC, eric.erfanian
Details
Pot. fixing patch (4.32 KB, patch)
2012-11-02 19:52 UTC, Thomas Lübking
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kopp 2012-09-03 06:48:00 UTC
This does not happen all the time, but once it has only restarting KDE removes the dialog

1) lock your desktop
2) unlock you desktop

the dialog that you get to enter your password stays on the screen (see screenshot) and does not go away unless you kill KWIN (which obviously doesn't help really) or restart KDE all together.
Even locking and unlocking the screen afterwards doesn't improve the situation, even worse, I have a dual screen and after several lock/unlock I have that dialog in the middle of both my displays.

The dialog can not be clicked or interacted with, actually the windows below it can be clicked at, so it seems a drawing issue, the window doesn't seem to exist anymore.

Reproducible: Sometimes

Steps to Reproduce:
1) lock your desktop
2) unlock you desktop
Comment 1 Michael Kopp 2012-09-03 06:49:24 UTC
Created attachment 73620 [details]
screenshot of the situation after unlock
Comment 2 Martin Flöser 2012-09-03 07:24:52 UTC
I have seen this issue once but had no chance to properly investigate 
it. An easy solution is to press Alt+Shift+F12 twice to suspend and 
resume compositing.
Comment 3 Thomas Lübking 2012-09-03 07:36:00 UTC
@Michael:
- can you reproduce this somewhat often?
- do you unredirect fullscreen windows?
- does it remain if you export QT_NO_GLIB=1 from some ~/.kde/env script
Comment 4 Michael Kopp 2012-09-03 10:31:27 UTC
@Martin
Thanks workaround works!
@Thomas
* Happens pretty regularly
* ??? not sure what you mean here. I have "maximized" windows but no fullscreen windows.
* Not tested, and as this is my work desktop I won't be able for a couple of days to do this, I will try to test it though
Comment 5 Thomas Lübking 2012-09-03 14:44:30 UTC
"kcmshell4 kwincompositing", last tab, "suspecnd comspositing for fullscreen windows" checkbox

How keen are you in using shell tools - do you think you can switch to VT1, there
export DISPLAY=:0

check for the password window (this has to happen really fast: move the mouse to trigger the locker, then move to VT1 where this command is already present or in history)
xwinfo -root -tree | grep "KDE Screen Locker"

and then monitor events for UnmapNotify
xev -root | grep -A1 UnmapNotify

and see whether the WinId found by the xwinfo command matches an UnmapNotification
Comment 6 Juha Tiensyrjä 2012-09-23 06:30:30 UTC
I can confirm this bug, happens to me also every couple of days or so both with 4.9.0 and 4.9.1 from Kubuntu packages.
Comment 7 Thomas Lübking 2012-09-23 19:58:22 UTC
much (MUCH) more important than "me too" would be to answer the questions of comments #3 & #5 ;-)
Comment 8 Michael Kopp 2012-09-24 07:44:57 UTC
can you reproduce this somewhat often: Seems to happen every time that I leave my screen unattended on a multi screen, never happened to me when working on the notebook without external screens.

do you unredirect fullscreen windows: not sure what you mean, I do have fullscreen windows, in particular VirtualBox in seamless mode running sometimes. I have ""kcmshell4 kwincompositing", last tab, "suspecnd comspositing for fullscreen windows" checkbox" activated, does not change anything, problem still occurs.

- does it remain if you export QT_NO_GLIB=1 from some ~/.kde/env script
not tested yet, what other implications does this setttin have
Comment 9 Martin Flöser 2012-09-28 05:26:15 UTC
*** Bug 307473 has been marked as a duplicate of this bug. ***
Comment 10 Thomas Lübking 2012-09-28 12:36:23 UTC
Is this also reproducible if you turn all active screen edges off?
Comment 11 Michael Kopp 2012-10-02 06:11:49 UTC
Turned screenedges off, still same problem
Comment 12 Michael Kopp 2012-10-02 07:45:58 UTC
I can't seem to reproduce it if I force screen lock and then switch to VT1 and back. window id is the same between xwinfo and unmap then.

I see if I can reproduce it if the lock screen comes via normal screen timeout
Comment 13 Thomas Lübking 2012-10-02 19:23:29 UTC
(In reply to comment #12)
> I can't seem to reproduce it if I force screen lock and then switch to VT1
> and back.
you might be more lucky by ssh'ing into the machine.

> if you export QT_NO_GLIB=1 from some ~/.kde/env script
> not tested yet, what other implications does this setttin have

the setting makes Qt use the more straight forward unix event dispatcher instead of the glib one, exporting it to the global environment applies that to all Qt applications (after re-logging in)
The setting does not cause permanent changes (at least it's not supposed to, but oc. any application could check for that value, store "CrashMe=true" in it's settings and from now on just crash on start =)
Ie. the moment you remove the script, the alteration is gone with the next login.
Comment 14 Michael Kopp 2012-10-05 05:08:23 UTC
ok could reproduce it now, xwinfo shows a different window id than the first unmap notify.
Comment 15 Thomas Lübking 2012-10-09 12:21:55 UTC
*** Bug 308116 has been marked as a duplicate of this bug. ***
Comment 16 Paul Fee 2012-10-11 09:27:41 UTC
Also present on Fedora 17.

$ rpm -qf /usr/bin/kwin
kde-workspace-4.9.2-3.fc17.x86_64
Comment 17 Martin Flöser 2012-10-22 18:09:13 UTC
I had the chance to have a look at a system which showed the same problem. Relevant part of supportInformation:

Currently Active Effects:
-------------------------
kwin4_effect_fade
kwin4_effect_blur

Unloading the fade effect, made the window go away.

@Thomas: could something trigger an incorrect unref in AnimationEffect?
Comment 18 Thomas Lübking 2012-10-22 19:14:12 UTC
From the screenshot (the window is opaque. did it perform a fedeout on your side at all?) i suspect a time problem, ie. AniData::startTime being much much bigger than QTime::currentTime()

Can you reproduce to test it? (or anyone else, including injecting debug out, ie. recompile)
Comment 19 Thomas Lübking 2012-10-22 19:18:54 UTC
Daybreak issue?
Comment 20 Martin Flöser 2012-10-22 20:28:18 UTC
> From the screenshot (the window is opaque. did it perform a fedeout on your
> side at all?) 
yes, it was completely opaque, which I found odd, given that fade was active.
> Can you reproduce to test it?
No pattern seen so far
Comment 21 eric.erfanian 2012-10-26 11:58:32 UTC
I am able to reproduce this bug frequently by switching between two users.
Comment 22 Thomas Lübking 2012-10-26 14:03:38 UTC
(In reply to comment #21)
> I am able to reproduce this bug frequently by switching between two users.

- do you use the fade effect?
- does it go away when disabling it?
- can you run some self compiled code with a debug out patch?

@Martin
i'm gonna write some dbus inspection code for the animationeffect class, basically print AniData for running animations on request
Comment 23 Martin Flöser 2012-10-26 14:12:05 UTC
> i'm gonna write some dbus inspection code for the animationeffect class,
> basically print AniData for running animations on request
sounds good, I'm going to add something to the Scripted Effects
Comment 24 eric.erfanian 2012-10-29 01:44:24 UTC
(In reply to comment #22)
> (In reply to comment #21)
> > I am able to reproduce this bug frequently by switching between two users.
> 
> - do you use the fade effect?

Yes, both users use the fade effect.

> - does it go away when disabling it?

I'll have to try again when it appears. No luck reproducing it right now.

> - can you run some self compiled code with a debug out patch?

Sure; please just tell me what to checkout and any special compile / installation instructions,and then how to dump the debug information when it happens again.

> 
> @Martin
> i'm gonna write some dbus inspection code for the animationeffect class,
> basically print AniData for running animations on request
Comment 25 eric.erfanian 2012-10-31 12:24:17 UTC
Bug reappeared today. I disabled the fade effect in the account in desktop effects, and the lock screen dialogue went away.
Comment 26 Jekyll Wu 2012-10-31 22:00:11 UTC
*** Bug 309321 has been marked as a duplicate of this bug. ***
Comment 27 eric.erfanian 2012-10-31 23:05:06 UTC
Interesting.Still on the same desktop session after disabling and then re-enabling the fade effect to get rid of the dialogue.

The dialogue still appears when switching between virtual desktops.
Comment 28 Thomas Lübking 2012-11-01 00:04:55 UTC
The window is onyl visible during the transition, i assume?
Are you using the fade desktop effect for the desktop transition?
Unloading the fade effect would not have unreferenced the window anyway (that is a bug) so i don't actually see why that should have removed the window in the first place.
-> does reloading the fade desktop effect have an impact?
Comment 29 eric.erfanian 2012-11-01 01:13:31 UTC
(In reply to comment #28)
> The window is onyl visible during the transition, i assume?

Correct.

> Are you using the fade desktop effect for the desktop transition?

No, it is the cube animation. When I try the fade desktop effect it does not appear.

> Unloading the fade effect would not have unreferenced the window anyway
> (that is a bug) so i don't actually see why that should have removed the
> window in the first place.

Me neither, but disabling and re-enabling the fade effect worked!

> -> does reloading the fade desktop effect have an impact?

Negative; loading and unloading the fade desktop effect does not make the dialogue disappear from the desktop switching cube animation.
Comment 30 Thomas Lübking 2012-11-01 07:40:11 UTC
(In reply to comment #29)

> No, it is the cube animation. When I try the fade desktop effect it does not
> appear.
Ok, de/activating the "fade desktop" effect would make no sense then, but it explains why the ref'd window suddenly shows up again.
Can you (unless you restarted meanwhile) provide the output of
qdbus org.kde.kwin /KWin supportInformation

and did i ask whether you can compile a patch into kwin?
In particular this one: https://git.reviewboard.kde.org/r/107063/
It will allow you to print extended debug data from the fade effect.
Comment 31 eric.erfanian 2012-11-01 12:23:26 UTC
Created attachment 74913 [details]
Kwin Support Info
Comment 32 eric.erfanian 2012-11-01 12:24:54 UTC
(In reply to comment #30)
> (In reply to comment #29)
> 
> > No, it is the cube animation. When I try the fade desktop effect it does not
> > appear.
> Ok, de/activating the "fade desktop" effect would make no sense then, but it
> explains why the ref'd window suddenly shows up again.
> Can you (unless you restarted meanwhile) provide the output of
> qdbus org.kde.kwin /KWin supportInformation
> 

Attached.

> and did i ask whether you can compile a patch into kwin?
> In particular this one: https://git.reviewboard.kde.org/r/107063/
> It will allow you to print extended debug data from the fade effect.

I'll look into it tonight and see if I can do it.
Comment 33 Jekyll Wu 2012-11-02 11:20:05 UTC
*** Bug 309412 has been marked as a duplicate of this bug. ***
Comment 34 Thomas Lübking 2012-11-02 13:30:39 UTC
last dupe suggests daybreak relevance
Comment 35 Thomas Lübking 2012-11-02 19:52:19 UTC
Created attachment 74942 [details]
Pot. fixing patch

Due to the possible daybreak relevance, attached is a patch that invokes also the date for the starttime of the effect..

Stupid question:
does the screensaver come with an STR (ie. the clock gets out of sync and then is resynced by ntp, causing a major jump?)
Comment 36 Christoph Feck 2012-11-11 03:16:22 UTC
*** Bug 305083 has been marked as a duplicate of this bug. ***
Comment 37 Thomas Lübking 2012-11-14 20:33:47 UTC
Git commit a0aacdae08a6bdae0a30139d65ef92d5dff136e5 by Thomas Lübking.
Committed on 03/11/2012 at 21:33.
Pushed by luebking into branch 'master'.

use QELapsedTimer to measure animation delay

QElapsedTimer uses a monotic clock on all relevant systems
and is thus invarant against date/time changes (while the
bug was likely caused by daybreaks)
REVIEW: 107250
FIXED-IN: 4.10

use monitc clock

M  +3    -3    kwin/libkwineffects/anidata.cpp
M  +1    -2    kwin/libkwineffects/anidata_p.h
M  +12   -7    kwin/libkwineffects/kwinanimationeffect.cpp
M  +6    -0    kwin/libkwineffects/kwinanimationeffect.h

http://commits.kde.org/kde-workspace/a0aacdae08a6bdae0a30139d65ef92d5dff136e5
Comment 38 Jekyll Wu 2012-11-16 01:28:23 UTC
*** Bug 306941 has been marked as a duplicate of this bug. ***
Comment 39 Thomas Lübking 2012-11-30 14:22:16 UTC
*** Bug 310924 has been marked as a duplicate of this bug. ***
Comment 40 Thomas Lübking 2012-12-15 09:19:57 UTC
*** Bug 311721 has been marked as a duplicate of this bug. ***
Comment 41 Martin Flöser 2012-12-28 07:18:04 UTC
*** Bug 312292 has been marked as a duplicate of this bug. ***