Bug 275878 - Nvidia 275.09.07 cause broken shadows.
Summary: Nvidia 275.09.07 cause broken shadows.
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 276318 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-17 09:01 UTC by Alexander
Modified: 2011-07-07 04:30 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example (201.41 KB, image/png)
2011-06-17 09:02 UTC, Alexander
Details
Screenshot of artefacts (53.14 KB, image/png)
2011-06-27 03:46 UTC, Andrew M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2011-06-17 09:01:31 UTC
Version:           unspecified (using Devel) 
OS:                Linux

This happens after the video driver update a few days ago. Only rmb menu, tooltips and plasma is affected. If oxygen-gtk is used the problem appear in Firefox too.
KDE 4.6.80

Reproducible: Always
Comment 1 Alexander 2011-06-17 09:02:09 UTC
Created attachment 61073 [details]
Example
Comment 2 Alexander 2011-06-17 09:13:45 UTC
Problem disappears after turning off hardware rendering, but this is a bad solution.
Comment 3 Martin Flöser 2011-06-26 09:26:45 UTC
please try with later version of KDE, some shadow related issues were fixed. I mark as fixed, if you can reproduce with e.g. RC1, please reopen.
Comment 4 Alexander 2011-06-26 10:48:01 UTC
Not fixed in RC1.
Comment 5 Martin Flöser 2011-06-26 11:08:49 UTC
please provide more information about your system. Which compositing mode do you use? Does it change if switching to OpenGL 1, OpenGL 2 or XRender? Is it influenced by the Qt graphicssystem? E.g. what happens if --graphicssystem=raster is used or --graphicssystem=native?
Comment 6 Alexander 2011-06-26 12:48:44 UTC
Arch Linux x86_64, KDE RC1, nvidia 9500GT, latest drivers. I use opengl engine in the kwin compositing settings. Problem appears after turning on "use hardware rendering" option. Also seems that this is not depend of another kwin settings, in all cases, bug appears after enabling hardware rendering.

All was fine until I did not update nvidia driver to 275.09.07 version. I see good performance improvements with this version, but seems that something was changed in their code that cause the problem with shadows.

BTW, there is not possible to use hardware acceleration with xrender engine, so, of course, bug happens only with opengl engine.

> --graphicssystem=raster is used or --graphicssystem=native
How to use this options for entire KDE environment?
Comment 7 Thomas Lübking 2011-06-26 13:03:40 UTC
I assume hardware rendering means "direct rendering"?

> How to use this options for entire KDE environment?

export QT_GRAPHICSSYSTEM=<system>
But the Application internal setting is stronger.
Strongest setting is the application parameter so try it on kwin

kwin --replace --graphicssystem <system> &

and or the offending application. Esp. if it only affects stuff from plasma-desktop there's a good chance this is due to it running on the raster engine, so you'd

kquitapp plasma-desktop; sleep 1; plasma-desktop --graphicssystem native

to rule out the clients graphicssystem is the culprit.
Comment 8 Alexander 2011-06-26 19:48:10 UTC
kwin --replace --graphicssystem=raster fix the problem.

Also I see good performance impact with that, window resizes smoother and I don't see vertical retrace (with "native" value I see it even if vertical sync is enabled... actually it is always enabled). I would prefer to use "raster" option as default.
Comment 9 Thomas Lübking 2011-06-26 21:49:08 UTC
Actually sounds like the flat pixmap copy issue to me.
http://quickgit.kde.org/?p=kde-workspace.git&a=commit&h=86d2b6a54765498d83387749276207cfb14235cb

-> Do you compile from sources?

> I would prefer to use "raster" option as default.
Sure? read here: http://git.reviewboard.kde.org/r/101385/ ;-)
Just support for the raster backend is rather new and it will pot. break several (older) decorations.
Comment 10 Andrew M 2011-06-27 03:46:29 UTC
Created attachment 61355 [details]
Screenshot of artefacts

I would like to add a confirmation to this bug.
Nvidia 275.09.07
KDE 4.6.90

kwin --replace --graphicssystem=raster does fix the problem for me (and also increases performance and reduces memory use in one hit).

Attached is a screenshot showing black ellipses on krunner and lower panel under normal graphicssystem=native. If the panel is on the side (like the reporter's image) it is even worse.

Please do tell us how to enable raster on login in kwinrc if the option is available.
Comment 11 Jakub Schmidtke 2011-06-27 04:23:54 UTC
I have the same issue.
ArchLinux 64bit, nvidia 275.09.07, kde 4.6.90

Both running "kwin --replace --graphicssystem=raster" and adding "export QT_GRAPHICSSYSTEM=raster" to .bashrc (and reloading X) fixes the problem.
Comment 12 Alexander 2011-06-27 07:08:35 UTC
I've added this exports in my /etc/profile
export QT_NO_GLIB=1
export MALLOC_CHECK_=1
export QT_GRAPHICSSYSTEM=raster
Comment 13 Cédric Bellegarde 2011-06-27 07:14:45 UTC
Here downgrading nvidia driver fix issue...
Comment 14 Hugo Pereira Da Costa 2011-06-27 08:34:13 UTC
@Cedric
This also fixes https://bugs.kde.org/show_bug.cgi?id=276318 ?
If yes, the one above is likely a duplicate of this one.
You agree ?
Comment 15 Hugo Pereira Da Costa 2011-06-27 08:35:38 UTC
*** Bug 276318 has been marked as a duplicate of this bug. ***
Comment 16 Christian González 2011-07-06 21:25:40 UTC
Same problem here in Fedora 15 i386 + KDE 4.6.90 (from kde-unstable repo) + nVidia 275.09.07.

"kwin --replace --graphicssystem=raster" fixes the problem.
Comment 17 Martin Flöser 2011-07-07 04:30:02 UTC
should be fixed with:

commit c1ac45e1eb14d584f1f2d1ec2c39a19b2ca1325e
Author: Martin Gräßlin <mgraesslin@kde.org>
Date:   Thu Jun 23 19:06:12 2011 +0200

    Render Shadow with only one GL texture
    
    Copies the shadow parts into one image and creates a GLTexture
    from the image, so that we can render the complete shadow with
    just one texture and one painting pass.
    
    Should remove most of the overhead involved when rendering the new Shadows.
    
    As a side effect this should fix missing shadows with non-NPOT GPUs and
    a rendering glitch reported with NVIDIA.
    
    REVIEW: 101742