Bug 255906 - Kwin does not start probably on screen 1 and 2
Summary: Kwin does not start probably on screen 1 and 2
Status: RESOLVED INTENTIONAL
Alias: None
Product: ksmserver
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Lubos Lunak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 19:45 UTC by Jonas Vejlin
Modified: 2010-11-05 00:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
my xorg if needed (3.11 KB, application/octet-stream)
2010-11-02 19:45 UTC, Jonas Vejlin
Details
xession log (4.37 KB, application/x-bzip)
2010-11-03 17:19 UTC, Jonas Vejlin
Details
my bashrc in c ase you need it (3.11 KB, application/octet-stream)
2010-11-03 19:14 UTC, Jonas Vejlin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Vejlin 2010-11-02 19:45:39 UTC
Created attachment 53077 [details]
my xorg if needed

Version:           unspecified (using KDE 4.4.5) 
OS:                Linux

When starting any program on my screen 1 and 2 there is no minimizer, maximizer or close button on that window 

Reproducible: Always

Steps to Reproduce:
1: start a program on that screen 1 or 2

Actual Results:  
no window boarder

Expected Results:  
a window boarder with close etc buttons
Comment 1 Jonas Vejlin 2010-11-02 20:53:02 UTC
and it happens with a new user as well.
Comment 2 Jonas Vejlin 2010-11-02 21:30:53 UTC
and it also fails with kde 4.5.1 (http://qt-kde.debian.net/)
Comment 3 Thomas Lübking 2010-11-02 22:07:54 UTC
- is there a titlebar at all?
  -> is kwin running ("ps -Af | grep kwin")
     -> what happens if you run "kwin --replace &" output in konsole, backtrace on segfault?

- trivial: do you have a custom button setup with "no buttons" ;-) (alt+f3 or rmb on titlebar, "configure window behaviour...", "window decorations",  "configure buttons .."

- what decoration do you use and does it fix with another decoration
Comment 4 Jonas Vejlin 2010-11-03 06:55:14 UTC
- is there a titlebar at all?
    Nope
-is kwin running ("ps -Af | grep kwin")
        beer3     2085  2081  4 06:51 pts/4    00:00:01 kwin --replace
beer3     2086  2085  3 06:51 pts/4    00:00:01 kwin --replace
beer3     2087  2085  1 06:51 pts/4    00:00:00 kwin --replace
beer3     2095  2073  0 06:51 pts/3    00:00:00 grep kwin

- what happens if you run "kwin --replace &" output in konsole, backtrace
on segfault?
output from console:
beer3@home:~$ kwin --replace &
[1] 2085
beer3@home:~$ kwin(2087) KWin::CompositingPrefs::detectDriverAndVersion: GL vendor is "NVIDIA Corporation" 
kwin(2087) KWin::CompositingPrefs::detectDriverAndVersion: GL renderer is "GeForce 9600 GT/PCI/SSE2" 
kwin(2087) KWin::CompositingPrefs::detectDriverAndVersion: GL version is "3.2.0 NVIDIA 195.36.24" 
kwin(2087) KWin::CompositingPrefs::detectDriverAndVersion: Detected driver "nvidia" , version "195.36.24" 
kwin(2086) KWin::CompositingPrefs::detectDriverAndVersion: GL vendor is "NVIDIA Corporation" 
kwin(2086) KWin::CompositingPrefs::detectDriverAndVersion: GL renderer is "GeForce 9600 GT/PCI/SSE2" 
kwin(2086) KWin::CompositingPrefs::detectDriverAndVersion: GL version is "3.2.0 NVIDIA 195.36.24" 
kwin(2086) KWin::CompositingPrefs::detectDriverAndVersion: Detected driver "nvidia" , version "195.36.24" 
kwin(2085) KWin::CompositingPrefs::detectDriverAndVersion: GL vendor is "NVIDIA Corporation" 
kwin(2085) KWin::CompositingPrefs::detectDriverAndVersion: GL renderer is "GeForce 9600 GT/PCI/SSE2" 
kwin(2085) KWin::CompositingPrefs::detectDriverAndVersion: GL version is "3.2.0 NVIDIA 195.36.24" 
kwin(2085) KWin::CompositingPrefs::detectDriverAndVersion: Detected driver "nvidia" , version "195.36.24" 

and titlebar appear
- trivial: do you have a custom button setup with "no buttons" ;-) (alt+f3 or
rmb on titlebar, "configure window behaviour...", "window decorations", 
"configure buttons .."
I am running kde default (I dont know what it is byt I have not change such a ting)

- what decoration do you use and does it fix with another decoration
I am using default decoration. How to change my decoration?
Comment 5 Thomas Lübking 2010-11-03 15:42:50 UTC
there's sth. severly broken. you're running (before the shell start) 3times kwin, probably started out of the crash manager of the fist one - yet you had no titlebar.
Could you "manage" windows at all (ie. eg. pass the focus around by clicking into a window)

Then after starting kwin from a shell, you get a titlebar (and buttons, i assume?)
-> sth. broken about the startup process?!

in case:
please delete ~/.xsession-errors, logout/in, "cp ~/.xsession-errors ~/xsession.errors", "bzip ~/xsession.errors",  (can grow pretty large) and attach it to the bug
Comment 6 Jonas Vejlin 2010-11-03 17:19:48 UTC
Created attachment 53100 [details]
xession log
Comment 7 Jonas Vejlin 2010-11-03 17:23:08 UTC
Could you "manage" windows at all (ie. eg. pass the focus around by clicking
into a window)
I could do everything expect by using mouse (clicking in menus etc) but I could not change keyboard focus eg it stayed at the old window

Then after starting kwin from a shell, you get a titlebar (and buttons, i
assume?)
You assume correct

-> sth. broken about the startup process?!
what is sth. and how can look up the startup process??

the log is attached as asked.

I noticed that when login in that kwin was started uo on my screens with other programs from last sessions. When I changes "start with and empty session" instead of "restore previouse session" it did not start
Comment 8 Jonas Vejlin 2010-11-03 17:36:12 UTC
This workaournd seems to work:
start a console.
type kwin --replace & (do not close console at this state. If I do that I will lose window decoration)
Under "session managment" change to "restore manually saved session" 
Save that session.
Relog 
close that console
Save session
Comment 9 Jonas Vejlin 2010-11-03 17:54:09 UTC
I released something about something about the solution above. "alt+tab" is sometime broken.
If I use a program on screen 0 I get one of those reaktion:
tapping as it t should be 
It tries to tab between windows on screen 2 but it cannot find any windows even that I have 2 konsole open

If I have focus on one the the konsole on screen 2 and try to tab around I get:
beer3@home:~$                                                                                                                        
|                   cp                  DISPLAY=:1          kwin                --replace           /tmp/.X11-unix/                  
&                   delete              /etc/X11/xorg.conf  -l                  -rf                 ~/.xsession-errors               
-Af                 DISPLAY=:0.1        grep                ls                  rm                  ~/xsession.errors                
bzip                DISPLAY=0:1         knsole              nano                startx                                               
bzip2               DISPLAY=:0.2        konsole             ps                  su    
from the konsole. I dont know why
Comment 10 Thomas Lübking 2010-11-03 18:45:22 UTC
(In reply to comment #7)
> I could do everything expect by using mouse (clicking in menus etc) but I could
> not change keyboard focus eg it stayed at the old window
meaning "no" ;-) - kwin's just not up on start.
from the error log it looks like a dbus issue, preventing the conncetion test of the KUniqueApplication constructor...

> You assume correct
so there's no problem with kwin, but "only" the invocation in the startup script (or it's environment)
 
> what is sth. and how can look up the startup process??
"something" i had no clue about at that time ;-)
 
> I noticed that when login in that kwin was started uo on my screens with other
> programs from last sessions. When I changes "start with and empty session"
> instead of "restore previouse session" it did not start
yes, the sessionmanager comes up a bit later and since kwin (probably) didn't connect the screens dbus server it just gets restarted.
this (likely) affects several "unique" applications like eg. kglobalaccel (global shortcuts)

(In reply to comment #8)
> type kwin --replace & (do not close console at this state. If I do that I will
> lose window decoration)
that's matter of shell configuration (though i don't think that it's bash default behaviour) you can have or not have it kill background jobs on exit

(In reply to comment #9)
> If I have focus on one the the konsole on screen 2 and try to tab around I get:
> ...
> from the konsole. I dont know why

alt + tab does not work unless kwin (and kglobalaccel? actually don't know) is running what (presumingly) does not happen at that time, thus you probably get some sort of autocompletion?!
-> does it work as expected after launching kwin (and "kglobalaccel")
Comment 11 Jonas Vejlin 2010-11-03 19:13:09 UTC
I tried to launche 2 konsole on screen 1 and write those 2 commands 
kwin --replace &
kglobalaccel

Then I did the same thing on screen 2 and went back to screen 0 and tried to tab. 
and again it shows either
*** no window***
on screen 1 or 2 (seems random witch one)
or taped correctly

it seems like 1/3 time on each case

on screen 1 and 2  I still got that wired output from the konsole


About the bash behaviour it must then be something debian people have done since I have not chanaged anything in .batchrc


Do you need any more information from my computer ?
Comment 12 Jonas Vejlin 2010-11-03 19:14:45 UTC
Created attachment 53102 [details]
my bashrc in c ase you need it
Comment 13 Thomas Lübking 2010-11-03 21:38:40 UTC
hmmmm... just tried to launch another KDE on screen :1 - no problem at all. (except kmail warned to be already running... blablahh)

-> how exactly (and actually: why ;-) do you startup KDE on multiple screens?
do you have problems when starting on screen, wait until done, start the second, wait until done, start the last?

----------- OT ---------------------
i frankly don't know if this is configurable at all for bash.
you can use "nohup <command> &" to get it to the bg and ignore sigterms or (afaik) use "<command> & disown" (but that's bash specific) ... or move to a less retarded shell ;-)
(zsh for the nerds, fish mor my sister - with syntax highlightning. makes phone instructions MUCH simpler =)
Comment 14 Jonas Vejlin 2010-11-04 06:59:29 UTC
-> how exactly (and actually: why ;-) do you startup KDE on multiple screens?
do you have problems when starting on screen, wait until done, start the
second, wait until done, start the last?

There is 2 reason why I do it:
I have 2 nvidia cards to power my 3 screens. Neither the open source or the close source driver support one x on all 3 screens.
I got use to this settup during the days of kde 3 and liked it so much that I would like to keep it.

how exactly do you startup KDE on multiple screens?
I set my xorg up like it is with nvidia-settings and then "the system" handle the rest, eg I dont know how exacly it starts

do you have problems when starting on screen, wait until done, start the
second, wait until done, start the last?

I know how to set my xorg up to just start on one screen but how can I start a KDE/xorg-thing from within a kde session?

i frankly don't know if this is configurable at all for bash.
you can use "nohup <command> &" to get it to the bg and ignore sigterms or
(afaik) use "<command> & disown" (but that's bash specific) ... or move to a
less retarded shell ;-)

So if I inset "nohup <command> &"and "<command> & disown" into the button of my .bashrc it would help me either with my tap or my kwin problem?
Comment 15 Jonas Vejlin 2010-11-04 07:30:20 UTC
if I enable Xinerama in my xorg file I dont have those problems, but then I loose 3d effects/desktop effects
Comment 16 Thomas Lübking 2010-11-04 14:09:19 UTC
disclamer: i've _no_ experience with multiscreen or multihead setups (i only have 2 eyes and they always look the same direction ... =D )

a) don't use xinerama but nvidias twinview
b) i think you'll have to use sli to get 3 displays on 2 gpus (since afaik rare nvidia gpu can handle > 2 displays at all), see: http://us.download.nvidia.com/XFree86/Linux-x86/256.35/README/sli.html
c) to launch a second X11 on a second screen, just run "X -screen <screen> :n", where "<screen>" is the identifier of the Xorg.conf configured screen ":n" is to target display id (likely ":2" in your case)

------ OT --------------
d) no, placing that there won't do anything.
but if you call "nohup kwin --replace &" it won't be terminated when exiting the shell (aka "closing konsole"), thus "OT" ;-)
Comment 17 Jonas Vejlin 2010-11-04 14:30:14 UTC
a:
Is far as I know I can not use nvidias twinview sicne it can only handle one card (eg I can have 1 x on screen 1 and 2 (1 card) and leaving 1 x on screen 0 with one card). Or at least I cannot enable it trough the nvidida settings with current drives in debian (195.36.24)
b:
I dont know if I have ebabled sli or not. But I know that my preferet settings work on kde 3.5 (lenny), gnome 2.20 (lenny) and gnome 2.30 (squeeze) but not in kde 4 (but proper duel/triple head is getting closer after bug #156475 has been fixed, just a shame it took so long). As far as I know SlI would enable 2 cars to work on one screen witch I dont need. 

c:
I will try it when I get home. Should I try that with my current setup (Eg with the xorg attached) or should I altered so I have only one x on screen 0?
Comment 18 Thomas Lübking 2010-11-04 15:11:35 UTC
a) as mentioned in b) - i think this requires SLI - does it work with xinerama out of the box (1 screen, 2 GPUs, 3 displays?)

b) sure you /really/ want dualhead with 2-3 independend X sessions (unable to move windows across the monitor)?
afaik that's "just" for resource sharing (1 cpu / board / HDD + n GPUS / keyboards / mice -> n workplaces)

c) with only one screen present.
Comment 19 Jonas Vejlin 2010-11-04 15:38:26 UTC
a) If I enable xinerama there is some minor problems I can live with such as:
   Programs does not start on the intendent screen eg on the screen where I started them.
   The same thing for the "alt+f2"-tinghy (forgot the name of it)
The major problem with xinerama is that I cannot use those fansy nice 3d effects that comes with kde.

b) If there is a bether options I dont know if I would use that. I would always take the best option. As far as I know I have 3 options:
Running kde 4 with xinerama enabled but without 3d effects.
Running kde 4 without xinerama, but with 3d effects and with that little work around stated earlyer
Running windows 7 with kde 4 apps
Niether of those options are pefect but there is no major drawbacks either

If someone can come op with a bether way please inlighten me

c)I will be back with result within 1 to 1 1/2 hour with results from that test (going home soon, just need a little bid more)
Comment 20 Jonas Vejlin 2010-11-04 16:53:31 UTC
c;
I removed those 2 lines from ServerLayout     
Screen      1  "Screen1" RightOf "Screen0"
Screen      2  "Screen2" LeftOf "Screen0"
then I did find the konsole and (as root) did write
X -screen Screen1 :1

my primay screen (screen 0) went black and my screen 1 (the rightr one) went from standby to active but black

was this intended behavous?
Comment 21 Thomas Lübking 2010-11-04 17:05:56 UTC
yesno.
you started an additional X server, but there's nothing running on it ;-)
run "DISPLAY=:1 startkde" to launch a session on the 2nd server. sorry :-)

but frankly: you'll need some help from ppl. knowing multihead / xinerama / twinview - and that's not me :-(
Comment 22 Jonas Vejlin 2010-11-04 17:12:47 UTC
I should enter 
"DISPLAY=:1 startkde"
after I have entered 
X -screen Screen1 :1
where both my screen is black?

Instead of tweaking knowing multihead / xinerama /
twinview do you know why I have problem with tabbing between windows?
Comment 23 Jonas Vejlin 2010-11-04 17:29:17 UTC
My tapping problems that is already described occurs when I do enter 
 kwin --replace &
so I do have those 2 questions back:
why can I not tab between windows after than command?
Why does kwin not start on screen 1 and 2 as it should?
Comment 24 Thomas Lübking 2010-11-04 17:37:52 UTC
yes :-P
X -screen Screen1 :1 & sleep 10; DISPLAY=:1 startkde

however i guess this will a) work and b) not be quite related to your problem since it will launch a second x server (like for multiple logins) while you had 3 screens on 1 server
as mentioned: besides telling that there seems to be some issue on connecting dbus when launching additional kwin instances (for what reason ever...) i really can't help you from this point on (regarding multiscreen setups) sorry, but you'll have to wait for other input or ask somewhere else
Comment 25 Thomas Lübking 2010-11-04 18:10:22 UTC
(In reply to comment #23)
> My tapping problems that is already described occurs when I do enter 
>  kwin --replace &

> so I do have those 2 questions back:

> why can I not tab between windows after than command?
because either kwin and/or kglobalaccel are not running on that particular screen or didn't connect to the server. kglobalaccel has to be running _before_ kwin starts up (so in doubt & after launching kglobalaccel you'll have to restart kwin)

> Why does kwin not start on screen 1 and 2 as it should?
cause sth. at the startup process is broken, supposingly unique applications are launched by multiple instances and attempt to connect the wrong dbus server

-> reassigning to ksmserver
Comment 26 Jonas Vejlin 2010-11-04 20:30:07 UTC
I have been talking with some kwin devs on irc and they say that, they would proberbly not re-introduce things needed to use kwin in this kind of settup. Hes advice was to use another window manager than kwin. Just as you know if you ran into same problem as me
Comment 27 Thomas Lübking 2010-11-05 00:37:11 UTC
Thanks alot for the info - though i doubt i'll ever run into this situation.

While SLI Mosaic seems to remain limited to Quadro Chips, some ppl. report success by faking xinerama (preserving compositing) - it's however unlikely an "out-of-the-box" solution :-(
http://www.dasprids.de/blog/2008/12/15/tri-display-on-linux-with-nvidia