Install NVidia drivers : the NVidia way

Why the NVidia way ?

Because nothing is ready to install it under lenny the debian way. It's possible with Etch and Sid but not with Lenny. See here for more information.

Prerequisites

gcc-4.1

Lenny's kernel image are build with gcc-4.1 but Lenny ships gcc-4.3. In order to properly compile the NVidia kernel driver, you have to install gcc-4.1.

apt-get install gcc-4.1

Kernel headers

apt-get install linux-headers-2.6-686

Stop your DM

Replace gdm by your dm (kdm, slim, …) :

/etc/init.d/gdm stop

If you use SLiM and have the problem as me, you'll have to kill slim and X because stop doesn't work.

Download the driver

Beware there is three version of drivers :

  • legacy : 71.XX (for TNT, TNT2, Geforce1, Geforce GTS, Geforce TI, …)
  • super legacy : 96.XX (Geforce2 MX, Geforce3/4)
  • unified : 173.XX (the rest)

Installation

As root of course.

export CC=/usr/bin/gcc-4.1

# to workaround Xen bug of kernel 2.6.25
cd /lib/modules/$(uname -r)
grep CONFIG_XEN . -Rl | xargs -i sed -i -e ’s/CONFIG_XEN/CONFIG_LUPO/g’ {}
export IGNORE_XEN_PRESENCE=1 

./NVIDIA-Linux-x86-96.43.07-pkg1.run

Do not try to download the module from nvidia ftop and let the program build the module and modify your xorg.conf (your previous one is kept as xorg.conf.backup).
That's it you should have the nvidia driver installed.

Solving problems

Disclaimer

I've uninstalled the driver because I couldn't get it to work with my K7N420 with integrated Geforce2 MX. So don't expect too much.

NoLogo

You can disable the NVidia logo at startup, add this to your xorg.conf :

Option "NoLogo" "true"

NvAGP

With this setting you can change AGP support. An extract of the NVidia documentation :

Option "NvAGP" "integer"

    Configure AGP support. Integer argument can be one of:

        Value             Behavior
        --------------    ---------------------------------------------------
        0                 disable AGP
        1                 use NVIDIA's internal AGP support, if possible
        2                 use AGPGART, if possible
        3                 use any AGP support (try AGPGART, then NVIDIA's
                          AGP)

    Please note that NVIDIA's internal AGP support cannot work if AGPGART is
    either statically compiled into your kernel or is built as a module and
    loaded into your kernel. Please see Appendix F for details. Default: 3.

You can even blacklist your normal AGP driver to force avoiding to use agpgart.

Uninstall

Nothing worked …. you can still uninstall and wait for nouveau (like me) :

nvidia-installer --uninstall
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License