nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   HOWTO: Compiz with NVIDIA Graphics Drivers (updated 9/23/2006) (http://www.nvnews.net/vbulletin/showthread.php?t=77030)

jamesjones 09-22-06 03:32 PM

HOWTO: Compiz with NVIDIA Graphics Drivers (updated 9/23/2006)
As of the 1.0-9625 BETA release, the NVIDIA UNIX graphics drivers support the GLX_EXT_texture_from_pixmap extension required by the compiz OpenGL-based window/composite manager. I will provide some tips on getting it running with the NVIDIA drivers here.

  • XOrg 7.1 or later
  • NVIDIA graphics drivers >= 1.0-9625
  • Any NVIDIA GPU supported by these drivers

You will also need a recent version of compiz. We have done most of our internal testing with bleeding-edge freedesktop.org versions of compiz. It is recommended you use a version from the git repository after 9/20/2006, or version 0.2 (once it is released) or newer.

Very recent builds of the compiz.net version should work as well, but have received less testing and have been found to be less reliable in general.

There are several tutorials and HOWTOs available on the web that cover building and installing compiz, so I will not cover that here. Please note however, that when following these guides, any steps regarding the installation of Mesa OpenGL libraries, the DRI, or Xgl should be skipped. The NVIDIA driver contains built-in support for GLX_EXT_texture_from_pixmap, so these extra layers are not necessary, and may in fact cause problems (see below).

You will need to ensure X is properly configured. The following bits should be in your X configuration file:


# Enable the composite extension

Section "Extensions"
    Option "Composite" "Enable"

Section "Screen"
# Enable 32-bit ARGB GLX Visuals
    Option "AddARGBGLXVisuals" "True"

# If you are using an older version of compiz that
# does not support rendering into the Composite
# Overlay Window, you will need to disable clipping
# of GLX rendering to the X Root window with this
# option, or you will get a blank screen after
# starting compiz:
    Option "DisableGLXRootClipping" "True"


Be sure to restart your X server so these settings will take effect.

Before running compiz for the first time, you should configure it to your tastes. Again, there are several sites that cover configuring compiz and its various plugins, so I will not cover that here. Note: an exception is direct vs. indirect rendering: when using the NVIDIA graphics driver, you do not need to use the --indirect-rendering option; it limits the number of extensions exposed by the driver, disabling some plugins (e.g. water).

Now it's time to test compiz. If possible, you should initially start compiz from another machine so you can see any error messages it might print out. In this case, be sure to set your DISPLAY environment variable properly after logging in:

$ export DISPLAY=:0
for example. However, if everything goes well, it should be fine to start it from a terminal window.

If you are using a version of compiz that supports the Composite Overlay Window:

$ gnome-window-decorator &
$ compiz --replace --use-cow gconf

$ gnome-window-decorator &
$ compiz --replace gconf
At this point, the screen may flicker a bit, then all your windows should reappear. If everything looks good, you can set up compiz to start at X start time via your favorite method.

Common problems:
  • If you get a black screen, be sure you are either using --use-cow option, or set the DisableGLXRootClipping NVIDIA X driver option in your X configuration file.

  • If you are using an old version of compiz and it prints out a message about not being able to bind a pixmap to a texture (or, if you are running it from an X terminal and you just see a blank screen), compiz is most likely incorrectly linked against a Mesa implementation of OpenGL. You should verify compiz is linked against the NVIDIA OpenGL libraries. This can be done by running...

    $ ldd `which compiz`
    ...and ensuring the output contains the library libnvidia-tls.so.1. Only the NVIDIA OpenGL drivers should link in this library, so if you see it, your linking is correct. If not, you will need to rebuild compiz, ensuring it links against the NVIDIA version of libGL.so.

  • If you are using compiz-quinnstorm or a version of compiz from compiz.net and compiz crashes with a segmentation fault on startup, the most likely reason for this also is that it was linked against a Mesa version of libGL.so. Please see the last bullet item for details.

  • If you are not using the Composite Overlay Window, you may get bits of black corruption when moving windows around. This is a known bug we have not yet resolved, but it can be worked around be either upgrading to a version of compiz that supports the Composite Overlay Window, or disabling the sync_to_vblank compiz option.

  • If you are seeing intermittent performance problems such as hickups, setting the __GL_YIELD environment variable to "NOTHING" in compiz's environment may help, e.b. by running...

    $ gnome-window-decorator &
    $ export __GL_YIELD="NOTHING"; compiz --replace --use-cow gconf
    Please be sure that you are not using compiz 's --indirect-rendering option in this case.

All times are GMT -5. The time now is 03:51 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.