Bug 269980 - kwin freezes when tiling windows -- RAM issue
Summary: kwin freezes when tiling windows -- RAM issue
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-03 04:26 UTC by Kevin Brightwell
Modified: 2011-04-03 15:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
output of glxinfo (11.04 KB, application/octet-stream)
2011-04-03 14:51 UTC, Kevin Brightwell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Brightwell 2011-04-03 04:26:34 UTC
Version:           unspecified (using KDE 4.6.1) 
OS:                Linux

When the desktop effect which tiles the windows accross the screen is invoked (OR the shift switcher) kwin crashes as my computer does not have enough RAM to handle the task.

I am currently running Kubuntu 10.10, with plasma-netbook running. 

A simple solution would be to disable desktop effects by default when the netbook version is found to be the best option. 

Reproducible: Always

Steps to Reproduce:
Open Window tiling, OR shift switcher with many windows open. 

Actual Results:  
kwin locked up

Expected Results:  
Not locking up. 

My netbook has 1gb of RAM currently, I can report back when I update it to 2Gb in a few weeks. 

The only way to recover from this issue is to restart the kdm OR kill kwin and restart it using `DISPLAY=:0.0 kwin --replace`.
Comment 1 Martin Flöser 2011-04-03 09:54:04 UTC
> When the desktop effect which tiles the windows accross the screen is invoked
> (OR the shift switcher) kwin crashes as my computer does not have enough RAM to
> handle the task.
If Kwin crashes, please provide a backtrace. Btw Window Tiling is not an effect and we do 
not have a "shift switcher". It is very unlikely that KWin needs more memory during effects 
and especially not so much that you get an out-of-memory exception. Let's face it: visiting the 
bug creation website in Firefox requires magnitudes of more RAM than KWin needs at all. The 
Linux kernel is btw rather good at swapping out memory dumps of unused programs and 
KWin should never be swapped out. If it happens (happened to my) it becomes not nice to 
use and the system might start thrashing, but not crashing.
> 
> I am currently running Kubuntu 10.10, with plasma-netbook running. 
> 
> A simple solution would be to disable desktop effects by default when the
> netbook version is found to be the best option. 
Very bad idea as the Netbook shell relies on compositing.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> Open Window tiling, OR shift switcher with many windows open. 
> 
> Actual Results:  
> kwin locked up
Might that be a duplicate of bug #261323 ?
Comment 2 Thomas Lübking 2011-04-03 12:21:02 UTC
probably the lanczos filter. call "kcmshell4 kwincompositing", activate the advanced tab and set the "scale method" to "smooth" (or "crispy" - at least NOT "accurate"), hit apply and check again.

otherwise:
a) "tiling" == "present windows" aka "exposé" ?!
b) it's unlikely a memory issue. if it was you'd notice when attempting to go to VT1 and login. also 1GB should be fully sufficient. Full KDE session + Opera (but w/ plasma-desktop replacement) has ~282MB of active RAM here...
c) for mem issues one should provide a "top" dump ;-)
d) please provide the output of glxinfo ('cause the other bug so far only affected nvidia users and you've likely got an intel chip)
e) you can "ps -Af | grep kwin"; gdb -> attach <pid>; continue/bt to inspect a possible infinite loop
Comment 3 Kevin Brightwell 2011-04-03 14:45:20 UTC
(In reply to comment #1)
> > When the desktop effect which tiles the windows accross the screen is invoked
> > (OR the shift switcher) kwin crashes as my computer does not have enough RAM to
> > handle the task.
> If Kwin crashes, please provide a backtrace. Btw Window Tiling is not an effect
> and we do 
> not have a "shift switcher". It is very unlikely that KWin needs more memory
> during effects 
> and especially not so much that you get an out-of-memory exception. Let's face
> it: visiting the 
> bug creation website in Firefox requires magnitudes of more RAM than KWin needs
> at all. The 
> Linux kernel is btw rather good at swapping out memory dumps of unused programs
> and 
> KWin should never be swapped out. If it happens (happened to my) it becomes not
> nice to 
> use and the system might start thrashing, but not crashing.

I guess I should clarify then, the system locks up rather than crashes. It renders the GUI completely useless.

> > 
> > I am currently running Kubuntu 10.10, with plasma-netbook running. 
> > 
> > A simple solution would be to disable desktop effects by default when the
> > netbook version is found to be the best option. 
> Very bad idea as the Netbook shell relies on compositing.
> > 
> > Reproducible: Always
> > 
> > Steps to Reproduce:
> > Open Window tiling, OR shift switcher with many windows open. 
> > 
> > Actual Results:  
> > kwin locked up
> Might that be a duplicate of bug #261323 ?

I do not think it is a duplicate of this. I have no GPU, only the intel atom.
Comment 4 Kevin Brightwell 2011-04-03 14:51:01 UTC
Created attachment 58539 [details]
output of glxinfo
Comment 5 Kevin Brightwell 2011-04-03 14:52:48 UTC
(In reply to comment #2)
> probably the lanczos filter. call "kcmshell4 kwincompositing", activate the
> advanced tab and set the "scale method" to "smooth" (or "crispy" - at least NOT
> "accurate"), hit apply and check again.
I will report back with this as I forgot to do this before filling out the rest of the comment.. :(

> otherwise:
> a) "tiling" == "present windows" aka "exposé" ?!
Yes, that was my mistake. Wrong terms used, my apologies.
> b) it's unlikely a memory issue. if it was you'd notice when attempting to go
> to VT1 and login. also 1GB should be fully sufficient. Full KDE session + Opera
> (but w/ plasma-desktop replacement) has ~282MB of active RAM here...
I have a tty open right now and it states:
i915_program_error: Can't find free R reg.
i915_program_error: Exceeded max temporary reg 16/16
i915_program_error: Exceeded max temporary reg 17/16
...
i915_program_error: Exceeded max temporary reg 30/16
> c) for mem issues one should provide a "top" dump ;-)
How would I go about doing this, my apologies.

> d) please provide the output of glxinfo ('cause the other bug so far only
> affected nvidia users and you've likely got an intel chip)
I attached the output of this

> e) you can "ps -Af | grep kwin"; gdb -> attach <pid>; continue/bt to inspect a
> possible infinite loop
I tried running this, but it locked up my netbook. I could be doing it wrong too though.
I ran:
`sudo gdb`
`attach <pid>`
It listed a whole bunch of missing debug symbol issues.
Comment 6 Kevin Brightwell 2011-04-03 14:56:34 UTC
(In reply to comment #5)
> (In reply to comment #2)
> > probably the lanczos filter. call "kcmshell4 kwincompositing", activate the
> > advanced tab and set the "scale method" to "smooth" (or "crispy" - at least NOT
> > "accurate"), hit apply and check again.
> I will report back with this as I forgot to do this before filling out the rest
> of the comment.. :(
That appears to have stoppd the issue. The system is obviously much slower with Desktop effects enabled though.
Comment 7 Martin Flöser 2011-04-03 15:11:49 UTC
your drivers are completely outdated. You should update to at least mesa 7.10. That will also fix this issue.
Comment 8 Thomas Lübking 2011-04-03 15:40:33 UTC
ftr:
> Yes, that was my mistake. Wrong terms used, my apologies.
Nevermind, we just had to clarify what triggered the issue if it wouldn't have been the suspected one.

> How would I go about doing this, my apologies.
I don't think there's a CLI parameter to set the sorting, so just run "top", press "SHIFT+m", select the output and middleclick somewhere ;-)

> i915_program_error: Can't find free R reg. ...
This is likely error output from the mesa shader compiler, not about the system memory.

> I tried running this, but it locked up my netbook...
first off..... DO NOT RUN STUFF AS ROOT! ;-)
issuing "gdb" is fine. if you attached to a PID like "123456" and not literally "<pid>", that's fine as well.
You're then inside a gdb session. The attached process is at this moment halted. You need to either inspect it's current position ("bt") or make it go on ("continue")
You can press ctrl+c any time, "detach" and "quit" to leave gdb. There's extensive documentation on the debugger, known by the great oracle of moutain view =)