Compiz-Fusion
From Gentoo Linux Wiki
Compiz-Fusion, the reunification of Compiz and the Beryl fork, is a set of plugins and add-ons for Compiz, an OpenGL window and compositing manager. It has reached its first stable version: 0.6.0. Version 0.7.8 can be found in the main tree. Live ebuilds can be found in desktop-effects and are numbered 9999. See the layman article for instructions on adding the desktop-effects overlay.
Contents |
[edit] Prerequisites
Compiz-Fusion requires a driver supporting 3D acceleration and AIGLX. Please refer to the graphics drivers article for more information.
[edit] Installation
[edit] USE Flags
For installation the following packages need to be emerged with the USE flags that are specified.
- x11-libs/libX11 and media-libs/mesa with xcb enabled.
- x11-libs/cairo with xcb and svg enabled.
- x11-wm/compiz-fusion with emerald enabled.
As reported in bug #272968, the glitz useflag has been deprecated so it is not necessary anymore in order to have a working compiz. Furthermore, that useflag will cause your GTK+ applications to introduce RAM overhead that's completely pointless and unnecessary.
See the offical Gentoo documentation on USE flags handling if help is required.
[edit] Keywords
Add the following lines to /etc/portage/package.keywords,
... dev-libs/protobuf dev-util/intltool dev-python/compizconfig-python x11-apps/ccsm x11-libs/libcompizconfig x11-libs/compizconfig-backend-gconf x11-libs/compizconfig-backend-kconfig x11-libs/compizconfig-backend-kconfig4 x11-libs/compiz-bcop x11-plugins/compiz-plugins-main x11-plugins/compiz-plugins-extra x11-plugins/compiz-plugins-unsupported x11-themes/emerald-themes x11-wm/compiz x11-wm/compiz-fusion x11-wm/emerald
However, x11-libs/compizconfig-backend-gconf and x11-libs/compizconfig-backend-kconfig are only required if one wishes to use Compiz-Fusion with GNOME or KDE. If you use Xfce or otherwise, you can add the -gnome, -kde and -kde4 USE flags to:
[edit] Emerge
Compiz-Fusion can now be emerged with the following command:
[edit] Usage
To start Compiz-Fusion manually, run compiz-manager in a terminal,
Compiz-Fusion versions earlier than 0.7.8 are manually started with compiz-start,
[edit] Intel GMA
Intel GMA PC owners should start compiz with some more parameters (INTEL_BATCH & LIBGL_ALWAYS_INDIRECT & --indirect-rendering) set before starting compiz:
[edit] Radeon r600/r700
Compiz must be started with indirect rendering:
[edit] Autostart
[edit] KDE3
To make a KDE3 session autostart Compiz-Fusion create a symlink from KDE3's Autostart directory to /usr/bin/compiz-manager compiz-manager as shown below:
[edit] KDE4
In KDE-4.2+ the easiest way to autostart Compiz-Fusion is to create a compiz-kde-launcher somewhere in the $PATH of the user which wishes to use it, like so:
or you could just create a symlink from your compiz startup file to it.
Then simply select it from System Settings/Default Applications/Window Manager. Select the Compiz custom option.
[edit] Gnome
To change the default window manager in gnome run gconf-editor, and set /desktop/gnome/session/required_components/windowmanager to "compiz"
Alternatively compiz can be added to the list of applications which will start at login (Note, that this will start metacity first and then replace with Compiz.)
Navigate to System > Preferences > Startup Applications
Add a new Program to the session list named Compiz-Fusion and path /usr/bin/compiz-manager
Add a new Program to the session list named Emerald and in command "emerald --replace"
Save the settings and relog to test.
[edit] Xfce4
Create the following script in your home directory.
#!/bin/bash compiz --replace --sm-disable ccp& emerald --replace
Don't forget to set permissions :
Then, add it to be autostarted via Settings->Session and Startup->Application Autostart.
How to create a bash file [1].
[edit] Troubleshooting
[edit] Redrawing Issues
If windows fail to redraw unless certain actions are taken (these seem to include: moving the window, scrolling the window, clicking the title bar, and changing the transparency, among other things), and you are using the proprietary nvidia driver, try the following: Get the source for compiz-plugins-main from http://releases.compiz.org/0.8.2/compiz-plugins-main-0.8.2.tar.bz2 and extract it to a new directory. Edit src/workarounds.c to look like the following near line 191:
Note: As of compiz-plugins-main-0.8.4, this is alteration is already in place.
| Code: |
static void
workaroundsPaintScreen (CompScreen *s,
CompOutput *outputs,
int numOutputs,
unsigned int mask)
{
WORKAROUNDS_SCREEN (s);
currentScreen = s;
if (workaroundsGetForceGlxSync (s->display))
glXWaitX ();
UNWRAP (ws, s, paintScreen);
(*s->paintScreen) (s, outputs, numOutputs, mask);
WRAP (ws, s, paintScreen, workaroundsPaintScreen);
}
|
Compile and install:
| Code: |
./configure --prefix=/usr; make; sudo make install |
Then restart Compiz. Enable the Workarounds plugin in ccsm, and check the box for Force synchronization between X and GLX, and hope everything works. Test whether you are still experiencing the redraw issue by going to the General page in ccsm and flipping back and forth between the Key Bindings tab and any other tab, as this seems to provoke the issue if it is present. This patch was created by user Maniac103 of nvnews.net forums.
Note that for Intel GMA users, this workaround may cause the exact issue it prevents for nVidia users. Non-nVidia users should leave this workaround unchecked, and verify that it is unchecked if this problem presents itself.
[edit] Wrong ABI Version
You may run into the following:
| Code: |
user@user ~ $ compiz-manager /usr/local/bin/compiz-manager: line 131: xvinfo: command not found Writing configuration to: /home/user/.config/compiz-managerrc compiz (core) - Error: Can't load plugin 'ccp' because it is built for ABI version 20070425 and actual version is 20070706 compiz (core) - Error: Couldn't activate plugin 'ccp' |
You will need to unemerge and re-emerge all the packages mentioned in the guide. The key package that needs to be updated may just be x11-apps/libcompizconfig.
[edit] Refresh Problem for Nvidia Users
Some users found there are screen refresh problem by default setting. Here is a trick if you would like to run compiz-manager. Edit the file /usr/bin/compiz-manager, and find the function named build_args(), remove the --loose-binding parameter for the COMPIZ_OPTIONS command.
| Code: |
build_args()
{
if [ $INDIRECT = "yes" ]; then
COMPIZ_OPTIONS="$COMPIZ_OPTIONS --indirect-rendering "
fi
if check_nvidia; then
#COMPIZ_OPTIONS="$COMPIZ_OPTIONS --loose-binding"
COMPIZ_OPTIONS="$COMPIZ_OPTIONS"
fi
}
|
Try to restart compiz-manager to make yourself lucky.
