Compiz-fusion shadow bug

I have this really strange problem with Compiz-Fusion on my OpenSUSE 10.3 system oprating on a relativly new system with a NVidia Geforce 8800 GTS graphics card. I have followed the guide available on this website to the letter but to no avail, I’m running into what seems to be a bug (probably related to the NVidia drivers). I could try to describe it as a problem where my windows appear only in the form of the shadows they would cast if they would be rendered correctly, but I guess I’ll just show the pictures.

Main screen:
http://img519.imageshack.us/img519/4392/shadowbug1lc9.jpg
Sometimes the main screen is completely black, rather than showing shadows.

Main screen + part of secondary screen:
http://img519.imageshack.us/img519/2366/shadowbug2he0.jpg

Close up of shadow bug / traces / borderlines:
http://img519.imageshack.us/img519/6982/shadowbug3lka0.jpg

Before I file a bug report or something, has someone seen this problem before?

I will post my xorg.conf file shortly …

Here is my xorg.conf file. In Bold are changes I made to make this post not so long, I considered these part irrelevant for this problem. In Italic (2 lines at the bottom) are lines I added manually (so far) to try and fix the problem.

nvidia-xconfig: X configuration file generated by nvidia-xconfig

nvidia-xconfig: version 1.0 (buildmeister@builder26) Thu Feb 14 18:13:41 PST 2008

nvidia-settings: X configuration file generated by nvidia-settings

nvidia-settings: version 1.0 (buildmeister@builder26) Thu Feb 14 18:14:18 PST 2008

/…/

SaX generated X11 config file

Created on: 2008-06-08T04:16:01+0200.

Version: 8.1

Contact: Marcus Schaefer <sax@suse.de>, 2005

Contact: SaX-User list <https://lists.berlios.de/mailman/listinfo/sax-users&gt;

Automatically generated by [ISaX] (8.1)

PLEASE DO NOT EDIT THIS FILE!

Section “ServerLayout”
Identifier “Layout[all]”
Screen 0 “Screen0” 0 0
Screen 1 “Screen1” RightOf “Screen0”
InputDevice “Keyboard[0]” “CoreKeyboard”
InputDevice “Mouse[1]” “CorePointer”
Option “Clone” “off”
Option “Xinerama” “on”
EndSection

Section “Files”
InputDevices “/dev/gpmdata”
InputDevices “/dev/input/mice”
FontPath “/usr/share/fonts/misc:unscaled”
# <removed the rest of FontPaths>
EndSection

Section “Module”
Load “dbe”
Load “type1”
Load “freetype”
Load “extmod”
Load “glx”
EndSection

Section “ServerFlags”
Option “AllowMouseOpenFail” “on”
Option “Xinerama” “1”
EndSection

Section “InputDevice”
Identifier “Keyboard[0]”
Driver “kbd”
Option “Protocol” “Standard”
Option “XkbLayout” “us”
Option “XkbModel” “microsoftpro”
Option “XkbRules” “xfree86”
EndSection

Section “InputDevice”
Identifier “Mouse[1]”
Driver “mouse”
Option “Buttons” “12”
Option “Device” “/dev/input/mice”
Option “Name” “Logitech USB Receiver”
Option “Protocol” “explorerps/2”
Option “Vendor” “Sysp”
Option “ZAxisMapping” “4 5”
EndSection

Section “Modes”
Identifier “Modes[0]”
ModeLine “1680x1050” 147.1 1680 1784 1968 2256 1050 1051 1054 1087
EndSection

Section “Monitor”
Identifier “Monitor[0]”
VendorName “–> LCD”
ModelName “1680X1050@60HZ”
UseModes “Modes[0]”
DisplaySize 337 270
HorizSync 30.0 - 66.0
VertRefresh 30.0 - 61.0
Option “CalcAlgorithm” “XServerPool”
Option “DPMS”
EndSection

Section “Monitor”
Identifier “Monitor0”
VendorName “Unknown”
ModelName “Samsung SyncMaster”
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
EndSection

Section “Monitor”
Identifier “Monitor1”
VendorName “Unknown”
ModelName “Samsung SyncMaster”
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
EndSection

Section “Device”
Identifier “Device[0]”
Driver “nvidia”
VendorName “NVidia”
BoardName “GeForce 8800 GTS”
BusID “1:0:0”
EndSection

Section “Device”
Identifier “Videocard0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “GeForce 8800 GTS”
BusID “PCI:1:0:0”
Screen 0
EndSection

Section “Device”
Identifier “Videocard1”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “GeForce 8800 GTS”
BusID “PCI:1:0:0”
Screen 1
EndSection

Section “Screen”
Identifier “Screen[0]”
Device “Device[0]”
Monitor “Monitor[0]”
DefaultDepth 16
SubSection “Display”
Depth 15
Modes “1680x1050” “1600x1024” “1600x1000” “1400x1050” “1280x1024” “1440x900” “1280x960” “1366x768” “1280x800” “1152x864” “1280x768” “1024x768” “1280x600” “1024x600” “800x600” “768x576” “640x480”
EndSubSection
# <removed other Display subsections here>
EndSection

Section “Screen”
Identifier “Screen0”
Device “Videocard0”
Monitor “Monitor0”
DefaultDepth 24
Option “TwinView” “0”
Option “metamodes” “DFP-1: 1680x1050 +0+0; DFP-1: 1600x1024 +0+0; DFP-1: 1400x1050 +0+0; DFP-1: 1280x1024 +0+0; DFP-1: 1280x960 +0+0; DFP-1: 1152x864 +0+0; DFP-1: 1024x768 +0+0; DFP-1: 800x600 +0+0; DFP-1: 640x480 +0+0”
Option “RenderAccel” “True”
Option “AddARGBGLXVisuals” “True”
SubSection “Display”
Depth 24
Modes “nvidia-auto-select”
EndSubSection
EndSection

Section “Screen”
Identifier “Screen1”
Device “Videocard1”
Monitor “Monitor1”
DefaultDepth 24
Option “TwinView” “0”
Option “metamodes” “DFP-0: nvidia-auto-select +0+0”
Option “RenderAccel” “True”
Option “AddARGBGLXVisuals” “True”
SubSection “Display”
Depth 24
Modes “nvidia-auto-select”
EndSubSection
EndSection

Section “Extensions”
Option “DAMAGE” “Enable”
Option “Composite” “Enable”
Option “RENDER” “Enable”
EndSection

what that mean?
Option “Xinerama” “1”
i have on dual monitor Option “Xinerama” “0”

Xinerama is simply a feature that allows you to use your dual screen setup more efficiently, i.e. it allows you to extend your desktop to a second screen rather than stretching it over 2 screen or have to seperate X servers running on either screen. You can read more about it in this HOWTO I posted yesterday.

Normally the black window issue would be due to running out of texture memory but this doesn’t look to be the case - however have you tried different rendering options in the Compiz Fusion control center (or fusion-icon)?

With 640MB I’d find it amazing if it ever ran out of memory :).

however have you tried different rendering options in the Compiz Fusion control center (or fusion-icon)?

No I have not yet tried that yet, I will do so when I get home, thanks for the suggestion. I reckon I will have to boot into a different window environment and disable compiz-fusion from starting there. Or since apart from the rendering everything seems to be wondering, perhaps I can simply ALT+F2 and enter the command:

xgl-switch --disable-xgl

(to disable Xgl and deactivate Compiz)

Wait wait - you’re using XGL?

That’s a big no-no on nVidia cards, have a looksee here:
AIGLX - openSUSE

Wait wait - you’re using XGL?

Actually, I don’t think so (but I can’t check at the moment, my system is located at home), I simply quoted a section from Enable/Disable Compiz, come to think of it I don’t think I enabled XGL, but it’s a good point to double check.

I really wasn’t using XGL or anything, however I was not able to resolve the bug, after a bit more googling I found a solution that seemed to work, at least in my case - and one these forums even!

Here’s the permalink to the solution (thanks Nickel) which I found in this thread: 10.3, Nvidia, Xinerama - Xgl / Compiz: Confusion, Frustration !
(which really contains a wealth of information.

Now it works! Proof:

http://img114.imageshack.us/img114/9279/compizworksnb8.png

Interestingly, you had all those parameters set in original xorg.conf (some more than once ;)). It must have been a matter of placement or order. Maybe you could post the new xorg.conf file, just for completeness?

Actually I was wrong in my previous assumption it was working already. Yes, my dual screen was working, yes I had compiz running, yes Xinerama was working at some point … but never all at the same time. Whenever I enabled Xinerama using nvidia-settings it stopped working. The final solution proved to be utterly simple though.

Warning, the following steps may mess up your /etc/X11/xorg.conf file so be sure to make a backup.

First, make sure you have the latest NVidia drivers installed.

Optionally you can already install Compiz-Fusion, but you can also do that after the following steps.

Open a terminal. Run the following command as root (su first line) which will reconfigure your xorg.conf file (made a backup?):


su -
sax2 -r -m 0=nvidia

Set everything up best you can (your graphics card should be recognized, but if your monitor isn’t pick whatever is closest). Also enable dual-head - I picked a 1-2 setup and enabled Xinerama. Test it and if it work, save it.

Next run the following commands (still) as root:

nvidia-xconfig --composite
nvidia-xconfig --render-accel
nvidia-xconfig --add-argb-glx-visuals -d 24

Now restart your X-server and relogin:

CTRL+ALT+BACKSPACE

You should now have 2 fully functional desktops with 1 taskbar (since you enabled Xinerama).

Now finally install Compiz-Fusion(instructions)](http://en.opensuse.org/Compiz_Fusion). I also installed the Compiz-Fusion icon (package: compiz-manager). After you have done that, run compiz-manager and set Compiz as your Window Manager using the Compiz-Fusion icon.

Everything now works for me:

](http://imageshack.us)

xorg.conf file will follow shortly …http://img211.imageshack.us/img211/5404/compizxineramaij1.png

Ok, I have here 3 xorg.conf file, in various stages of my debugging process: xorg.conf.1, xorg.conf.2, xorg.conf.final. Hopefully this will be useful for people with the same setup as me (i.e. a NVidia Geforce 8800 GTS, with single or dual monitor setup) and will it help to solve this NVidia shadow window bug perhaps also know as the “NVidia Black Window Bug”.

The xorg.conf files

xorg.conf.1
Single monitor setup for which Compiz-Fusion (once activated) works.

xorg.conf.2
Dual monitor Xinerama setup which (when run under KDE) displays the weird shadow window bug (even though I haven’t started compiz-manager yet but there might be some residual autostart script (that I didn’t make)), logging in under gnome and the problem isn’t there so I assume it’s a: NVidia (+ Composite) + Xinerma + Compiz-Fusion (KDE) problem.

xorg.conf.final
This works! And has been created via the process above (in just 2 minutes). This enables:
Dual Head - Xinerama - Compiz-Fusion (when started)

Just for reference, the output for compiz-manager, for some reason it only works the second time (or if I click the tray icon and reload the window manager).