Composite

From ArchWiki

Jump to: navigation, search


Contents

[edit] Introduction

The Composite extension for X causes an entire sub-tree of the window hierarchy to be rendered to an off-screen buffer. Applications can then take the contents of that buffer and do whatever they like. The off-screen buffer can be automatically merged into the parent window or merged by external programs, called compositing managers.

The Composite extension can't be used simultaneously with the Xinerama. Nvidia Twinview works doh.

[edit] Configuration

[edit] NVIDIA drivers

If you have an NVIDIA, install the latest NVIDIA drivers. Their newer versions (>= 96xx) support the long awaited "GLX_Texture_From_Pixmap" extension. If you have a legacy card with older versions (< 96xx) of the driver, you need XGL.

[edit] Automatically

[edit] nvidia (current)

nvidia-xconfig --composite

[edit] nvidia-96xx

nvidia-xconfig --composite --add-argb-glx-visuals

[edit] nvidia-71xx

nvidia-xconfig isn't available.

[edit] Manually

Edit the /etc/X11/xorg.conf file:

Section "Module"
  [...]
  Load "dbe"
  Load "extmod"
  Load "type1"
  Load "freetype"
  Load "glx"
  #Load "dri"    #should be removed/commented out
  #Load  "GLcore"    #should be removed/commented out
  [...]
EndSection

[...]

Section "Screen"
  [...]
  Option "AddARGBGLXVisuals" "True"  #recommended if using nvidia-71xx or nvidia-96xx, enabled by default with newer drivers
  Option "RenderAccel" "True"    #recommended if using the nvidia-71xx driver, enabled by default with newer drivers
  Option "AllowGLXWithComposite" "True"    #only if using the nvidia-71xx driver
  [...]
EndSection

[...]

Section "Extensions"
  Option "Composite" "Enable"
EndSection

[edit] AMD ATI drivers

[edit] Open-source driver + AIGLX

TODO: these parameters should be verified.

AIGLX currently works with the open source Intel and Radeon drivers, and maybe others. Add the following to your /etc/X11/xorg.conf file to enable AIGLX:

Section "Module"
  [...]
  Load "glx"
  Load "dri"
  Load "dbe"
EndSection

[...]

Section "Screen"
  [...]
  DefaultDepth  24
EndSection

[...]

Section "Device"
  [...]
  Option "XAANoOffscreenPixmaps" "true"
  Option "DRI" "true"
EndSection

[...]

Section "ServerLayout"
  Option "AIGLX" "true"
EndSection

[...]

Section "Extensions"
  Option "Composite" "Enable"
EndSection

[...]

Section "DRI"
  Group 0
  Mode 0666
EndSection

If your xorg driver doesn't support AIGLX, then the effects won't work.

[edit] Using Compiz

On my system (Video card ATI Technologies Inc Radeon RV250 [Mobility FireGL 9000] (rev 02)), I needed to use 16bpp (otherwise my screen was only usable to 2/3 of the size, the right 1/3 of the screen was broken after enabling Compiz), so change xorg.conf to

Section "Screen"
  [...]
  DefaultDepth  16
EndSection

But then see next section...

[edit] Problems with video playback / Using xvideo

If you see blue screens instead of the actual video, a lot of people on the net suggest using X11 instead of Xvideo as the video module (or they suggest using 24bpp). But this gives you poor video quality and/or bad performance. I found another tip that enabled Xvideo with composite, just add to your xorg.conf:

Section "Device"
  [...]
  Option "VideoKey" "0x01"
EndSection

[edit] fglrx/Catalyst driver

ATI's proprietary fglrx driver enables compositing by default. If for some reason you would like to manually disable compositing, you can do so by adding this to /etc/X11/xorg.conf:

Section "Extensions"
  Option "Composite" "Disable"
EndSection

[edit] Intel drivers

The new Intel driver, xf86-video-intel, comes with compositing enabled by default. It's configured to use the newer EXA acceleration method, but the default build options can result in very slugish performance. In these cases, adding these options to the "Device" section of your /etc/X11/xorg.conf can improve the situation dramatically:

Option "AccelMethod" "exa"
Option "MigrationHeuristic" "greedy"
Option "ExaNoComposite" "false"

Another thing to try and do is set INTEL_BATCH="1" in /etc/environment.

[edit] Other drivers + Xgl

Users of other video drivers will need to use Xgl in order to enable compositing. Refer to the Xgl wiki for detailed instructions.

[edit] Additional Resources

  • AIGLX
  • Xgl
  • Composite -- A Xorg extension required by composite managers
  • Compiz Fusion -- A composite and window manager offering a rich 3D accelerated desktop environment
  • Compiz -- The original composite/window manager from Novell
  • Xcompmgr -- A simple composite manager capable of drop shadows and primitive transparency
  • Beryl -- A composite/window manager forked from Compiz (since merged to become Compiz Fusion)
  • Wikipedia: Compositing Window Managers
Personal tools