HomeDocumentationFAQCommunity Log in / create account
compiz.org 

From Compiz

ladomtr

This page is outdated! Please visit http://wiki.compiz-fusion.org/Hardware/NVIDIA

Removing the old nvidia driver

This only applies for those who have an older version of the nvidia driver installed from your distribution's repositories. To check what version of the nvidia driver you have installed now type this into a terminal:

glxinfo | grep "OpenGL version string:"

This should return something like this:

OpenGL version string: 2.1.0 NVIDIA 96.31

Where the last line is the driver version. If your version is 9631 (see above) or higher then you can skip this and move on to the section entitled "Modifying your xorg.conf file".

Ubuntu:

To uninstall the current driver type this into a terminal:

sudo apt-get remove --purge nvidia-glx

Please also ensure that the "linux-restricted-modules"-packages have been uninstalled. Alternatively, you can edit the /etc/default/linux-restricted-modules configuration file and add the following:

DISABLED_MODULES="nv nvidia_new"

Now reboot!

Install the latest nvidia driver

First you must install the necessary packages to build a kernel interface for the latest nvidia driver:

sudo apt-get install linux-headers-`uname -r` build-essential gcc gcc-3.4 xserver-xorg-dev

After getting these packages you should download the driver from http://www.nvidia.com/object/unix.html. You should also print this step of the guide because you're going to go terminal only. The first thing you need to do is stop the currently running X-server.

Close all applications and press Ctrl+Alt+F1 to switch to a non-X terminal (at this point you can still go back to your X session by pressing Ctrl+Alt+F7). Now log in with your username and password, then stop the currently running X-server by typing the following:

sudo /etc/init.d/gdm stop

Now you must navigate to the directory where you downloaded the nvidia driver. Once there you must type this:

sudo sh NVIDIA-Linux-x86-1.0-9631-pkg1.run

Be sure to replace the "x86-1.0-9631-pkg1" with the appropriate architecture and version for the file you downloaded. For example "NVIDIA-Linux-x86_64-100.14.11-pkg2.run" for an amd64 kernel.

Now follow the instructions and if it complains about not finding a matching kernel-interface choose to download a new one. Most probably it will fail and create a matching interface of its own. If it asks you whether to modify your xorg.conf, choose "Yes". Now essentially you are done and most pro 1000 bably you could just c 1000 ontinue with "Now reboot you system ...". The following detailed instructions tell you how to deal with some special problems.

The new module is created as the file "/lib/modules/`uname -r`/kernel/drivers/video/nvidia.ko" . You can query where "modprobe" thinks the module "nvidia" is located. It should be:

$ modprobe --show-depends nvidia
insmod /lib/modules/2.6.22-8-generic/kernel/drivers/i2c/i2c-core.ko 
insmod /lib/modules/2.6.22-8-generic/kernel/drivers/video/nvidia.ko

If this is the case, you can skip the next few lines and continue with "Now reboot your system ...". If instead you get

$ modprobe --show-depends nvidia
install /sbin/lrm-video nvidia

then you probably decided to keep the linux restricted modules (See "Removing the old Nvidia driver") and the restricted driver manager is still in the way. It will load a module from the linux-restricted-modules package. One way to circumvent this is to rename the newly compiled driver file to "nvidia-is.ko":

cd /lib/modules/`uname -r`/kernel/drivers/video
sudo mv nvidia.ko nvidia-is.ko

and make a new entry in the modprobe aliases:

sudo gedit /etc/modprobe.d/nvidia-install-script

with the lines

# Make --modprobe nvidia-- look for nvidia-is
alias nvidia nvidia-is

You can check that this worked with:

$ modprobe --show-depends nvidia
insmod /lib/modules/2.6.22-8-generic/kernel/drivers/i2c/i2c-core.ko 
insmod /lib/modules/2.6.22-8-generic/kernel/drivers/video/nvidia-is.ko

Now reboot your system by typing:

sudo shutdown now -r

If you see the nvidia logo on a gray background after rebooting it means that the driver is running and installed properly. If it doesn't, you can study the log files "/var/log/nvidia-installer.log", "/var/log/Xorg.0.log" and "/var/log/gdm/0.log" to see what went wrong.

Modifying your xorg.conf file

Now you have to add a few lines you your xorg.conf file. This is necessary for Compiz to run properly. Failure to do this will result in no eye candy for you. There are two ways of doing this:

The easy way is to enter the following commands into a terminal:

sudo nvidia-xconfig --composite --render-accel --add-argb-glx-visuals

Now press Ctrl+Alt+Backspace to restart your X-server or reboot.

Note: These commands might not make the correct changes to your Xorg.conf file. So to make sure it has open the Xorg.conf file as detailed below and check for the correct settings. If it has not changed the file as described below do so. but do not take away any thing already in there, unless it says to below.

The hard way is editing your xorg.conf file manually, but it isn't that hard. First type this into a terminal:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf-backup
sudo gedit /etc/X11/xorg.conf

Find this section:

Section "Module"
	Load	"i2c"
	Load	"bitmap"
	...
	Load	"type1"
	Load	"vbe"
EndSection

Comment out dri and GLcore (if present), like this:

#	Load	"dri"
#	Load	"GLcore"

Make sure the glx module is loaded, like this:

Load	"glx"

Make sure the X11 extmod will load:

Load       "extmod"

Find this section (your values may vary) :

Section "Screen"
    Identifier     "Default Screen"
    Device         "NVIDIA Corporation NV40 [GeForce 6800]"
    Monitor        "SyncMaster"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes      "1440x900"
    EndSubSection
EndSection

Make sure DefaultDepth is set to 24, if it isn't already, then add the following lines below "EndSubSection" or above the 1000 first "SubSection" 1000

Option         "AddARGBGLXVisuals" "true"
Option         "DisableGLXRootClipping" "true"

Add this to the very end:

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

Save the file and exit the text editor. Now restart the X-server by pressing Ctrl+Alt+Backspace or reboot. After this you're ready to install Compiz!

Retrieved from "http://compiz.org/NVidia"