Bug 322718

Summary: Unvisible applications windows at login
Product: [Plasma] kwin Reporter: Daniel Anken <daniel.anken>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: daniel.anken, ivan.cukic, kde
Priority: NOR    
Version: 4.11.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: qdbus org.kde.kwin /KWin supportInformation

Description Daniel Anken 2013-07-23 06:21:04 UTC
Created attachment 81282 [details]
qdbus org.kde.kwin /KWin supportInformation

From time to time, when logging in right after boot, I won't be able to see the windows restored from the previous session. I will then see the application as open in the task manager (icon-only task manager), but even when trying to maximize/minimize/shade/unshade the windows won't appear. The windows are also not visible in either the task switcher (Alt+Tab) or the Present Windows effect.
However I can change the focus to an unvisible window by clicking on the corresponding icon in the task manager, and I can minimize it (cf the icon change in the task manager). And I confirm that the applications are actually open and using RAM.
Any window opened afterwards will appear without further troubles.

So this bug does not appear everytime I login, and when it happens, a simple logout+login will resolve the matter.
This did already happen sometimes with KDE SC 4.10 and even 4.9 (just never had time to report, sorry).

My graphic card is a SandyBridge (i7-2600) integrated intel HD2000, on Archlinux.

Please find hereby a text file with the output of :
lspci
qdbus org.kde.kwin /KWin supportInformation

And please let me know if I can provide you with any additional information.


Daniel
Comment 1 Martin Flöser 2013-07-23 06:51:59 UTC
please try whether suspending/resuming compositing fixes the issue
Comment 2 Thomas Lübking 2013-07-23 08:49:53 UTC
comment #20 on bug #320561 attached a script - check whether it makes the window visible again (if not compositing related)

Don't run "force" on the first pass but only as last resort.
Comment 3 Christoph Feck 2013-07-23 09:47:52 UTC
Thomas, if you write bug 320561 comment #20, then bugzilla will automatically create the correct link.
Comment 4 Daniel Anken 2013-07-23 11:18:02 UTC
Ok so, suspending/resuming compositing did not change a thing.
However, Thomas' script did make the windows visible again (without "force").
I put the script's output at the end.

I'll add that I do not use Activities (haven't seen the sense of it - but that's another topic) and have made sure there is no other Activity than the one I am working with, right before I retested.
Let me know if there's anything else I can do to help.

The script's output :
$ ./KWin_ActivitiesWindows_fix.sh 
-------------------------
Current Activity:
Error: org.freedesktop.DBus.Error.UnknownObject
No such object path '/ActivityManager/Activities'

All 
Activities:
Error: org.freedesktop.DBus.Error.UnknownObject
No such object path '/ActivityManager/Activities'
========================

Checking ...

WARNING: Window 0x38000d3 on invalid Activity 4c6095b1-7706-4dc6-a770-53587cb1a11e - ("Bug 320561 – In restored session, all windows are minimized and cannot be restored - Mozilla Firefox")
WARNING: Window 0x30000d7 on invalid Activity 4c6095b1-7706-4dc6-a770-53587cb1a11e - ("Inbox - MyEmailAccount - Mozilla Thunderbird")
WARNING: Window 0x360001a on invalid Activity 4c6095b1-7706-4dc6-a770-53587cb1a11e - ("~ : bash – Konsole")
WARNING: Window 0x2200014 on invalid Activity 4c6095b1-7706-4dc6-a770-53587cb1a11e - ("Programs – Dolphin")
WARNING: Window 0x2c00014 on invalid Activity 4c6095b1-7706-4dc6-a770-53587cb1a11e - ("FolderN – Dolphin")
WARNING: Window 0x2e00009 on invalid Activity 4c6095b1-7706-4dc6-a770-53587cb1a11e - ("FolderM – Dolphin")
Comment 5 Thomas Lübking 2013-07-23 11:53:12 UTC
(In reply to comment #4)

> I put the script's output at the end.
Thanks

> I'll add that I do not use Activities
can you elaborate on this (like, did you chmod -x the activities daemon or stuff like that?)

> The script's output :
> $ ./KWin_ActivitiesWindows_fix.sh 
> -------------------------
> Current Activity:
> Error: org.freedesktop.DBus.Error.UnknownObject
> No such object path '/ActivityManager/Activities'

This sounds like some bug in kactivitymanagerd and paratially would match the other bug.
If the service was not registered the output would be

   Service 'org.kde.kactivitymanagerd' does not exist.

Could you please post the ouputs of 

$ qdbus org.kde.kactivitymanagerd
$ qdbus org.kde.ActivityManager
$ ps ax | grep kactivitymanagerd

as well?

> Checking ...
Yeah, by the above restriction this becomes more or less like "force" since the activity list is empty (no problem, though)
Comment 6 Daniel Anken 2013-07-23 12:17:24 UTC
Here's the output of these commands - executed in the same session I run your script against.
If you want the result on a newly started+'bugged' session, tell me.

$ qdbus org.kde.kactivitymanagerd
/
/MainApplication

$ qdbus org.kde.ActivityManager
/
/ActivityManager
/ActivityManager/Activities
/ActivityManager/Features
/ActivityManager/Nepomuk
/ActivityManager/Resources
/ActivityManager/Resources/Linking
/ActivityManager/Resources/Scoring
/ActivityRanking
/SLC

$ ps ax | grep kactivitymanagerd
 1017 ?        Sl     0:00 /usr/bin/kactivitymanagerd
 5630 pts/4    S+     0:00 grep kactivitymanagerd
Comment 7 Thomas Lübking 2013-07-23 12:41:51 UTC
(In reply to comment #6)
> Here's the output of these commands - executed in the same session I run

Thank you.
Smells like a pot. gap between the dbus protocol of the kactivitymanagerd and the library used by kwin (and other clients)?


@Ivan - was service registration somehow altered between 4.10 and 4.11 and which would btw. be the correct one?
Comment 8 Thomas Lübking 2013-07-23 12:55:56 UTC

*** This bug has been marked as a duplicate of bug 320561 ***
Comment 9 Ivan Čukić 2013-07-23 13:02:23 UTC
dbus objects have changed - the dbus api of kamd is not public. It needs to go through the library, and the library version needs to correspond to the version of the service (they are in the same repo for that reason)
Comment 10 Martin Flöser 2013-07-24 05:00:30 UTC
that sounds like a packaging problem
Comment 11 Thomas Lübking 2013-07-24 12:31:46 UTC
I tried deactivating the kactivitymanagerd (chmod -x) and still no window appears on a foreign activity in git master (on login) - also because it's not possible to move a window on an illegal activity (kwin just sets it on all activities, ie. the null uuid)
Thus the window must be on some legal activity which is perhaps just stopped?

@Daniel
What's the output of
qdbus org.kde.ActivityManager /ActivityManager/Activities ListActivities
Comment 12 Thomas Lübking 2013-09-05 10:45:17 UTC
@Janek
Can you please confirm you're sure this is related to activities and can you please provide the output of
qdbus org.kde.ActivityManager /ActivityManager/Activities ListActivities

Also i'm not quite sure why the bug #320561 duplicate status was withdrawn from this one. - Ivan?
Comment 13 Janek Bevendorff 2013-09-05 14:48:50 UTC
e6a7bf46-e4f9-400a-86b3-a969c4a9adf1
d95c31c3-4514-48b2-baee-988e6c7c3369

That looked a little strange to me, so I opened the activity manager 
and in fact, there were suddenly two activities, one named "Desktop" 
(that's the one I'm using) and one named "New Activity" which I never 
created.

BTW I don't know why the duplicate status had been redrawn from this, 
but it was the reason why I confirmed this issue and not the other one 
(which looked a little more severe to me, because I only had the 
problem with one specific window and the desktop stuff).
Comment 14 Thomas Lübking 2013-09-09 19:53:12 UTC
(In reply to comment #13)
> e6a7bf46-e4f9-400a-86b3-a969c4a9adf1
> d95c31c3-4514-48b2-baee-988e6c7c3369

Was resp. is the missing window on one of them ("the other one")?
Is it a problem after removing "the other" activity (ie. one remaining)?
In case: is there a rule attaching the window anywhere? (kcmshell4 kwinrules)

> (that's the one I'm using) and one named "New Activity" which I never 
> created.
iirc you get three by default
Comment 15 Janek Bevendorff 2013-09-09 22:14:59 UTC
I never assigned the window to any of these activities, i.e. I also 
didn't set any window rules. But as I said, since the upgrade to 4.11.1 
I can't reproduce this anymore.
But before the upgrade I didn't have two activities, at least the 
activity manager only showed one. The second activity appeared after 
the upgrade.
Comment 16 Thomas Lübking 2013-09-10 19:28:55 UTC
(In reply to comment #15)
> But as I said, since the upgrade to 4.11.1 I can't reproduce this anymore.

Humm???
You confirmed this bug for 4.11.1 ...

Or do you mean "i had this once after the update and after running the rescue script, the issue never reoccurred"?
In case: from what version did you update? 4.11.0 or 4.10.x?
Comment 17 Janek Bevendorff 2013-09-10 19:45:25 UTC
Didn't I confirm for 4.11.0? If not, that was a mistake.
I upgraded from 4.11.0 to 4.11.1. Before that I had the 4.11 betas and 
RCs running which caused my profile to break somehow (lots of bugs, 
especially in kscreen) so I decided to make a new profile for 4.11.1 
and only keep some chosen settings (I didn't keep any kactivity 
settings, though).
Comment 18 Thomas Lübking 2013-09-10 19:53:33 UTC
(In reply to comment #17)
> RCs running which caused my profile to break somehow (lots of bugs, 
> especially in kscreen) so I decided to make a new profile for 4.11.1 

IOW you cleared the breaking configuration.... did you delete or rename it?

Also: did you get the missing windows in plain 4.10.0 or while/after using the 4.11.1 betas?
Comment 19 Janek Bevendorff 2013-09-10 21:23:17 UTC
I only had this in 4.11.0, not in 4.10.0.
The only thing from the old configuration I still have is the old 
activitymanagerrc file which contains this:

[activities]
a607082c-8c83-469c-82a9-fc1cbf37ffa5=New Activity
cbd0b95d-154b-45dc-96ac-8fd2e41a5fef=Desktop
e1167483-8a0b-4cc3-b8db-b15352d7f0b3=New Activity

[main]
currentActivity=cbd0b95d-154b-45dc-96ac-8fd2e41a5fef
lastUnlockedActivity=cbd0b95d-154b-45dc-96ac-8fd2e41a5fef
runningActivities=cbd0b95d-154b-45dc-96ac-8fd2e41a5fef

I have no idea why it contains three activities, after upgrading to 
4.11.1 I only had two and I never created any of them except the one 
named "Desktop", which is the default one. But that's thing I've seen a 
lot in KDE over the past versions. It's not the first time that I open 
the activity manager and see some unnamed activities which I never 
created. Ironically, just after writing this sentence, I opened up the 
activity manager to see if that's the case again and, well, it is. 
Although a few days ago I surely had only one activity, suddenly I have 
one more named "New Activity".
Comment 20 Janek Bevendorff 2013-09-10 21:25:27 UTC
Oh, one more thing. I ran qdbus org.kde.ActivityManager /ActivityManager/Activities ListActivities again to see which UUID that new unnamed activity has. Turns out it has the same as the one I already posted above:

e6a7bf46-e4f9-400a-86b3-a969c4a9adf1
d95c31c3-4514-48b2-baee-988e6c7c3369

and I swear: I deleted that one!
Comment 21 Thomas Lübking 2013-10-12 11:39:00 UTC

*** This bug has been marked as a duplicate of bug 320561 ***