HOWTO Nvidia Beta
From ZWHLUG
Contents |
[edit] About
As some of you might have seen, the nice folks from Nvidia released a new spiffy beta driver for Linux, BSD and solaris. this new piece of driver goodness brings us the following joys:
- Added initial support for GLX_EXT_texture_from_pixmap.
- Added new "Display Configuration" page in nvidia-settings.
- Improved workstation OpenGL performance in Xinerama.
- Added support for NVIDIA Quadro Plex.
- Added support for Quad SLI.
- Improved X driver error recovery.
- Improved workstation overlay performance.
- Added SMBus functionality to the Linux/i2c interface.
- Fixed DFP scaling support.
- Added support for OpenGL 2.1.
- Added new "TwinViewXineramaInfoOrder" X configuration option to control the order of display devices when in TwinView.
The point concerning the GLX_EXT_texture_fron_pixmap must overjoy the people using XGL. As it now allows you to use XGL without the extra openGL library hacks stuff. Anyways you guys probably know how to use/abuse this yourselves.
[edit] Binary Driver
We are going to be installing the Nvidia propertary beta driver. This is not an opensource driver, and should not be confused with the "nv" driver.
[edit] Preparing to Install
I this is the first time you are installing the Nvidia driver yourself, and not using the driver provided by your distribution. You will need to make some preparations before commensing the installation. Since I am running Ubuntu myself, I list the steps to go through based on this distribution. What we need to make sure before installing the binary Nvidia driver for the first time:
- development tools like make and gcc are installed
- the linux-headers package matching the installed Linux kernel is installed
- the pkg-config and xserver-xorg-dev packages are installed
- the nvidia-glx package has been uninstalled with the --purge option and the file /etc/init.d/nvidia-glx does not exist.
If you use Ubuntu, 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 disable the NVIDIA linux-restricted kernel modules (nvidia, nvidia_legacy) via: DISABLED_MODULES="nv"
[edit] Installing prerequisites
So now we know what we need to do lets get to work.
First we will install the kernel headers, these are needed during the build proces of the kernel driver and are absolutely essential. Though you will not need them if you have the kernel source of the running kernel installed on your computer. First we need to find out which kernel headers package we are going to need. We are going to find this out by using the following command:
uname -r
The output of this command is the type of kernl you are using. Now to install the kernel headers we do the following:
sudo apt-get install linux-headers-`uname -r`
Now we need to install some packages to allow us to compile the modules. We will need to install the following packages:
- gcc
- make
- xserver dev package
- pkg-config
- patch
We do this with the following command:
sudo apt-get install gcc make xserver-xorg-dev pkg-config build-essential patch
(the last package is a so called meta package that makes sure all basic packages for compiling things are also installed.)
Now we have all essential packages installed and we are ready to start installing the actual driver.
[edit] Downloading the Driver
Before we can install the driver we will first need to download it. First we need to go to the Nvidia driver page which is located at http://www.nvidia.com/content/drivers/drivers.asp Here we click on the link titled "BETA drivers". After the page finished loading scroll down to the section titled "UNIX BETA DRIVERS". Here click on the "Linux Display Driver x86". If you are running a 32-bit sytem. Otherwise select the AMD64/EMT64 (64-bit systems only!). After the page finished loading again click the link at "STEP 2" and download the file currently the newest BETA driver is 1.0-9625 which can be downloaded at: http://download.nvidia.com/XFree86/Linux-x86/1.0-9625/NVIDIA-Linux-x86-1.0-9625-pkg1.run
[edit] Installing the Driver
Now we are almost ready to install the driver. One of the new things this BETA driver introduces is I2C support for the cards. I will not be explaining what exactly I2C is, but in short terms its a communications bus mainly used in computers for temperature sensors and other information. Though at the time of writing this howto, there is a smallish problem with this new code. It requires that modules such as EEPROM are loaded after the first time the X-server is started. Otherwise stuff goes wrong and you fail to get an X-server. So to solve this the guys at Nvidia released a patch to remove the I2C stuff from the driver. Which isnt that big of a problem, as no software uses the I2C functions of the graphics card at this time.
To remove the I2C capabilities we need to download a patch for the driver package. This patch can be downloaded at: http://www.nvnews.net/vbulletin/attachment.php?attachmentid=20486&d=1158955681 The file should be called: "NVIDIA_kernel-1.0-9625-NOSMBUS.diff.txt" and 530 bytes in size. If the above link fails to work the contents of the file are included below. Just save the contents as "NVIDIA_kernel-1.0-9625-NOSMBUS.diff" using you favourite text editor and you are ready to go.
diff -ru usr/src/nv/nv-i2c.c usr/src/nv.NOSMBUS/nv-i2c.c
--- usr/src/nv/nv-i2c.c 2006-09-15 01:10:17.000000000 +0200
+++ usr/src/nv.NOSMBUS/nv-i2c.c 2006-09-22 21:56:17.259789750 +0200
@@ -138,11 +138,7 @@
static u32 nv_i2c_algo_functionality(struct i2c_adapter *adap)
{
- return (I2C_FUNC_I2C |
- I2C_FUNC_SMBUS_QUICK |
- I2C_FUNC_SMBUS_BYTE |
- I2C_FUNC_SMBUS_BYTE_DATA |
- I2C_FUNC_SMBUS_WORD_DATA);
+ return I2C_FUNC_I2C;
}
static struct i2c_algorithm nv_i2c_algo = {
Now that we have the patch we are ready to apply it. First we need to extract the Nvidia driver package so we get acces to the files that will need to be patched. We do this with the following command:
chmod 755 NVIDIA-Linux-x86-1.0-9625-pkg1.run
(to allow the user to run this package)
sudo NVIDIA-Linux-x86-1.0-9625-pkg1.run -x
Now we need to move the patch to the directory created during the extraction so
mv /path/to/file/NVIDIA_kernel-1.0-9625-NOSMBUS.diff /path/to/directory/NVIDIA-Linux-x86-1.0-9625-pkg
Now that the patch is in the right location we can patch it. First we need to change the direcory to the directory we just moved the patch to so
cd /path/to/directory/NVIDIA-Linux-x86-1.0-9625-pkg
Now we apply the patch with the following command:
patch -p0 NVIDIA_kernel-1.0-9625-NOSMBUS.diff
The patch is now applied and we should be ready to go. For the next step we need the X-server to not be started. This can probably simplest be done by stopping it. First make sure that all work is saved and all applications can be closed. Now we stop the X-server with the following command:
sudo /etc/init.d/gdm stop
or if you run KDE
sudo /etc/init.d/kdm stop
Now we log in to the command line, and are ready to start the installation. Change directory to the location where we extracted the Nvidia driver package. So we do:
cd /path/to/directory/NVIDIA-Linux-x86-1.0-9625-pkg
now we start the installer with:
sudo nvidia-installer
You now see a graphical installer, follow the instructions on screen and it will install the binary driver. If you are not familiar with tweaking the X-server configuration file xorg.conf, then please allow the nvidia installer to change the config file for you. It is one of the last questions the installer asks. If all goes well, the installer is now finished and we can enjoy the Nvidia Binary Driver. We restart the X-server with:
sudo /etc/init.d/gdm restart
or if you run KDE
sudo /etc/init.d/kdm restart
Enjoy the driver.
