Bug 253483 - Kwin regression: black windows previews after upgrading to kde 4.5.2
Summary: Kwin regression: black windows previews after upgrading to kde 4.5.2
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-07 10:01 UTC by Stefano
Modified: 2011-01-31 20:02 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
kwin problem (167.19 KB, image/png)
2011-01-31 20:02 UTC, Nicofo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano 2010-10-07 10:01:20 UTC
Version:           unspecified (using Devel) 
OS:                Linux

I am using Archlinux 64-bit on a desktop PC with an X300 ATI card. I was using the radeon gallium driver (r300g) from mesa 7.9 and kde 4.5.1 and everything worked pretty good, blur and windows previews included with no need to blacklist my configuration. Yesterday I upgraded to kde 4.5.2 and now the windows previews in the taskbar are completely black. Also, when using the present windows effect, previews look good for a fraction of second and then they become completely black.

Reproducible: Always

Steps to Reproduce:
Use present windows effect or windows thumbnails.
Comment 1 Martin Flöser 2010-10-07 10:34:53 UTC
sorry, driver bug. Please report on freedesktop.org

In 4.5.2 we changed the shader to compile on more hardware. It seems like compilation failed for you in 4.5.1, while it compiles now, but the driver simply fails.

A short term solution is to add your driver to the blacklist (the preshipped does not include mesa 7.9 at all)
Comment 2 Fredrik Höglund 2010-10-07 10:49:45 UTC
No, don't report this to freedesktop.org. It has already been reported as bug 30007.

This is also not a driver bug, the problem is that the shader does 49 texture fetches, while the R300 only supports 32.
Comment 3 Stefano 2010-10-07 12:33:48 UTC
Ok, I'll blacklist the driver. Thank you very much for your prompt replies.
Comment 4 YAFU 2010-11-07 17:54:09 UTC
Hello.
I have the same problem in Kubuntu 10.10 Maverick, KDE 4.5.3. Mesa 7.10.0+git20101104 and Gallium 0.4 on RS690 (ATI x1250)

@Fredrik, Is there any workaround for this? Can I change some configuration file to select 32 in textures?
Comment 5 Thomas Lübking 2010-11-07 18:56:40 UTC
no, but you can blacklist the driver. add the output of
echo "Ati=`glxinfo | grep 'OpenGL renderer string' | sed -e 's/^.*: //'`:-:`glxinfo | grep 'OpenGL version string' | sed -e 's/^.*: //'`"

to the [Blacklist][Lanczos] section in ~/.kde/share/config/kwinrc
if there's already an "Ati=" string, just drop the "Ati=" part from the output and attach the rest prepended with a comma ","
Comment 6 YAFU 2010-11-07 23:09:04 UTC
Hi Thomas.
With:

echo "Ati=`glxinfo | grep 'OpenGL renderer string' | sed -e 's/^.*: //'`:-:`glxinfo | grep 'OpenGL version string' | sed -e 's/^.*: //'`"

I get:

Ati=Gallium 0.4 on RS690:-:2.1 Mesa 7.10-devel

I put it in my kwinrc in [Blacklist][Lanczos] section and then I do kwin --replace (I've tried restarting the system too) But I keep getting black  or empty windows.
Thanks.
Comment 7 Thomas Lübking 2010-11-07 23:27:53 UTC
do you get them always or only when using effects like present windows?
do you use trlinear filtering?
Comment 8 YAFU 2010-11-08 00:48:27 UTC
I tested with the three options in the "texture filter", and with all of them I have the problem.
Normal windows have no problem. The problem occurs only with some effects. I mention these effects, but my system is in Spanish so I try to translate it properly:

* Present Windows: As described in the original report, previews look good for a fraction of second and then they become completely black. Also in some of these windows in presentation I get text corruption.
http://img14.imageshack.us/img14/5425/resized1j.jpg

* Windows previews in the taskbar: Empty or black
http://img99.imageshack.us/img99/7342/resized2g.jpg

* Cover Flow (alt+tab): Empty Windows and some corruption in the bottom of the window.
http://img573.imageshack.us/img573/6244/resized3c.jpg

* Desktop Cube: A diagonal line corruption in the text dialog.
http://img257.imageshack.us/img257/1567/resized4o.jpg
--------
* Desktop Grid works fine.
http://img340.imageshack.us/img340/9772/resized5g.jpg

Before installing r300g Mesa + Gallium (using original Maverick libgl1-mesa-dri package), I did not get black windows in Present Windows, but what happened is that the windows in the presentation flickered and disappeared making it very annoying.
Regards.
Comment 9 Thomas Lübking 2010-11-08 01:16:02 UTC
that's the lanczos shder for sure.
either the config wasn't read (.kde ./. .kde4?) or the blacklist driver string doesn't match - try to strip the "Mesa 7.10-devel" part.

Otherwise mgraesslin should know better about the blacklist string pitfalls.
Comment 10 YAFU 2010-11-08 12:00:48 UTC
Thanks Thomas.
In Kubuntu ~/.kde/share/config/kwinrc is the correct path.
I tried with several combinations and nothing has worked. I have also searched for examples on how to put on the blacklist drivers with Gallium, but have not found.
I have to mention that I tried the LiveCD of Fedora 14 wich uses Gallium3D by default and I have exactly the same problem of black windows (KDE 4.5.2, Mesa 7.9, Gallium 0.4)
Where I can get documentation about blacklisting drivers and the rules that should have strings attached in kwinrc?
Comment 11 Nicofo 2010-11-18 00:19:23 UTC
Hello,
same problem here with Fedora14 and KDE 4.5.2.
(same screenshot as in post #8)

No problem before on Fedora13
The command echo "Ati=`glxinfo | grep 'OpenGL renderer string' | sed -e 's/^.*://'`:-:`glxinfo | grep 'OpenGL version string' | sed -e 's/^.*: //'`"
returns: Ati= Gallium 0.4 on RV370:-:2.1 Mesa 7.9

No effect by adding this in the ~/.kde/share/config/kwinrc file
Comment 12 Thomas Lübking 2010-11-18 00:46:37 UTC
try just: "Ati=RV370:-:7.9" and ensure it to be in the proper section "[Blacklist][Lanczos]"
Comment 13 Stefano 2010-11-18 18:35:37 UTC
> Ati= Gallium 0.4 on RV370:-:2.1 Mesa 7.9
      ^
      |
I guess this leading space is the root of your problems.
I have "Ati=Gallium 0.4 on ATI RV370:-:2.1 Mesa 7.10-devel" in kwinrc and lanczos filter is disabled (and hence no black previews)
Comment 14 Nicofo 2010-11-18 20:59:26 UTC
> try just: "Ati=RV370:-:7.9" and ensure it to be in the proper section
> "[Blacklist][Lanczos]"

I've tried with that => I still have the black preview (I have even rebooted Fedora although I guess just kwin should be enough).

For the leading space, I have indeed suspected it should be a problem so I have always removed it.

> [...] and lanczos filter is disabled (and hence no black previews)
How do you disable it ?
Comment 15 Thomas Lübking 2010-11-18 22:24:33 UTC
(In reply to comment #14)
> How do you disable it ?
for the moment only via the blacklist - because the driver situation turned out to be as you experience it, 4.6 will allow you to configure it :-(

since Stefano has the same GPU you should really try "Ati=Gallium 0.4 on ATI RV370:-:2.1 Mesa 7.9"
Comment 16 Nicofo 2010-11-19 00:09:03 UTC
> since Stefano has the same GPU you should really try "Ati=Gallium 0.4 on ATI
> RV370:-:2.1 Mesa 7.9"

still not working...

Rem: the leading space was due to an erroneous copy/paste of the command echo "Ati=`glxinfo ...   ==> don't worry about it.

When I run kwin --replace, I get this message in the terminal when the black preview appear:

r300 FP: Compiler Error:
Ran out of hardware temporaries
Using a dummy shader instead.
r300 FP: Compiler Error:
Too many constants. Max: 256, Got: 49
Using a dummy shader instead.
Comment 17 Venkatesh Krishnamurthi 2010-11-21 00:33:41 UTC
FWIW, on my Fedora 14 system the following entry successfully blacklists the Gallium RV370:

[Blacklist][Blur]
Gallium=RV370:-:7.9

[Blacklist][Lanczos]
Gallium=RV370:-:7.9

The relevant lines from the o/p of glxinfo are:

OpenGL renderer string: Gallium 0.4 on RV370
OpenGL version string: 2.1 Mesa 7.9
Comment 18 Nicofo 2010-11-22 20:20:07 UTC
> The relevant lines from the o/p of glxinfo are:
> 
> OpenGL renderer string: Gallium 0.4 on RV370
> OpenGL version string: 2.1 Mesa 7.9
I have the same...
> [Blacklist][Lanczos]
> Gallium=RV370:-:7.9
... and so these lines work for me too.
Thanks ;-)

(However no need fot me to blacklist Blur. Moreover it's possible to disable it in systemsettings > desktop effects)
Comment 19 Nicofo 2011-01-31 20:02:19 UTC
Created attachment 56702 [details]
kwin problem

Hi,
I'm trying KDE 4.6 => if I remove the line " Gallium=RV370:-:7.9 " in the blacklist, there is no problem of black windows anymore !

However (with or without that line) there is another problem (less important): the text displayed in the window (representing the title of the window) is not visible: there is only the black banner in the middle of the window without any text... (see attachment)