memo nvidia debian debian way...
memo nvidia debian
debian way
The nVidia driver consists of two parts: a kernel module, and a collection of user-space libraries. The libraries (sometimes called the "binary driver" or GLX libraries) are distributed in binary form by nVidia, and packaged for Debian in the nvidia-glx package. The kernel module (aka the "kernel interface to the binary driver") is distributed in source form (though with one binary component), and packaged for Debian in the nvidia-kernel-source and nvidia-kernel-common packages. The user libraries and kernel module source only have to be installed once. Then the kernel module has to be rebuilt every time you rebuild or change your kernel. So, here's what you will do:
Build and install the kernel module.
Install the user-space libraries.
Update your configuration.
Step 2 has to be performed after step 1 because of some dependencies, as I explain below.
Steps 2 and 3 have to be performed only once. Step 1 you have to repeat every time you change your kernel, but with the help of module-assistant, apt-get, and make-kpkg, it's hardly any work at all.
Choose a Distribution
You can run 'apt-cache policy
nvidia-kernel-source' to see which versions of the driver are
available in each distribution.
Once you've chosen a distribution, put its value into a shell
variable NVDIST, by executing one of
the following lines:
NVDIST=testing
NVDIST=unstable
I will use $NVDIST to represent this value in all of
the commands below. Also, make sure that your /etc/apt/sources.list
contains a line like
'deb http://http.us.debian.org/debian $NVDIST main contrib non-free',
for your $NVDIST. (Help yourself to a copy of my
sources.list if you like.) And if you've just modified
/etc/apt/sources.list, you need to run 'apt-get update'
before continuing below.
Installation Instructions
Build and install the kernel module.
There are four different procedures that you can use to install the kernel module. If that sounds like a lot, don't worry—I've listed the easiest methods first. So start with the first one, and if it doesn't work for you, go on down the list. Click on the title of each method to see the instructions.
Use module-assistant. This method is very easy, and should work for most people, with either a stock or custom kernel.
Install module-assistant if you don't have it, and nvidia-kernel-common:
apt-get install module-assistant nvidia-kernel-commonThen run:
m-a prepare
m-a auto-install nvidiaAnd that's it. If all went well, your nVidia kernel module is now built and installed; you may proceed to step 2.
module-assistant automates the more detailed procedures described below: it downloads the nvidia kernel module source, builds a kernel module package compatible with your (stock or custom) kernel, and installs the package. (If you're interested, the package file is /usr/src/nvidia-kernel-*.deb, and you can see that it's installed by running
apt-cache policy nvidia-kernel-$(uname -r).) Of course module-assistant has many other operations and options; see the man page for details.Note: you must use the same version of gcc to build your nvidia kernel module as was used to build your kernel. This might be a problem if you are running a stock kernel. If module-assistant fails, read its log output and look for messages suggesting that you need, for example, gcc-3.4 instead of gcc-3.3. (Thanks to Josep Ma Antolin for this tip.)
2 Install the nVidia user-space libraries. Run
apt-get -t $NVDIST install nvidia-glx
The reason this step has to come after step 1 is that nvidia-glx depends on a virtual package called 'nvidia-kernel-$NVVERSION', where $NVVERSION is the version number of the nVidia driver you've installed. This virtual package is provided by the kernel module package that you installed in step 1; so you have to complete that step first.
Update /etc/X11/XF86Config-4. Naturally, there is both a Debian way and an old-fashioned way of doing this. Click on a method title to see the instructions.
able to use the display. You can do this manually by editing /etc/group, or the Debian way by
Ensure that the nvidia module gets inserted into your kernel automatically at boot, by adding it to /etc/modules if it's not already there:
grep -q ^nvidia /etc/modules || echo nvidia >> /etc/modules
addgroup --system video
adduser $USER videofor each $USER you want to add to the group.