Bug 49596 - kwin does not manage windows on secondary dualheaded non-xinerama desktop
Summary: kwin does not manage windows on secondary dualheaded non-xinerama desktop
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 50169 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-10-23 23:05 UTC by Brandon Zehm
Modified: 2002-11-25 11:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
server.cpp.patch (886 bytes, text/x-diff)
2002-11-19 14:01 UTC, Lubos Lunak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brandon Zehm 2002-10-23 23:05:58 UTC
Version:           unknown (using KDE 3.0.8 (KDE 3.1 beta2))
Installed from:    compiled sources
Compiler:          gcc version 2.95.3 20010315 (release)
OS:          Linux (i686) release 2.4.18-xfs

I'm not sure exactly what's going on here, but I'll try my best to explain it.

I run KDE on a dual headed Laptop, no xinerama.  I upgraded from KDE-3.03 -> KDE-3.2-beta2 a few days ago and everything seemed fine, but today I booted up and KWin did not bind to the secondary display.  I.E. there was no window management at all.  Kicker started, and the desktop wallpaper/icons all showed up but any applications run on that desktop were not being managed.  Windows on the primary desktop were being managed and had all the normal decorations.  

Also only one desktop showed up in kicker/pager, and it was colored white instead of the dark gray that it usually is.

I tried a LOT of things to fix it, and the only thing that worked was to completly delete my ~/.kde dir and let KDE recreate it -- and even then it only worked for one KDE session.  After I configured all the KDE settings the way I like them and restarted KDE it went back to it's old behavior.

Sorry I don't have more details, but I'd be glad to work with someone on the dev team to figure out exactly what's going on and get it fixed.  I'm a developer too, but I don't do much C or C++.

Brandon Zehm
Comment 1 Brandon Zehm 2002-10-24 02:27:30 UTC
So I have been working on this all day, and I tracked down some more information
that should help.

I'm not sure at this point if this is a bug for kwin or ksmserver because I got
things working by:
 1. Set session manager to "restore manually saved session"
 2. Edit ~/.kde/share/config/ksmserver file by hand so that kwin was NOT in
    the list of commands to restart.

If kwin is listed in the config/ksmserver file at all things mess up.  If kwin
is not listed as a command to restart ksmserver starts it anyway and things work
great.

Phew that took me several hours to track down, and with my luck someone already
knows about it....  anyway let me know what the judgement is on this one, and if
there's anything I can do to help.

Brandon
Comment 2 Pascal Cavy 2002-11-13 21:46:03 UTC
I confirm this problem is still here in KDE 3.1 RC3 and should be considered a
showstopper for multiple desktop non xinerama users.

I use mandrake rpms for kde :
kdepim-3.1-0.rc3.1mdk
kdeaddons-3.1-0.rc3.1mdk
kdesdk-3.1-0.rc3.1mdk
kdemultimedia-3.1-0.rc3.2mdk
kdenetwork-3.1-0.rc3.2mdk
kdegames-3.1-0.rc3.1mdk
kdetoys-3.1-0.rc3.1mdk
kdeutils-3.1-0.rc3.1mdk
kdeedu-3.1-0.rc3.1mdk
kdemultimedia-aktion-3.1-0.rc3.2mdk
kdegraphics-3.1-0.rc3.1mdk
kdebase-3.1-0.rc3.1mdk
kdelibs-3.1-0.rc3.1mdk
kde-i18n-fr-3.1-0.rc3.1mdk
kdebase-nsplugins-3.1-0.rc3.1mdk
kdeadmin-3.1-0.rc3.1mdk

You can use a freshly created kde user to test this :
Here are the steps to reproduce the problem

1. create a fresh unix user (to get rid of kde config migration problems)
2. start service dm
3. at the kdm screen login into kde on the fresh user
4. start one konsole per desktop
    AT FIRST START KWIN is started OK on both desktops
5. logout of kde requesting to change to another user
6. redo step 3
   KWIN is now not started on one of the 2 Desktops...
 
here is my .ksmserverrc after the problem:

either the session are not properly saved for both screens concerning kwin or 
kwin should manage both screens ... i don't know.


[$Version]
update_info=ksmserver.upd:kde3

[General]
screenCount=2

[Session: saved at previous logout]
clientId1=11d4d0110e000103721080200000224000000
clientId2=11d4d0110e000103721081000000224000011
clientId3=11d4d0110e000103721082600000224000012
clientId4=11d4d0110e000103721083600000224000013
count=4
discardCommand1=rm,/home/pascal2/.kde/share/config/session/kwin_11d4d0110e000103721080200000224000000_1037210926_529830
discardCommand2=
discardCommand3=rm,/home/pascal2/.kde/share/config/session/konsole_11d4d0110e000103721082600000224000012_1037210926_483181
discardCommand4=rm,/home/pascal2/.kde/share/config/session/konsole_11d4d0110e000103721083600000224000013_1037210926_483599
program1=kwin
program2=kalarmd
program3=konsole
program4=konsole
restartCommand1=kwin,-session,11d4d0110e000103721080200000224000000_1037210926_529830,-display,:0.1
restartCommand2=kalarmd,-session,11d4d0110e000103721081000000224000011_1037210926_482700,-display,:0
restartCommand3=konsole,-session,11d4d0110e000103721082600000224000012_1037210926_483181,-display,:0.1
restartCommand4=konsole,-session,11d4d0110e000103721083600000224000013_1037210926_483599,-display,:0.0
restartStyleHint1=0
restartStyleHint2=0
restartStyleHint3=0
restartStyleHint4=0
userId1=pascal2
userId2=pascal2
userId3=pascal2
userId4=pascal2
Comment 3 Lubos Lunak 2002-11-18 18:25:47 UTC
*** Bug 50169 has been marked as a duplicate of this bug. ***
Comment 4 Lubos Lunak 2002-11-19 14:01:51 UTC
Subject: PATCH: bug 49596 - kwin not restored on all multihead screens

 Hello,

 could somebody review the attached patch for bug 49596? (Some people 
apparently use non-xinerama multihead for some strange reason even though the 
multihead support is just a hack, not maintained AFAIK and buggy.)

 The patch reverses part of ksmserver r1.90 - since for multihead there can be 
multiple WMs saved in the session, ksmserver cannot assume there's only one 
WM. 



Created an attachment (id=482)
server.cpp.patch
Comment 5 Brandon Zehm 2002-11-19 18:13:12 UTC
Subject: Re:  kwin does not manage windows on secondary dualheaded non-xinerama desktop

I'll do my best to get it compiled and tried out today.  I'll post back here as soon as I can.

BTW non-xinerama / multihead is very useful when you have two monitors with different resolutions (i.e. you use a laptop, and sometimes your docked with a monitor and the LCD, and sometimes your roaming with just the laptop's LCD.)
Also, FYI, you said that it's buggy to run this way, but everything (but ksmserver) seems to work fine in KDE-3.1-pre.

Brandon


On Tuesday 19 November 2002 06:01, you wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
> You are a voter for the bug, or are watching someone who is.
>
> http://bugs.kde.org/show_bug.cgi?id=49596
>
>
>
>
> ------- Additional Comments From l.lunak@suse.cz  2002-11-19 14:01 -------
> Subject: PATCH: bug 49596 - kwin not restored on all multihead screens
>
>  Hello,
>
>  could somebody review the attached patch for bug 49596? (Some people
> apparently use non-xinerama multihead for some strange reason even though
> the multihead support is just a hack, not maintained AFAIK and buggy.)
>
>  The patch reverses part of ksmserver r1.90 - since for multihead there can
> be multiple WMs saved in the session, ksmserver cannot assume there's only
> one WM.
>
>
>
> Created an attachment (id=482)
>  --> (http://bugs.kde.org/attachment.cgi?id=482&action=view)
> server.cpp.patch

Comment 6 Pascal Cavy 2002-11-22 14:15:06 UTC
Hello, 
 
I use this kind of configuration (non xinerama - 2 heads) for 2 reasons: 
 
1. Lots of applications DONT calculate DPI size correctly in XINERAMA mode. Example : 
openoffice.org which is horrible in xinerama, thinking the current screen is double the width of 
the real one. 
 
2. Full screen mode spans on both screens in xinerama which I dont like at all for games for 
example or for vmware 
 
kwin has problems with this config, as stated in my earlier post as well as session 
restauration. 
 
 
Comment 7 Brandon Zehm 2002-11-22 16:17:52 UTC
Subject: Re:  kwin does not manage windows on secondary dualheaded non-xinerama desktop

FYI I'm still trying to compile KDE-3.1-rc3 with that patch.. My Slackware box just does not want to compile anything for some reason.
I haven't given up yet (I've compiled KDE many times before)  but if anyone else can get it tested before me that would be nice.  

Brandon

Comment 8 Brandon Zehm 2002-11-24 07:36:50 UTC
Subject:  kwin does not manage windows on secondary dualheaded non-xinerama desktop

I can finally confirm that the patch posted by Lubos [server.cpp.patch] does indeed fix the problem.  

After applying the patch and recompiling ksmserver the previously noted behavior was not seen.  
I tested almost every configuration I could think of - running with two displays, restarting with one, 
then starting with one again, then with two, etc, etc - and everything worked the way it should.

Thank you for the patch!  I just hope we're not too late for this patch to make it into 3.1 final.

Brandon Zehm

Comment 9 Lubos Lunak 2002-11-25 11:11:20 UTC
 Fixed in CVS. I don't know if it makes it in KDE3.1.