Bug 198410 - Some large windows appear entirely black
Summary: Some large windows appear entirely black
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 195524 196028 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-30 14:43 UTC by Marcus Harrison
Modified: 2009-12-20 21:11 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Output of kwin --replace --sync (4.70 KB, text/plain)
2009-08-27 16:00 UTC, Marcus Harrison
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Harrison 2009-06-30 14:43:33 UTC
Version:           unknown (using 4.2.4 (KDE 4.2.4), Gentoo)
Compiler:          i686-pc-linux-gnu-gcc
OS:                Linux (i686) release 2.6.30-gentoo-r1

I'm going to attach a video showing the effects of this bug.

This only happens when compositing is switched on.

I'm using the latest version of qt (4.5.2) on KDE 4.2.4. Sorry for the scarce information, but I can't seem to pinpoint the problem down to any one thing. I'll update if I find something.
Comment 1 Martin Flöser 2009-06-30 14:50:26 UTC
What's your graphics card and driver? Black windows used to be a common problem for NVIDIA cards some time ago...
Comment 2 Marcus Harrison 2009-06-30 15:35:27 UTC
Ah. I'm using nVidia GO 6200TE 64mb with nVidia drivers version 180.60
Comment 3 Marcus Harrison 2009-07-12 14:16:22 UTC
Can someone suggest a driver version that doesn't behave this way, please?
Comment 4 Martin Flöser 2009-07-12 15:12:27 UTC
I really thought nvidia had fixed that issue :-(
Comment 5 Martin Flöser 2009-07-12 15:31:57 UTC
*** Bug 195524 has been marked as a duplicate of this bug. ***
Comment 6 Martin Flöser 2009-07-12 15:32:50 UTC
*** Bug 196028 has been marked as a duplicate of this bug. ***
Comment 7 g111 2009-07-14 08:56:31 UTC
Hello,

what does "resolved upstream" mean in this case? Is the problem already fixed in an maybe external component (nvidia driver, xorg, kernel, etc.)? Or is it fixed somewhere in KDE? Or has it to be fixed in an external component and you cannot do anything about it in KDE?

Thanks,
Gert
Comment 8 Martin Flöser 2009-07-14 09:12:44 UTC
(In reply to comment #7)
> Or has it to be fixed in an external component and you
> cannot do anything about it in KDE?
That's it - unfortunately. Resolved upstreams means that KDE cannot do anything about it.
Comment 9 Yuri 2009-07-14 10:05:45 UTC
I've let NVidia know of this problem: http://forums.nvidia.com/index.php?showtopic=98755.

But unfortunately no response so far.
Comment 10 Marcus Harrison 2009-07-16 15:07:57 UTC
Strangely, I only get this problem when using Gentoo - on Ubuntu, with nVidia driver version 180.44 installed, I don't get the problem. Looks like it could be a regression...
Comment 11 Marcus Harrison 2009-08-22 01:38:12 UTC
Actually, I've managed to narrow it down to the kernel: this looks like a gentoo kernel version 2.6.30 problem. It doesn't happen with earlier versions. I'm going to try the vanilla kernel to see if it is a Linux problem.
Comment 12 Marcus Harrison 2009-08-22 13:32:25 UTC
(In reply to comment #11)
> Actually, I've managed to narrow it down to the kernel: this looks like a
> gentoo kernel version 2.6.30 problem. It doesn't happen with earlier versions.
> I'm going to try the vanilla kernel to see if it is a Linux problem.

This affects the vanilla 2.6.30.5 Linux kernel as well. It seems to be a regression from the 2.6.29 kernel. Has this bug been pointed out on the Linux bugtracker (http://bugzilla.kernel.org/)? Should I try posting the bug there?
Comment 13 Thomas Lübking 2009-08-22 17:23:25 UTC
have you tried updating the driver?
nvidia is at 185.18.xx or 190.18 (beta) meanwhile.

personally, i would rather not post a bug any way related to the nvidia kernel module to bugzilla.kernel.org but file it at nvidia first...
Comment 14 Marcus Harrison 2009-08-22 18:39:52 UTC
I have: X hangs completely on start when I try using the latest nVidia drivers.
Comment 15 Yuri 2009-08-22 19:05:39 UTC
No, this isn't just a Linux kernel problem because I see this problem on FreeBSD-72.
Comment 16 Yuri 2009-08-22 19:08:09 UTC
SuSE claims that they have a fix here: http://en.opensuse.org/Nvidia_Black_Window_Bug_Fix
Comment 17 Martin Flöser 2009-08-22 19:26:01 UTC
(In reply to comment #16)
> SuSE claims that they have a fix here:
> http://en.opensuse.org/Nvidia_Black_Window_Bug_Fix
erm that page mentions Beryl. That does not sound like it's up to date. As I mentioned in comment #1, black windows used to be a problem some time ago.
Comment 18 Thomas Lübking 2009-08-22 20:48:32 UTC
Just noticed that nobody asked so far - what FX have you toggled on?

though this isn't a fix, you can perhaps lower your problem by switching off some memory eaters.
Comment 19 g111 2009-08-22 23:19:31 UTC
I am coming from bug 196028 to this one here. I wrote there that on one PC I never had such problems. This is no longer true:

I have 3x2 desktops and the following windows open:
desktop1: 1x icedove, 2x konqueror
desktop2: 20x konsole
Then on desktop5 I opened 20 kwrite windows. The first windows did show up fine, but the last of them only showed up as black windows.

$ infobash -v3
Host/Kernel/OS  "oink" running Linux 2.6.30-4.slh.4-sidux-686 i686 [ sidux 2007-04 - Έρως - kde-lite - (200711210221) ]
CPU Info        AMD Athlon XP 2200+ 256 KB cache flags( sse ) clocked at [ 1799.970 MHz ]
Videocard       nVidia NV44A [GeForce 6200]  X.Org 1.6.3  [ 1280x1024@50.0hz ]
Network cards   Realtek RTL-8029(AS), at port: d000
                Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet, at port: dc00
Processes 178 | Uptime 41min | Memory 483.4/756.6MB | HDD ST3250620A Size 250GB (43%used) | GLX Renderer GeForce 6200/AGP/SSE/3DNOW! | GLX Version 2.1.2 NVIDIA 185.18.31 | Client Shell | Infobash v3.25

(certainly with composite turned on. I just learned about konsole argb windows. Can this be a problem here?)
Comment 20 simon.kinsella 2009-08-23 02:19:27 UTC
I can confirm that this is not a Linux kernel issue. I am experiencing the same problem on FreeBSD 7.2-STABLE / KDE4.3.0 (OpenGL compositing on) / NVIDIA GF6800GS, 256MB.

Driver is official NVIDIA release for FreeBSD x86, v 185.18.[29|36]. 

Other info... From dmesg:

...
FreeBSD 7.2-STABLE #0: Sat Aug 15 12:01:20 BST 2009
CPU: AMD Phenom(tm) II X4 945 Processor (3082.04-MHz 686-class CPU)
...
real memory  = 2146304000 (2046MB)
avail memory = 2082242560 (1985MB)
ACPI APIC Table: <GBT GBTUACPI>
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs 
...
vgapci0: <VGA-compatible display> mem 0xfa000000-0xfaffffff,0xd0000000-0xdfffffff,0xfb000000-0xfbffffff irq 18 at device 0.0 on pci1
nvidia0: <GeForce 6800 GS> on vgapci0
vgapci0: child nvidia0 requested pci_enable_busmaster
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
nvidia0: [GIANT-LOCKED]
nvidia0: [ITHREAD]
...

$top
last pid:  1471;  load averages:  0.00,  0.07,  0.10         up 0+00:22:03  00:10:21
125 processes: 1 running, 124 sleeping
CPU:  1.5% user,  0.0% nice,  1.7% system,  0.2% interrupt, 96.5% idle
Mem: 503M Active, 256M Inact, 161M Wired, 3244K Cache, 112M Buf, 1067M Free
Swap: 8192M Total, 8192M Free

Not sure what else I can say but ask me for more info if needed.
Comment 21 lucas 2009-08-23 05:14:01 UTC
How much video memory do you guys have? One 1024x768 window uses something like 1024*768*4*2=6.3MB (Does not include allocation algorithms that may waste space to gain speed) so if you open lots of windows older, cheaper cards with limited memory such as the GeForce 6200 it will run out of available space very quickly.

Can anyone that experiences the problem please display KWin's terminal output when the problem occurs. KWin may be spitting out GL_OUT_OF_MEMORY errors assuming the driver has implemented it for GLX calls.
Comment 22 g111 2009-08-24 10:00:46 UTC
In my case the GFX-memory is 128MB:

(II) NVIDIA(0): NVIDIA GPU GeForce 6200 (NV44) at PCI:1:0:0 (GPU-0)
(--) NVIDIA(0): Memory: 131072 kBytes

I will check the kwin output the next time. (Where can I find it? Is it put into ~/.xsession-errors ?)
Comment 23 Marcus Harrison 2009-08-26 01:26:41 UTC
So something I don't understand: this problem didn't occur at all, ever, with the Linux kernel version 2.6.29, so why has video memory shortage suddenly become a problem in 2.6.30? What's changed to cause this problem?
Comment 24 Yuri 2009-08-26 02:34:43 UTC
You can direct your questions directly to NVidia: https://surveys.nvidia.com/index.jsp?pi=7498eac864dc1950c8f09e040b4a437a They have no Bugzilla-like bug site though.

I reported this bug to them long time ago: http://forums.nvidia.com/index.php?showtopic=98755

But got no response.

Maybe if more people keep asking them they will begin to think that this problem is of some importance.
Comment 25 g111 2009-08-26 09:00:07 UTC
As I have learned in bug 204699 it might be a good idea to start konsole with the parameter --notransparency to save important video memory when using composite (Without composite konsole does not start in transparency/ARGB mode anyway). So if you (like me) are using many konsole windows, this might defer the problem.
Comment 26 Thomas Lübking 2009-08-26 11:44:02 UTC
If you've an AGP board, you can try to set another agp mode.
in xorg.conf, device section:
    Option "NvAGP" "0"  #... disables AGP support
    Option "NvAGP" "1"  #... use NvAGP, if possible
    Option "NvAGP" "2"  #... use AGPGART, if possible
    Option "NvAGP" "3"  #... try AGPGART; if that fails, try NvAGP

"3" is default, to use NvAGP you likely need to pass "agp=off" to the kernel boot parameter.
The amount of memory reserved for AGB is usually also restricted by the BIOS.
Some chipsets had issues with the full AGP speed (check nvidias readme)
Comment 27 Marcus Harrison 2009-08-27 15:17:59 UTC
(In reply to comment #21)
> How much video memory do you guys have? One 1024x768 window uses something like
> 1024*768*4*2=6.3MB (Does not include allocation algorithms that may waste space
> to gain speed) so if you open lots of windows older, cheaper cards with limited
> memory such as the GeForce 6200 it will run out of available space very
> quickly.

What I don't understand is, why has this *suddenly* become a problem in the latest kernel when it wasn't one before?
Comment 28 lucas 2009-08-27 15:35:16 UTC
(In reply to comment #27)
> What I don't understand is, why has this *suddenly* become a problem in the
> latest kernel when it wasn't one before?

I was just curious that's all. I'm not saying it's memory related (And I honestly didn't even see that it was working before) but the more information we have the better we can pinpoint the cause. Still looks like it's a driver-related bug though.
Comment 29 Marcus Harrison 2009-08-27 16:00:02 UTC
Created attachment 36495 [details]
Output of kwin --replace --sync

Sorry it took me so long to get this, I was trying to figure out how.
Comment 30 Marcus Harrison 2009-08-30 01:50:21 UTC
Would it help if I provided my 2.6.29 and 2.6.30 .config files? Maybe a difference in the configuration is causing this for me...
Comment 31 g111 2009-12-20 14:24:50 UTC
This issue is still a problem with:
* KDE 4.3.85 (KDE 4.4 Beta2)
* 2.6.32-1.slh.4-sidux-686
* NVIDIA-Linux-x86-190.53-pkg0.run
* NV44A [GeForce 6200]

But it seems not to happen when using xrender instead of opengl for effects. So this might be a workaround for people who have this problem. I will try the different agp-Modes next.
Comment 32 Thomas Lübking 2009-12-20 17:03:18 UTC
a) please define "large"
b) check "glxinfo -l | grep -i GL_MAX_TEXTURE_SIZE"
c) compare that value to the diemsions of "large"
Comment 33 g111 2009-12-20 21:03:35 UTC
b) glxinfo -l | grep -i GL_MAX_TEXTURE_SIZE
    GL_MAX_TEXTURE_SIZE = 4096
Is this value in KByte? Is it possible to define this value bigger? Can main memory used for this or has it to be video ram?

a) The problem are not large windows, but many windows in my case. What is "many"? Well, perhaps 40 normal sized xterm windows.
Comment 34 Martin Flöser 2009-12-20 21:11:06 UTC
(In reply to comment #33)
> a) The problem are not large windows, but many windows in my case. What is
> "many"? Well, perhaps 40 normal sized xterm windows.
a really old NVIDIA bug - just google for black window and Compiz ;-)