Bug 347425 - Window contents black after redraw
Summary: Window contents black after redraw
Status: RESOLVED DUPLICATE of bug 324823
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.3.0
Platform: Kubuntu Linux
: NOR critical
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-08 11:42 UTC by Lastique
Modified: 2015-11-02 15:58 UTC (History)
2 users (show)

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


Attachments
Black tooltip example (171.48 KB, image/png)
2015-05-08 11:43 UTC, Lastique
Details
Black kate window (96.17 KB, image/png)
2015-05-08 11:43 UTC, Lastique
Details
Black Firefox window (243.24 KB, image/png)
2015-05-08 11:44 UTC, Lastique
Details
The screenshot with the black bottom panel (795.44 KB, image/png)
2015-11-02 10:18 UTC, Lastique
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lastique 2015-05-08 11:42:22 UTC
Under different circumstances application windows become black after being redrawn. This also sometimes happens with the tooltips for the panel elements, such as app icons or system tray. It doesn't seem to matter what application is displayed in the affected window.

Reproducible: Sometimes

Steps to Reproduce:
The easiest way to reproduce is to use window resize with mouse:
1. Open an application in windowed mode. E.g. kate or Firefox.
2. Resize the window with mouse. Or maximize/unmaximize it by clicking on the button in the window decoration.
3. Repeat step 2 multiple times.

Actual Results:  
Sometimes the window contents become black instead of redrawing. The contents don't appear until the next resize/maximize/unmaximize (i.e. redraw).

Expected Results:  
Window contents should be visible after redraw.

Kubuntu 15.04, x86_64, KDE Framework 5.3 installed from Kubuntu backports. Nvidia drivers 346.59. Compositing enabled through GLX. Happens regardless of the OpenGL version used (2.0 or 3.1).
Comment 1 Lastique 2015-05-08 11:43:11 UTC
Created attachment 92497 [details]
Black tooltip example
Comment 2 Lastique 2015-05-08 11:43:43 UTC
Created attachment 92498 [details]
Black kate window
Comment 3 Lastique 2015-05-08 11:44:12 UTC
Created attachment 92499 [details]
Black Firefox window
Comment 4 Lastique 2015-05-09 17:40:44 UTC
Addition: The problem usually manifests itself after quite some time of uptime and is less likely to appear after a reboot. It is possible that something breaks over time as the system keeps being used.
Comment 5 pa_collins 2015-05-10 23:25:57 UTC
I am experiencing something similar, which may (or may not) have the same root cause. In my case it only occurs when I have Maximize animation set in Desktop effects. Interestingly, if I slow down the animation (using compositor animation speed in system settings) I can see the window gradually fade to black as it approaches maximum size, rather than just flipping to black when maximized.

Kubuntu 15.04 backports
Plasma 5.3.0
Nvidia Quadro K5100M
nvidia-346-updates (...although selecting an alternative driver does not change the behaviour)
Comment 6 Jeff Fitzmaurice 2015-05-17 20:49:19 UTC
I am experience this as well.  I am running Fedora 21 64 bit.  I just install Plasma5.03 last weekend.  I notice the window going black under all apps i.e. Kontact, Konsole, Dolphin, Firefox, Chrome, etc.  The way to get the content back is to fully minimize the window, then bring it back up again.
Comment 7 Kevin Kofler 2015-05-17 21:47:47 UTC
I think this is a graphics driver (NVidia proprietary) bug, not a KDE bug at all.
Comment 8 Jeff Fitzmaurice 2015-05-17 22:42:32 UTC
(In reply to Kevin Kofler from comment #7)
> I think this is a graphics driver (NVidia proprietary) bug, not a KDE bug at
> all.

Ok.  I'll install it on my laptop and see.  It is Intel.
Comment 9 Jeff Fitzmaurice 2015-05-17 23:13:04 UTC
I got it on my Lenovo and did a few comparisons.  System Settings/Application Style/Window Decarations is the place.  I originally set the default to Plastik.  I did this on the Lenovo as well.  Plastik was giving me my blank windows.  

I switched to org.kde.oxygen.  and it works without blacking out...at least for now.  Something with the Plastik decorations that causse issues on both my Nvidia machine and my Lenovo with Intel.
Comment 10 Lastique 2015-10-31 23:55:06 UTC
Still happens for me in Kubuntu 15.10 (kwin 5.4.2).

Whether or not this is a Nvidia problem, it should work. It did in KDE 4.
Comment 11 Lastique 2015-10-31 23:57:31 UTC
I'll add that I don't have this problem on XFCE, on the same machine with the same drivers. So clearly either Qt or KDE is doing something that makes the problem appear.
Comment 12 Lastique 2015-11-01 00:08:26 UTC
Another observation in Kubuntu 15.10. The problem also manifests itself as black or incorrect icons in the task manager on the panel. For instance, for Kmail it may display a cogwheel icon (the one that is displayed when there is no icon assigned to a file) and it may change as you hover the mouse pointer over the application button. At other moments the icon may be a black square. I'm also occasionally seeing incorrect icons or black textures in other elements of interface.
Comment 13 Thomas Lübking 2015-11-01 08:45:01 UTC
https://bugs.kde.org/attachment.cgi?id=92497
Shows an invalid texture *inside* the client - that is for sure not a problem with KWin or the compositor.

For https://bugs.kde.org/attachment.cgi?id=92499 things are "on the edge" as accelerated FF is OpenGL, so the invalid texture may be inside either KWin or Firefox

https://bugs.kde.org/attachment.cgi?id=92498 is an invalid texture in the KWin compositor.

Given your descriptions, I assume the kwin issues stem from bug #324823 (fixed in 5.4)

The invalid textures could have the same cause, but this needs to be fixed in QtQuick - https://bugreports.qt.io/
Reporting it to KWin is pointless

(In reply to Lastique from comment #12)
> I'm also occasionally seeing incorrect icons

Depending on where you see them, that's either a problem with the icon cache or the particular application. It's for dead sure not in KWin.

If it's constrained to a certain application, file the bug against that. If not, file a bug against 
frameworks-iconthemes.

Pre-emptively marking this as dupe of bug #324823 - iff you can reproduce /this/ problem with KWin 5.4, feel free to re-open it, but we'd need to know what differs for you. Bugs about invalid textures *inside* clients or wrong icons do not belong to KWin and won't be fixed here, sorry.

*** This bug has been marked as a duplicate of bug 324823 ***
Comment 14 Lastique 2015-11-02 10:15:48 UTC
Thank you for the detailed reply. Unfortunately, I'm not familiar with KDE software design, nor with Qt or OpenGL programming, so I wouldn't be able to meaningfully describe the problem in the Qt bug report.

In the couple of days I've been using Kubuntu 15.10 so far the problem is indeed reduced. I can no longer reproduce it with Kate or Firefox, at least not as easily as when I created the ticket. But as I described, I do get black textures on other places. For instance, today I got the whole bottom panel black at some point (see the new screenshot). Does this still count as the problem in the client (which, I believe, is plasmashell in this case)?
Comment 15 Lastique 2015-11-02 10:18:58 UTC
Created attachment 95255 [details]
The screenshot with the black bottom panel
Comment 16 Thomas Lübking 2015-11-02 15:58:25 UTC
This is on the edge - might be either an invalid texture in KWin or in plasmashell (the panel is a GL context)
The only way to figure is to see whether this also occurs with compositing suspended (suspending the compositor when it happens is unfortunately not enough, since that will trigger a theme update in plasmashell and by that usually a resize of the panel and a reload of textures)