Bug 201088

Summary: Session management: wrong windows positions
Product: [Unmaintained] knotes Reporter: PCB <bugreports>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kevin.kofler, kwin-bugs-null, notmart, s2, scott+kde, the.warl0ck.1989
Priority: NOR    
Version: 4.9.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 209936    

Description PCB 2009-07-22 11:34:31 UTC
Version:            (using KDE 4.2.4)
Compiler:          i686-pc-linux-gnu-4.3.2 
OS:                Linux
Installed from:    Gentoo Packages

Remark: Although I'll write a lot about KNotes below, I think the bug lies within KDE/Plasma.

I'm using KNotes and multiple desktops. For each note, knotes stores on which desktop and at which position that note is placed. I also use KDEs session management, i.e. during KDE shutdown, it remembers what applications were open and where their windows were.

So, for the knotes windows, their position is saved twice; on the one side by knotes itself, on the other side by KDEs session management. This has never been a problem so far until today, as normally both positions should be identical, so I don't care who places the notes, as long as their position is right.

When logging in today, the notes' positions were mixed up. Lets say, I have three notes, A, B, and C. At the original position of note A there was no window. At position of note B, there was note A. At position of C there was B. You get the point.

Things I did afterwards:
1. Kill X-Server (Ctrl-Alt-Backspace) so that neither KDE nor KNotes would write back any changes I made to window positions etc. Logged in again, exact same behavior as described above.
2. Had a look into KNotes stored positions. No problem here, everything right, no corrupt entries etc, saved positions were right, too.
3. As Knotes saves the notes positions during shutdown and they were wrong at the moment (described behavior), i did a 'killall -9 knotes'. After starting knotes again (without restarting KDE), it placed the notes at the right positions.

The only explanation I can come up with is that KDE stored session information wrong during the last shutdown and thus screwed up windows positions of that programm during the next startup, although I can reproduce this. Also, I think there is some kind of conflict with window position management. Although it is ok to manage windows positions for programs that do not do that themselves, it conflicts with other programs that do.
Comment 1 Marco Martin 2009-07-23 21:56:05 UTC
don't think it has anything to do with plasma, more with the session manager itself

what is the component?
Comment 2 PCB 2009-07-24 10:39:51 UTC
When choosing the application from the application list while entering the bug it was not clear to me where the responisbility for session management lies. Does that belong to kwin?

And... how do I find out what the component is?
Comment 3 Thomas Lübking 2009-08-19 21:06:12 UTC
kwin stores and reloads geometries across sessions.

session vars are stored in ~/.kde/share/config/session/ (might be ~/.kde4/...)
look for the knotes_* files.
in particular if there're write protected entries, all expected entries and (if the solution isn't obvious from that) you can compare them against the notes from ~/.kde/share/apps/knotes/notes/.

You can also attach both for inspection.
Comment 4 scott+kde 2010-07-25 13:54:22 UTC
Seeing the same thing on Kubuntu 10.04 with KNotes 3.9 / KDE 4.4.2.  On a fresh login, all the notes I had open across several desktops will usually reappear stacked on top of each on a single desktop.  So in my case the size/position of the notes is affected as well as the desktop.

Worked around by:
1. Excluding "knotes" and "/usr/bin/knotes" from session management
2. Starting knotes explicitly at login using an Autostart job

Now all my notes reappear where I left them.
Comment 5 John Andrew McInnes 2011-09-27 03:25:10 UTC
Its 2011. Bug still exists. Anyone recommend a replacement for knotes?
Comment 6 Myriam Schweingruber 2012-09-06 21:52:26 UTC
Still valid in KDE 4.9.0, setting status to confirmed.
Comment 7 Myriam Schweingruber 2012-09-06 21:56:25 UTC
*** Bug 254944 has been marked as a duplicate of this bug. ***
Comment 8 Myriam Schweingruber 2013-02-14 11:44:49 UTC
Not reproducible with KDE 4.10

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