XGL/Compiz Nvidia 32bit
From Knowledge76
Contents |
Introduction
Everything except the installation & setting up of nVIDIA driver sections should also work for ATI and other cards.
The guide
OK let's get started.
You must remember that to use XGL/Compiz or even the drivers, you must use the kernel that matches your processor. Ex: if you have a P4 HT, you should use kernel 686-smp; if you have a AMD K7, kernel k7... as follow:
sudo apt-get install linux-686-smp
Where 686-smp is your kernel version.
Adding sources
We're going to add the sources for XGL/Compiz related packages, so open a terminal (gnome-terminal will do) and type the following:
sudo gedit /etc/apt/sources.list
This will open your sources.list in a gnome friendly editor, scroll to the bottom and add the following:
deb http://www.beerorkid.com/compiz dapper main deb http://ubuntu.compiz.net/ dapper main
Save the file, go back to your terminal and type this:
wget http://www.beerorkid.com/compiz/quinn.key.asc -O - | sudo apt-key add -
Then this:
sudo apt-get update
Once it has finished type the following:
sudo apt-get upgrade
Installing nVIDIA driver
Now we need to install and configure the Nvidia Glx drivers for Xorg, so type the following in your terminal (note: You can ignore this step if you have already setup Xgl drivers) :
sudo apt-get install nvidia-glx
Setting up nVIDIA driver
Now you want to configure them. There are many ways to configure your xorg.conf, most of which are beyond the scope of this HOWTO, this HOWTO only covers adding Xgl support to your xorg.conf if you want to configure things like twinview (dual head support) and xinerama (one desktop across multiple monitors) please type man nvidia-xconfig from the terminal.
To add Glx support type the following from your terminal
sudo nvidia-xconfig
Tip: The above command tends to set just one resolution mode, if you do sudo nvidia-xconfig --mode=1600x1200 (change 1600x1200 for the resolution you want) you can change mode from within xorg by using ctrl+alt+ +/- (plus to increase, - to decrease).
Restart your Xorg server with ctrl+alt+backspace. This will take you back to the login screen, log back in.
Checking system
OK so lets confirm Xorg is now using the correct drivers, this can be done by typing the following from a terminal:
glxinfo
If you scroll up the output near the top you should have these lines:
client glx vendor string: NVIDIA Corporation [...] OpenGL vendor string: NVIDIA Corporation
If the OpenGL vendor string says Mesa, you need to check your /etc/X11/xorg.conf file and make sure your video device is using Driver "nvidia" and not Driver "nv". If you followed the instructions above this should not be an issue.
If you want to see your OpenGL in action type the following from a terminal:
glxgears
Pre-install configuration
Now lets setup your gnome login to load Xgl instead of Xorg. To do this you need to edit a file called gdm.conf-custom, so type the following from your terminal:
sudo gedit /etc/gdm/gdm.conf-custom
At the very bottom of the file add the following lines:
[servers] 0=Xgl [server-Xgl] name=Xgl server command=/usr/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo -kb flexible=true
Save the file and go back to the terminal.
Installing XGL/Compiz
It is time to download and install Xgl and Compiz. Type the following in your terminal:
sudo apt-get install xserver-xgl compiz-gnome emerald emerald-themes beryl
That will install Xgl, Compiz and all the goodies.
beryl-manager (formerly compiz-manager)
You can also install beryl-manager. It's a tray icon that give you access to Beryl Settings Manager, emerald settings and let you choose if you want to run compiz or metacity.
You can install it by typing this in your terminal:
sudo apt-get install beryl-manager
Post-install configuration
And finally we need to add a startup script to our session startup. the easiest way to do this is to click on the "System" menu in the gnome panel at the top of your screen (providing you are using the default gnome configuration). Select "Preferences" then at the bottom select "Sessions". Click on the "Startup Programs" tab and click the "Add" button. Type the following:
/usr/bin/beryl-start
And click on "OK"
IMPORTANT: If you have installed beryl-manager, to launch Compiz you must use beryl-manager instead of beryl-start as:
/usr/bin/beryl-manager
As an alternative to the script you could of course just add both command (emerald & and compiz --replace gconf &) directly to the session startup programs
OK all should be good to go now. I recommend at this point that you actually reboot your computer as opposed to just restarting X with ctrl+alt+backspace. But before you do, please read this last section and take some notes for what you need to do once you log back in.
Configuring XGL/Compiz
It is likely that you will have no theme selected when you reboot and no title bars on your windows. If you click on the "System" menu link on your top gnome panel and goto Preferences and select Emerald Themer, it will load the theme manager for compiz. Then simply select one of the themes in the top panel of the Emerald Themer by left clicking it, and you will see the themes change in real time.
You should have what are known as "Wobbly" windows try dragging a window to see what I mean. Also ctrl+alt+left/right arrow will put you in cube view mode for selecting a desktop.
Note: If you have installed beryl-manager, clicking in the tray icon you have a direct link to Beryl Manager and Emerald configurators, so you don't need to read the rest of this section.
There are, right now, three different ways to configure compiz:
Using Beryl Manager (formerly Compiz Settings Manager)
Note: this way is recommended
To configure your Compiz, you only need to run this command:
beryl-settings
Or, if you prefer the GUI way, you can take a look to System -> Preferences -> Beryl Settings Manager.
Using gconf-editor
Note: this way is recommended for advanced users
You can edit the plugins configurations for all the cool effects by typing the following in a terminal:
gconf-editor &
The plugins are located under apps -> compiz where there are two sections. The General section is for configuring which plugins to load and the Plugins section is for configuring each individual plugin.
Using gset-compiz
Note: this way is not recommended
To use this program, you must install it first:
sudo apt-get install gset-compiz
and run it wih
gset-compiz
Authorship
If you have any problems with this HOWTO please pop into #Xgl on irc.freenode.net and look for Paladine, if I am not there, I am sure someone else would be more than happy to help.
Also get on over to http://www.compiz.net and have a look around the forums for more information on themes and plugins.
FranzRogar also added some new info and TOC.
Enjoy.
Troubleshooting Guide
Due to the fact that no HOWTO can fit everyone's system, I have added this section for troubleshooting. Obviously this section willgrow to cover as many issues as are brought to my attention.
"I can't get titlebars to show or themes to change"
If you have followed the guide including the last section regarding Compiz Themer you should have titlebars. However, if your colour depth is set higher than 24 titlebars won't work. If this scenario fits you should have an error if you type cgwd --replace & from the terminal and get the following error:
compiz.real: No GLXFBConfig for depth 32 compiz.real: Couldn't bind redirected window 0x3a000f2 to texture
You need to type sudo gedit /etc/X11/xorg.conf in a terminal and look for your "Screen Section" which should look something like this:
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
You need make sure that DefaultDepth is set to 24 Also make sure that the SubSection "Display" Depth is not set to 32 (it may have several depths from 1-24, so long as the only Depth set is not higher than 24 you can leave this SubSection unedited.)
Save the file and restart Xgl by doing ctrl+alt+backspace and logging back in. Make sure you recheck the Compiz Themer to confirm that you have selected a theme and set the default bar layout in the "General" tab.
If you are still unable to see the window decorations, please come to the #Xgl irc channel on irc.freenode.net and ask for assistance.
"I have no keyboards listed in gnome-keyboard-preferences?"
Firstly, gnome-keyboard-preferences is normally accessed via the System Menu (on your gnome-panel) (system>preferences>keyboard>Layouts Tab).
If you see no keyboards listed (which will effect your alt and windows keys) check your /etc/X11/xorg.conf to make sure you are not using the Xkb extension. Look for the following line in the "Section Modules"
load "xkb"
If you have that line you need to make a change to /etc/gdm/gdm.conf-custom as follows:
Replace
command=/usr/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo -kb
with
command=/usr/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo
In other words remove the -kb from the end of that line and restart Xgl with ctrl+alt+backspace
"The compiz-start script does not work"
Solution by alecks
Instead of using the /usr/bin/compiz-start' script. You can edit it and replace its content by this:
#!/bin/bash cgwd & compiz --replace gconf decoration wobbly fade minimize cube rotate zoom scale move resize place switcher &

