Bug 280116 - [NPOT] kwin shadows are rendered badly wrong with nvidia GeForce FX5200 with nvidia-173xx drivers
Summary: [NPOT] kwin shadows are rendered badly wrong with nvidia GeForce FX5200 with ...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-15 10:25 UTC by nickpantazis
Modified: 2012-02-09 18:07 UTC (History)
3 users (show)

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


Attachments
the problem ilustrated (748.58 KB, image/png)
2011-08-15 10:25 UTC, nickpantazis
Details
The problem is added to window title in 4.8 beta (41.17 KB, image/jpeg)
2011-12-10 20:20 UTC, nickpantazis
Details
Changes to the problem in 4.8 beta if I deselect oxygen windows shadows (35.77 KB, image/jpeg)
2011-12-10 20:22 UTC, nickpantazis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nickpantazis 2011-08-15 10:25:27 UTC
Created attachment 62840 [details]
the problem ilustrated

Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

kwin shadows are rendered badly wrong in pop-ups with nvidia GeForce FX5200 with nvidia-173xx drivers

Print screen attached

Reproducible: Always

Steps to Reproduce:
right-click to display a pop-up


Expected Results:  
normal shadows
Comment 1 Martin Flöser 2011-09-25 08:56:36 UTC
Is this still an issue?
Comment 2 Russel 2011-09-26 20:31:13 UTC
yes, kwin shadows rendered wrong! I'm used GF FX5200LE with nvidia-173xx drivers and KDE 4.7.1.
Comment 3 Thomas Lübking 2011-09-26 20:58:09 UTC
try 
"kwin --replace --graphicssystem raster &"
resp. but rather not:
"kwin --replace --graphicssystem native &"
and report the result.

Also please check if the result is the _very_same_ (attach a shot in doubt) with the bespin widget style (the window decoration doesn't matter)

In doubt you'll have to use the xrender backend or try your luck with the nouveau driver.
Comment 4 nickpantazis 2011-10-04 16:01:19 UTC
When running: kwin --replace --graphicssystem raster &
I get:
OpenGL vendor string:                   NVIDIA Corporation
OpenGL renderer string:                 GeForce FX 5200/AGP/SSE2
OpenGL version string:                  2.1.2 NVIDIA 173.14.30
Driver:                                 NVIDIA
Driver version:                         173.14.30
GPU class:                              NV30
OpenGL version:                         2.1.2
X server version:                       1.9.3
Linux kernel version:                   2.6.37
Direct rendering:                       yes
Requires strict binding:                no
GLSL shaders:                           no
Texture NPOT support:                   no
kwin(5056): Shaders are not supported 
kwin(5056): Shaders are not supported 
kwin(5056): Shaders are not supported 
kwin(5056): Shaders are not supported 

The problem remains


Using XRender fixes this problem but it's slow and doesn't support many of the effects.
Comment 5 Martin Flöser 2011-10-04 16:14:40 UTC
> Texture NPOT support:                   no
ok that makes maybe sense. Hope we can fix it in 4.8
Comment 6 Thomas Lübking 2011-10-07 21:27:29 UTC
FTR:
the gpu apparently has really no NPOT support (see attachment to bug #283367)

Also, since i didn't realize that these are two indep. bugs: i tried breaking ("= false;") NPOT in git master and that didn't have any impact.

The bugs are probably related, perhaps 283367 is a dupe.
Comment 7 Ingo Ratsdorf 2011-10-08 05:28:55 UTC
in reply to comment #3 and as a cross post to bug #383367 :
I have a similar problem, but my window decorations are also wrong:

ingo@ingo-laptop:~$ kwin --replace --graphicssystem raster &
[2] 7228
ingo@ingo-laptop:~$ kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_zoom"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_login"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_slidingpopups"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_minimizeanimation"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_translucency"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_screenshot"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_boxswitch"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_slide"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_desktopgrid"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_fade"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_dialogparent"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_highlightwindow"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_taskbarthumbnail"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_presentwindows"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_logout"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_dashboard"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_outline"
kwin(7221) KWin::EffectsHandlerImpl::unloadEffect: EffectsHandler::unloadEffect : Unloading Effect :  "kwin4_effect_startupfeedback"
kwin(7228) KWin::Extensions::init: Extensions: shape: 0x "11"  composite: 0x "4"  render: 0x "b"  fixes: 0x "50"
kwin(7228) KWin::CompositingPrefs::detect: glx version is  1 . 3
OpenGL vendor string:                   NVIDIA Corporation
OpenGL renderer string:                 GeForce FX Go53xx/AGP/SSE2
OpenGL version string:                  2.1.2 NVIDIA 173.14.30
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
Driver:                                 NVIDIA
Driver version:                         173.14.30
GPU class:                              Unknown
OpenGL version:                         2.1.2
GLSL version:                           1.20
X server version:                       1.10.4
Linux kernel version:                   3.0
Direct rendering:                       yes
Requires strict binding:                no
GLSL shaders:                           yes
Texture NPOT support:                   no
kwin(7228) KDecorationPlugins::loadPlugin: kwin : path  "/usr/lib/kde4/kwin3_oxygen.so"  for  "kwin3_oxygen"
kwin(7228) KWin::Extensions::init: Extensions: shape: 0x "11"  composite: 0x "4"  render: 0x "b"  fixes: 0x "50"
kwin(7228) KWin::Extensions::init: Extensions: shape: 0x "11"  composite: 0x "4"  render: 0x "b"  fixes: 0x "50"
kwin(7228) KWin::Workspace::setupCompositing: Initializing OpenGL compositing
kwin(7228) KWin::SceneOpenGL::initBufferConfigs: Drawable visual (depth  24 ): 0x "59"
kwin(7228) KWin::SceneOpenGL::initBufferConfigs: Drawable visual (depth  32 ): 0x "80"
kwin(7228) KWin::SceneOpenGL::initBuffer: Buffer visual (depth  24 ): 0x "57"
kwin(7228) KWin::ShaderManager::initShaders: OpenGL Shaders disabled by config option
kwin(7228) KWin::SceneOpenGL::SceneOpenGL: No Scene Shaders available
kwin(7228) KWin::SceneOpenGL::SceneOpenGL: DB: true , Direct: true
kwin(7228) KWin::currentRefreshRate: Refresh rate  60 Hz
kwin(7228)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-ingo/ksycoca4"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_slidingpopups"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_blur"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: EffectsHandler::loadEffect : Effect  "kwin4_effect_blur"  is not supported 
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_fade"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_desktopgrid"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_slide"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_presentwindows"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_dashboard"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_login"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_startupfeedback"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_outline"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_boxswitch"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_taskbarthumbnail"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_logout"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_screenshot"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_translucency"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_highlightwindow"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_zoom"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_dialogparent"
kwin(7228) KWin::EffectsHandlerImpl::loadEffect: Trying to load  "kwin4_effect_minimizeanimation"
kwin(7228) KWin::Workspace::updateClientArea: screens:  1 desktops:  2
kwin(7228) KWin::Workspace::updateClientArea: Done.
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 38440509
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 33555080 ;WMCLASS: "plasma" : "plasma" ;Caption: "plasma-desktop" ' : 38440509
kwin(7228) KWin::Workspace::allowClientActivation: Activation: No client active, allowing
kwin(7228) KWin::Workspace::updateClientArea: screens:  1 desktops:  2
kwin(7228) KWin::Workspace::updateClientArea: Done.
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 38805592
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 90177556 ;WMCLASS: "kmail" : "kmail" ;Caption: "Local Folders/inbox – KMail" ' : 38805592
kwin(7228) KWin::Workspace::allowClientActivation: Activation: No client active, allowing
kwin(7228) KWin::Workspace::updateClientArea: screens:  1 desktops:  2
kwin(7228) KWin::Workspace::updateClientArea: Done.
kwin(7228) KWin::Workspace::createTile: Now tiling  "Local Folders/inbox – KMail"
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 38993189
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 92274707 ;WMCLASS: "systemsettings" : "systemsettings" ;Caption: "Desktop Effects – System Settings" ' : 38993189
kwin(7228) KWin::Workspace::allowClientActivation: Activation: No client active, allowing
kwin(7228) KWin::Workspace::updateClientArea: screens:  1 desktops:  2
kwin(7228) KWin::Workspace::updateClientArea: Done.
kwin(7228) KWin::Workspace::createTile: Now tiling  "Desktop Effects – System Settings"
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 39195536
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 31457518 ;WMCLASS: "firefox" : "navigator" ;Caption: "Bug 280116 - kwin shadows are rendered badly wrong with nvidia GeForce FX5200 with nvidia-173xx drivers - Mozilla Firefox" ' : 39195536
kwin(7228) KWin::Workspace::allowClientActivation: Activation: No client active, allowing
kwin(7228) KWin::Workspace::updateClientArea: screens:  1 desktops:  2
kwin(7228) KWin::Workspace::updateClientArea: Done.
kwin(7228) KWin::Workspace::createTile: Now tiling  "Bug 280116 - kwin shadows are rendered badly wrong with nvidia GeForce FX5200 with nvidia-173xx drivers - Mozilla Firefox"
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 39278291
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 96469010 ;WMCLASS: "konsole" : "konsole" ;Caption: "ingo : bash" ' : 39278291
kwin(7228) KWin::Workspace::allowClientActivation: Activation: No client active, allowing
kwin(7228) KWin::Workspace::updateClientArea: screens:  1 desktops:  2
kwin(7228) KWin::Workspace::updateClientArea: Done.
kwin(7228) KWin::Workspace::createTile: Now tiling  "ingo : bash"
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 39198719
kwin(7228) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 33555071 ;WMCLASS: "plasma" : "plasma" ;Caption: "plasma-desktop" ' : 39198719
kwin(7228) KWin::Workspace::allowClientActivation: Activation: No client active, allowing
kwin(7228) KWin::Workspace::updateClientArea: screens:  1 desktops:  2
kwin(7228) KWin::Workspace::updateClientArea: Done.
kwin(7228) KWin::Workspace::updateClientArea: screens:  1 desktops:  2
kwin(7228) KWin::Workspace::updateClientArea: Done.
Comment 8 searchfgold67899 2011-10-17 17:33:41 UTC
(In reply to comment #0)
> Created an attachment (id=62840) [details]
> the problem ilustrated
> 
> Version:           unspecified (using KDE 4.7.0) 
> OS:                Linux
> 
> kwin shadows are rendered badly wrong in pop-ups with nvidia GeForce FX5200
> with nvidia-173xx drivers
> 
> Print screen attached
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> right-click to display a pop-up
> 
> 
> Expected Results:  
> normal shadows

Same problem, same GPU.
Comment 9 searchfgold67899 2011-10-17 17:34:54 UTC
(In reply to comment #0)
> Created an attachment (id=62840) [details]
> the problem ilustrated
> 
> Version:           unspecified (using KDE 4.7.0) 
> OS:                Linux
> 
> kwin shadows are rendered badly wrong in pop-ups with nvidia GeForce FX5200
> with nvidia-173xx drivers
> 
> Print screen attached
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> right-click to display a pop-up
> 
> 
> Expected Results:  
> normal shadows

Same problem, same GPU.
Comment 10 sf 2011-12-10 10:37:15 UTC
(In reply to comment #7)
> I have a similar problem, but my window decorations are also wrong:

I also have FX5200, and got the same problem.
Comment 11 sf 2011-12-10 11:10:26 UTC
Please, tellme if there is any fixing this problem patches, to manually rebuild kwin with.
Thank you!
Comment 12 Ingo Ratsdorf 2011-12-10 18:50:17 UTC
A fix for me was to NOT use Oxygen, but QTCurve and also use QTCurve as Gtk+ theme in KDE 4.7.3.
Now I can use OpenGL without issues. Tried it with both Nouveau and NVIDIA173. Both okay, not NVIDIA 173 has much better performance, PARTICULARLY under Firefox.
Comment 13 Thomas Lübking 2011-12-10 19:21:23 UTC
Off by "Window-Not-The-Window" shadows?
Can you do me a favor and try a RECENT Bespin (style & esp. decoration)

Ratio:
It uses the new shadows for decoration shadows as well as for popups, oxygen only for the latter.
If Bespin is ok you might actually encounter a different issue with similar visual outcome. Recent versions support different shadow sizes.
If you do, please try different sizes for active windows ("ie. the larger ones") so we can ensure you don't luckily picked one with 2^n dimensions.
Comment 14 nickpantazis 2011-12-10 20:20:49 UTC
Created attachment 66603 [details]
The problem is added to window title in 4.8 beta
Comment 15 nickpantazis 2011-12-10 20:22:40 UTC
Created attachment 66604 [details]
Changes to the problem in 4.8 beta if I deselect oxygen windows shadows
Comment 16 nickpantazis 2011-12-10 20:25:35 UTC
I have added two additional attachments as the problem changed when I moved to 4.8 beta. Maybe interestingly, the problem changes if I deselect oxygen window drop-down shadow.
Comment 17 Ingo Ratsdorf 2011-12-10 20:53:19 UTC
Oxygen Desktop theme works, oxygen widget theme produces the broken shadows. QTcurve widget style works, but does not have dropdown shadows, probably hence why. All KDE 4.7.3 with NVIDIA FX GO 5300.
Comment 18 Thomas Lübking 2011-12-10 21:01:09 UTC
@Ingo:
Hmmm, but your screenshot to your original submission clearly hints an issue with the window decoration:
http://bugsfiles.kde.org/attachment.cgi?id=64228

FYI: the "desktop theme" (ie. plasma desktop) has no impact on this, it's either
kcmshell4 kwindecoration
or
kcmshell4 style

So you suggest that selecting oxygen in "kcmshell4 kwindecoration" is ok, but only in "kcmshell4 style" causes issues?

@nickpantazis:
There's no actual change (but visually) - only the offets changed and that has
another result.
Makes me wonder whether you and Ingo really encounter different issues...
Comment 19 Ingo Ratsdorf 2011-12-11 00:00:36 UTC
@Thomas: Well, it would appear so. However, in the window decoration selection dialog kcmshell4 kwindecoration, some themes are already rendered wrong, namely "Oxygen by Sean Wilson" and "Air-Oxygen by Lionel Chauvin".

So it would appear that the oxygen window decorations have somehow been fixed since 4.7.X and 4.7.3. I still use the same proprietary NVIDIA driver (again) 173, but the window decorations also now work with nouveau.
Only difference is that nouveau supports V2 shaders whereas nvidia supports only 1.3.
However, both DO NOT support NPOT.
I switched back to nvidia for performance reasons: GLXGears produces 600 frames with nouveau and 2500 with nvidia. Also Firefox transparencies (particularly facebook) are shockingly slow with nouveau but fast with nvidia.

When I started firefox running with nouveau in console, nouveau brought up some output relating to NPOT too, however I cannot recall exactly what it was.
I cannot (and don't want to :-) ) reproduce since nouveau no longer installed.
Comment 20 Thomas Lübking 2011-12-11 00:38:12 UTC
> namely "Oxygen by Sean Wilson" and "Air-Oxygen by Lionel Chauvin".

Those are Aurorae themes - to rule out the theme file (cache) or the engine internal rendering is broken, please try the one that just says "oxygen" (no "by someone") and has a config dialog with a tabbar with four tabs and a lot of options (we maybe should patent the name ;-)

> However, both DO NOT support NPOT.
No, that's a GPU limitation.
Comment 21 Ingo Ratsdorf 2011-12-11 00:52:45 UTC
I am using the "Oxygen" theme right now and all renders fine as I said before. Only the other two as per my previous post do not render fine.
Oxygen is okay with both "window glow" and "window dropdown shadow" enabled. I have by default power of two's as values, but tried 18 and 17 for size and even that renders okay.
The thing that breaks menu shadows is when selecting the oxygen widget theme. That does not work.
Thanks for the GPU limitation hint. ;-)
Comment 22 nickpantazis 2012-01-07 09:46:28 UTC
In 4.7.97 the problem shown in attachment in comment #14 (the windows title) is not present anymore. The originally reported problem remains.
Comment 23 Thomas Lübking 2012-02-07 00:57:16 UTC
anybody please look here.
https://bugs.kde.org/show_bug.cgi?id=293325#c10

whoever can try a patch please raise his hands.
Comment 24 Thomas Lübking 2012-02-09 18:06:14 UTC
Git commit 7355a9ad14e24ca1eb4088430950bc88f03fb4de by Thomas Lübking.
Committed on 08/02/2012 at 19:31.
Pushed by luebking into branch 'KDE/4.8'.

fix NPOT shadows

a) fixes the texture offset calculation
b) arranges he shadow pixmaps as border in the texture to avoid interpolation issues.
Related: bug 282882, bug 293325, bug 291161
REVIEW: 103888

M  +33   -53   kwin/scene_opengl.cpp

http://commits.kde.org/kde-workspace/7355a9ad14e24ca1eb4088430950bc88f03fb4de
Comment 25 Thomas Lübking 2012-02-09 18:07:56 UTC
Git commit 4281fd09be344bfa99b0450eae384b49b55db152 by Thomas Lübking.
Committed on 08/02/2012 at 19:31.
Pushed by luebking into branch 'master'.

fix NPOT shadows

a) fixes the texture offset calculation
b) arranges he shadow pixmaps as border in the texture to avoid interpolation issues.
Related: bug 282882, bug 293325, bug 291161
REVIEW: 103888

M  +33   -53   kwin/scene_opengl.cpp

http://commits.kde.org/kde-workspace/4281fd09be344bfa99b0450eae384b49b55db152