Bug 267349 - A black box replaces a window or pop-up after some time being loged in.
Summary: A black box replaces a window or pop-up after some time being loged in.
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-01 00:33 UTC by Alex
Modified: 2012-04-09 07:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2011-03-01 00:33:47 UTC
Version:           unspecified (using KDE 4.4.5) 
OS:                Linux

This has happened three times, but am not able to reproduce yet (or take screenshot). After working for at least 2 hours, all of a sudden any new or old window pop-up (not main window, just their pop-ups) becomes a completely black box, no edges, buttons or decorations. Could not resolve or avoid happening and had to log off and on again. Taskbar becomes invisible, right click doesn't produce anything, nor does ALT+F2, while CTRL+ESC simply brings up a black box. Solution was always CTRL+ALT+SHIFT+DEL
This did not use to happen and only started after a change in qt libraries, so it might be related. All the rest of the settings have been the same for the past 4 months.

Reproducible: Couldn't Reproduce
Comment 1 Christoph Feck 2011-03-01 01:37:25 UTC
Are you using NVIDIA video drivers?
Comment 2 Alex 2011-03-01 02:24:50 UTC
(In reply to comment #1)
> Are you using NVIDIA video drivers?

Yes, NVIDIA-Linux x86_64 260.19.36 from Nvidia's website.
Comment 3 Alex 2011-03-02 22:21:51 UTC
Ok, it happened again, and I believe I might be able to reproduce.
It happens after working with qOctave and gnuplot. At some random point, a black box replaces some windows (qt windows?) apparently with a black (or grey) box instead of the normal window. This time skype worked properly but qOctave and KDE windows would not show.
Comment 4 Thomas Lübking 2011-03-02 22:54:45 UTC
please post the output of
grep -iE 'kwin4_effect_.*Enabled=true' `kde4-config --path config | cut -d":" -f1`/kwinrc | sed -e 's/kwin4_effect_//g; s/Enabled=true//g'

I haven't seen black windows since ages, but in general that means the drivers inability to allocate a texture and the reason is usually "out of RAM" (GPU ram) - could be some sort of leak (in kwin, an effect or the driver)

The next step would be to bisect the issue to determine the culprit effect if there's such.
Are you able to up/dowgrade the driver and/or update KDE?

As an interim solution and aside that some effects are not possible, the XRender backend should work ok for you (what's your GPU?) and rather not show such issue.
Comment 5 Alex 2011-03-03 00:40:11 UTC
When I tried your command:

Try `cut --help' for more information.
bash: -f1: command not found
grep: /kwinrc: No such file or directory

GPU is nvidia 460 with 1GB ram, the bug occurs during work which does not require any heavy usage of the GPU.

I can downgrade the GPU driver, but It has happened with a slightly older version (NVIDIA-Linux x86_64 260.19.12). I can update KDE (currently @ 4.4.5).

Let me know if needed.
Comment 6 Alex 2011-03-03 02:28:23 UTC
Just in case it's of any help, I've uploaded a vid on youtube: http://www.youtube.com/watch?v=8GPECfMjvSA
Comment 7 Thomas Lübking 2011-03-03 15:35:52 UTC
(In reply to comment #5)
> When I tried your command:
sorry. you have to get rid of the newline character (introduced by html...) between
'cut -d":"' and '-f1`/kwinrc'

> Let me know if needed.
updating KDE would probably be a good idea anyway.

I hope the video is just overbrightened - i'm not sure what i'm supposed to see there (aside well, the black window) or what the flickering element is...

Do you enforce any special GL parameters via xorg.conf or nvidia-settings (such as FSAA, AllowSHMPixmaps or similar?)
Comment 8 Alex 2011-03-04 00:10:08 UTC
The settings you wanted:

coverswitch
desktopgrid
dialogparent
diminactive
fade
flipswitch
highlightwindow
login
logout
minimizeanimation
presentwindows
shadow
sheet
slide
slideback
slidingpopups
taskbarthumbnail
wobblywindows

I can't update KDE cuz I'm on debian and latest version if I'm correct in testing is the one I'm at now, have been waiting for a while for SC 4.6.

Today something else happened which puzzled me, there was artifacts on the text in iceweasel. I was using in OpenGL: Shared memory, which might explain the leaks ?

However every time this happens I had open qtOctave and gnuplot.
xorg.conf is default (produced by the nVidia driver upon installation) with no special parameters.

The video was just to show the grey & black boxes, the flickering/brightness is probably due to the shitty camera on the phone.
Comment 9 Thomas Lübking 2011-03-04 00:38:13 UTC
a) please use "texture from pixmap" (no idea whether shm was actually used then for nvidia drivers) as well as "direct rendering" for the nvidia driver
b) "However every time this happens I had open qtOctave and gnuplot."
     "this" means the black window issue? - only coincident or really related? (ever happened w/o them?)
c) you /can/ try to add "GLStrictBinding=true" to the [Compositing] section in ~/.kde/share/config/kwinrc and restart "kwin --replace &" - but that has likely no effect.

Since your SW is rather old i guess there's no "danger" you've mixed nouveau/nvidia driver or the mesa opengl lib overriding/shadowing the nvidia one? ("stat /usr/lib/libGL.so" should ultimately point sth. like libGL.so.260.19.12)
Comment 10 Alex 2011-03-04 00:48:02 UTC
I've switched back to texture from pixmap & direct rendering. Also I removed the "fade| option as this seemed to slow down the computer.

I do not know if it is a coincidence, but I have left the computer on for days and it didn't happen, yet when i'm working with qtoctave & gnuplot it happens all the time.

I've added GLStrictBinding=true, and will tell u if anything changes.

I doubt I've mixed drivers because this was a fresh installation on purpose in order to use nvidia's drivers (non-free) in order to use with Cuda.
Comment 11 Alex 2011-03-05 01:49:07 UTC
Ok this keeps happening, and this time without qtOctave or Gnuplot running. 
It occured as i tried to save something on firefox.
However I had ksnapshot running, and managed to get a screenshot.
http://s1199.photobucket.com/albums/aa474/vor73x/?action=view&current=mozilla_bug2.png

I'm starting to eliminate options on Desktop Effects at System settings, and i've set the texture filter to nearest instead trilinear or bileanear that I had it before.

Any suggestions on what else I could try ?
Comment 12 Alex 2011-03-09 19:44:48 UTC
I've rolled back to Debian's nvidia driver & non-free GL stuff (stable).
Bug keeps appearing and only solution so far has been to keep a systemsettings window open and try to suspend compositing, if that window is unaffected by bug, which isn't always the case.
Is there any way to trace or find what could be causing this?
Comment 13 Thomas Lübking 2011-03-09 20:43:48 UTC
you can toggle compositing by pressing SHIFT+Alt+F12

run kdebugdialog, ensure anything kwin & kwin(1212) are checked (Kwin4 is an unrelated game)
then run "kwin --replace" from konsole (do NOT close the konsole) to get some debug output. there will likely be some GL_ERROR messages.

Also try to deactivate (kcmshell4 kwineffects)
- minimizeanimation
- sheet
- slideback
* slidingpopups (not sure about this)
- wobblywindows

I think they all (at some time in the past) could have caused kwin to keep in "fullscreen effect" mode - but that's just a short in the dark.
You could as well disable all effects (but NOT compositing), check whether the issue remains and if not, (slowly) re-enable them one by one until the issue reappears...
Comment 14 Alex 2011-03-09 23:15:59 UTC
Thomas thank you for the help and instructions, I will follow them, and if I can get any useful info I will let you know!
Comment 15 Alex 2011-03-18 00:57:23 UTC
I think I've found what causes this bug. The option: Dialog Parent under the Focus group in desktop effects. I had been running free of problems for a week without it, and after re-enabling it in less than 12 hours the bug re-appeared. Sadly I was not running a debug output, so I cannot tell you exactly what it was.
Comment 16 Martin Flöser 2011-03-18 19:38:03 UTC
dialog parent has a severe memory leak - it fills a hash without ever removing the items again.
Comment 17 Thomas Lübking 2011-03-18 22:08:49 UTC
OMG - i'm gonna rewrite the effect.
Comment 18 Thomas Lübking 2011-03-19 15:44:02 UTC
Git commit 26a5f4dc3ec42616a13eee4f0112a22b6361c241 by Thomas Lübking.
Committed on 18/03/2011 at 23:20.
Pushed by luebking into branch 'KDE/4.6'.

fix dialogparent implementation

CCBUG: 267349

M  +49   -67   kwin/effects/dialogparent/dialogparent.cpp     
M  +3    -2    kwin/effects/dialogparent/dialogparent.h     

http://commits.kde.org/kde-workspace/26a5f4dc3ec42616a13eee4f0112a22b6361c241
Comment 19 Thomas Lübking 2011-03-19 16:36:44 UTC
Git commit dccc1c2d6db62bf633cef3d97ca1b495597e3ee8 by Thomas Lübking.
Committed on 19/03/2011 at 16:34.
Pushed by luebking into branch 'master'.

fix dialogparent implementation

forward port of 26a5f4dc3ec42616a13eee4f0112a22b6361c241
CCBUG: 267349

M  +26   -38   kwin/effects/dialogparent/dialogparent.cpp     
M  +2    -2    kwin/effects/dialogparent/dialogparent.h     

http://commits.kde.org/kde-workspace/dccc1c2d6db62bf633cef3d97ca1b495597e3ee8
Comment 20 Alex 2011-03-24 22:50:33 UTC
I am afraid the bug still appears although less often than before. In 3 cases it has appeared right after doing an ALT+TAB.
The only Desktop effects I am using atm are: Cover Switch and Present Windows. Again I was not running the debug command to see what might have caused it, and the problem is not as serious since SHIFT+ALT+F12 solves it.
I have abandoned nvidia's official drivers and have been using Debian's nvidia drivers for the past 3 weeks. If it still persists I will eliminate cover switch and present windows and see if bug persists. I am not using shadows or any other option. I am still using OpenGL, with texture from pixmap, nearest filter and direct rendering.
Comment 21 Martin Flöser 2011-03-26 09:34:22 UTC
better use NVIDIA's driver, it's much more recent than what Debian shipps.
Comment 22 Alex 2011-04-07 19:17:45 UTC
Since I've disabled Desktop Grid and Flip switch, I haven't had the bug appear in over a week. Some times it would appear right after doing a flip switch, or while doing a flip switch. I can't help it but think that this is somehow related to the bug.
The only options I'm using now are:
presentwindows
slide
No shadows, no nothing else.
I am slowly starting to use more options, checking to see if bug will reappear.
I am puzzled as to how come I am the only person affected by that bug.
Comment 23 Martin Flöser 2011-04-30 10:38:54 UTC
might be related to bug #261323
Comment 24 Martin Flöser 2012-04-09 07:33:16 UTC
setting to UPSTREAM as it's one of the most known NVIDIA driver issues.