Bug 386752

Summary: Black textures after toggling compositing on/off
Product: [Plasma] kwin Reporter: Lastique <andysem>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Firefox window is black in the background

Description Lastique 2017-11-11 16:33:01 UTC
Created attachment 108798 [details]
Firefox window is black in the background

If I toggle kwin compositing off and on again via hotkey, I'm beginning to see black textures in the GUI. Initially, I can see some windows blink to black briefly when I open, maximize or increase the size of other windows. For example, I have a maximized Firefox window and I start KCalc; when KCalc window appears Firefox window blinks black for like a frame or two and then back to normal.

If you keep using the system in such state the problem seems to progress because occasionally some windows or their regions remain black after the animation. I've attached a screenshot of one occurrence of the problem. In the background there's maximized Firefox. In the front there is Kate window, which I've just resized (increased the size) with mouse and Firefox turned black and stayed that way until I took the screenshot (the screenshot utility opened a window, which restored Firefox). The problem seems to happen with different applications, Qt and not.

This bug may be related to https://bugs.kde.org/show_bug.cgi?id=354731 (it may be the easy way to reproduce that issue).

I'm using Kubuntu 17.10, x86_64, Nvidia 387.22, X.org server 1.19.5, kwin 5.10.5. The problem also appeared on Kubuntu 17.04 and maybe earlier with older versions of drivers and kwin.

/etc/environment contains:

KWIN_TRIPLE_BUFFER=1
KWIN_USE_BUFFER_AGE=0
__GL_SYNC_TO_VBLANK=1
__GL_SYNC_DISPLAY_DEVICE="DFP-0"
__GL_THREADED_OPTIMIZATIONS=1

Kwin is started with this command line:

__GL_THREADED_OPTIMIZATIONS=0 kwin_x11

(Note: __GL_THREADED_OPTIMIZATIONS have no effect on the problem; I disable it for kwin because this way it consumes less CPU.)
Comment 1 Martin Flöser 2017-11-11 18:03:20 UTC
Sorry, but black windows with NVIDIA drivers is not particularly a new issues. That has been around for as far as I remember using Compositing (thats about 15 years). Not much we can do - proprietary driver, no way to debug.
Comment 2 Lastique 2017-11-12 10:21:08 UTC
Even with closed source driver, you can debug given the way to reproduce the problem. This ticket provides one.

I believe the real reason for rejecting the problem is that you have a grudge against Nvidia or closed source drivers in general, I don't know. Unfortunately, this does not solve the problem for users. If you're not supporting Nvidia, you're basically leaving the majority of users unsupported.
Comment 3 Lastique 2017-11-12 11:21:19 UTC
I've created a topic on Nvidia forum:

https://devtalk.nvidia.com/default/topic/1026340/linux/black-or-incorrect-textures-in-kde/

Feel free to provide any technical details, if you can.