Composite
From ArchWiki
Contents |
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 Xinerama. However, it can be used simulatneously with Nvidia Twinview.
Configuration
NVIDIA drivers (proprietary)
If you have an NVIDIA, install the latest NVIDIA drivers. Their newer versions (>= 96xx) support the long awaited "GLX_Texture_From_Pixmap" extension.
Automatically
nvidia-173xx, nvidia (current)
nvidia-xconfig --composite
nvidia-96xx
nvidia-xconfig --composite --add-argb-glx-visuals
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 for nvidia-96xx, enabled by default with newer drivers [...] EndSection [...] Section "Extensions" Option "Composite" "Enable" EndSection
AMD ATI drivers
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.
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...
Problems with video playback / Using xvideo
If you see blue screens instead of the actual video and use mplayer, you have to activate textured video. For other video players see their manual how to switch.
If it does not work you can use X11 instead of Xvideo as the video module. It yields poor performance but should work reliable.
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
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"
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.
Troubleshooting
Sometimes (seen here for nvidia proprietary drivers) the composite effects only seem to work with a color depth of 24 bit. If you find that in your xorg.conf, section "Screen", the values for "DefaultDepth" or "Depth" (subsection "Display") are lower than that, try setting all of them to "24".
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