Login (generic cert)
Logout
Guests 22
If you can walk and chew gum at the same time, you can run GNU/Linux
Blog Pushes

debian tutorials
debiantutorials.org is built on and runs on Debian.

 

Creative Commons License
Getting 3d Acceleration on your Debian Desktop with nVIDIA Drivers Print E-mail
Written by machiner   
Wednesday, 10 January 2007 04:26

[EDIT: nvidia on Lenny]

You're 2 minutes away from having nVIDIA graphics drivers for Linux installed on your Debian machine. Then you'll get your fancy 3D acceleration and all manner of whiz-bang that this driver can deliver. This brief tutorial will include 2 common methods for installing nVIDIA's Linux driver. They are both very simple and each will have its positive and negative aspects. You could try each way and decide later which suits your computing style, your kung-fu, best. Me, I always do things the hard way 'cos that's the way I dig it.

The Debian way with module-assistant

People seem to dig this way the best. There's no denying that it's the quickest and best suited for out-of-mind maintenance. You won't have to uninstall this driver when you update your kernel like you must when you go the binary route. You had to remove this binary "kernel mode" driver if you upgraded your machine from Sarge to Etch, too. It's no big thing, but by installing the driver with module-assistant you get a different kind of satisfaction, I think.

First off make sure that your repositories include the "non-free" option, like this:

deb http://debian.uchicago.edu/debian/ etch main contrib non-free
deb-src http://debian.uchicago.edu/debian/ etch main contrib non-free

I simply run Gedit from a root terminal to amend my /etc/apt/sources.list file:

# gedit /etc/apt/sources.list

After you've saved and closed the file now you must update apt, so

# apt-get update

Now I make sure that I have some software installed that Debian needs to accomplish this task. So I simply tell apt to install them

# apt-get install build-essential linux-headers-2.6.XX-X-XX module-assistant

With your prerequisites installed you're ready to go. Let's dust off module-assistant:

First, you prepare it,

# m-a prepare.

Next you install the nvidia drivers:

# m-a auto-install nvidia

Following this you install nvidia-glx, so

# apt-get install nvidia-glx

Go ahead and load the nvidia module:

# modprobe nvidia

The nVIDIA driver is locked and loaded but we must tell our Debian system to use that driver now instead of the default nv driver. Painless.

# dpkg-reconfigure xserver-xorg

Go through the questions. The defaults are probably fine for you for most settings. Make sure to choose glx and dri from among the module selection you will be presented with and make sure that when you choose the display driver that you choose nvidia. Also, do yourself a favor and make sure to set the correct vertical and horizontal refresh rates for your monitor. You can choose among 3 choices at this stage. If you don't know your specific refresh rates just choose simple and pick a display setting from the list you'll be presented with. If you do know your monitor's rates then choose advanced and input those rates there.

You're finished. Now you can ctrl+alt+backspace to kill X. A new login screen should appear and you can go ahead and log in with full 3d acceleration. That was quick and painless, right?

Installing the nVIDIA Binaries

Many people like to install the nVIDIA drives this way, too. I like it just fine for my own crazy reasons. Because I'm talentless and lazy most of the following text was simply copied over from a previous article I wrote about this process. It fits.

To install the drivers this way you must also make sure to have the same software installed that the module-assistant required. Except, of course, for module-assistant itself.

At this point you should have the binary downloaded from nVIDIA. If no then get it here.

Following the brief download, let's install the driver:

    First, we stop X

  • # /etc/init.d/gdm stop You can replace gdm with whatever display manager you are using; kdm, xdm

    Now, we'll move to the directory you saved the driver to

  • # cd /to/download/location -;ls;

    Now we'll install the driver

  • # sh NVIDIA-Linux-x86-1.0-XXXX-pkg1.run

    Simply accept the license and answer the 3 prompts. It's OK if you read that the installer suffered a download error. You already have the kernel-headers installed. The installer will use those headers. I just hit enter.

    When finishing, the install routine will ask if you would like it to automatically change the driver reference in your xorg.conf file. Sure, you can let it do that for you. My recommendation: let it. However if you don't allow it you must change this manually or run # dpkg-reconfigure xserver-xorg as mentioned in the preceding method above.

    # nano /etc/X11/xorg.conf

    Scroll to the following section

    Section "Device"
        Identifier     "NVIDIA Corporation NV43 [GeForce 6600 GT]"
        Driver         "nvidia"
    EndSection

    You can see that mine already reads "nvidia" in the device section. Yours may read "vesa" or "nv". Change whatever driver is listed in your file to read "nvidia". Save the file - CTRL+X, y, enter

    Now we load the nvidia kernel module

    # modprobe nvidia

At this point we're finished. You can start X back up by running the following command

# /etc/init.d/gdm start

You should see the nVIDIA logo page then be at your graphical login prompt. Before you login, hit CTRL+ALT+F1 so you can log out of your root session. Hit CTRL+ALT+F7 to switch back to your graphical login.

Don't forget, you can update the drivers with the following command (you'll have to stop x first):

# nvidia-installer --update

As I mentioned earlier in this article, you must remove this "kernel mode" driver ( learn a little about [[device drivers]].) whenever you mod your kernel in any way, like upgrading it, recompiling it, etc., etc., etc. Remove your nVIDIA binary this way:

  • Stop X
  • login as root
  • # nvidia-installer --uninstall

--machiner 10 Jan 2007 09:00

Feel free to discuss this article in the Forum

Comments
Add New
+/-
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly:
:dry::lol::kiss::D:pinch::(:shock:
:X:side::):P:unsure::woohoo::huh:
:whistle:;):s:!::?::idea::arrow:
 
'Guest'  - ya baby   |71.162.64.xxx |2007-02-06 04:27:38
woohoo!

thanks
'Guest'  - The Debian way is better because........   |75.70.161.xxx |2007-02-12 07:53:14
You can build the nvidia driver for each kernel you have installed. Booting into a different kernel does not
have to be without 3d. Using the nvidia installer script puts files into non-standard locations and you can
only have one nvidia driver at a time. Just my .02
'Guest'  - Hmmmmm... nearly but not quite....   |71.162.68.xxx |2007-03-25 06:55:14
I'm running an AMD64 and Etch... I have stepped through both versions above ... and unfortunately it fails to
start X with a trapping of Signal11. It also keeps warning me that there is no entry in /etc/X11/xorg.conf
for device NVIDIA @ 00:1:3.

I've now exhausted what little brain-matter I had on this subject, and am
struggling like heck to get Debian,Nvidia, and X to cohabitate peacefully. I'm beginning to wish I had not
forsaken my previous variety of Linux.

Ian B - if anyone is reading this and can offer any advice I'm ieb
at klokwurx with a com after it.
machiner  - This is why I started a forum   |71.162.68.xxx |2007-03-25 06:57:26
Go ahead over to http://www.debintutorials.org/talkitup/index.php and sign up. Post a new topic in the
configure your desktop forum section and we will help you solve this problem.

If you have a problem, I, we,
want to help -- but don't leave your problem as a comment.
'Guest'  - The Debian way ...   |80.126.241.xxx |2007-02-28 22:25:40
thanks for the tutorial, I did it the Debian way, great.

Aditionally I had to edit the xorg.conf file, or
run nvidia-xconfig that does the job for you.
'Guest'   |72.74.113.xxx |2007-04-28 04:39:54
Hey, I really like your bad ass site. I found another way to install nvidia driver.

Get the driver
installer from Nvidia site

Go to terminal as root and type uname -r

apt-get install
linux-headers-(version)
apt-get install xserver-xorg-dev
apt-get install pkg-config

init 1

give root
password

Go to your directory where nvidia driver installer is and run it

Select no to exit and yes to
install
Once install is done and goes back to linux promp type "init 3" or just reboot and presto,
you got a bad ass debian driver installed.

I even keep a bad ass list just in case in need to reinstall
everything

apt-get install alsa-base alsa-utils alsa-oss kopete blender blender-ogrexml k3d inkscape
gimp-data-extras gimp-gap gimp-helpbrowser gimp-help-common gimp-print gimp-python gimp-resynthesizer gimp-svg
gimp-texturize xscreensaver-gl nexuiz nexuiz-data nexuiz-music nexuiz-server gspca-modules-2.6.18-4-486
camorama pkg-config xserver-xorg-dev linux-headers-2.6.18-4-486 rss-glx

Now all I need is a bad ass way to
backup, recover and get aqsis install so I can use my bad ass 3d modeling software K3d

I also need to get
my bad ass scanner working too. Hope you can help.


[EDIT] Bad-ass, man. See the forum, and keep
poking around on this site - all is addressed. --machiner
'Guest'   |24.164.112.xxx |2007-04-29 03:30:13
Just wanted to let you know that this tutorial was VERY helpful and I wished to thank you for your assistance.
Also, I noticed one thing while installing, actually two things,. After numerous attempts, on a fresh install
of etch, without success, I discovered by accident, that the installer option regarding enabling the software
frame buffer, was the culprit, keeping X from installing and executing properly. When I declined the option,
everything installed perfectly and I was up and running again!

2.6.8-4-686 was installed by default but
when the module assistant was used as described above, it installed Nvidia with the 2.6.18-486 kernel. I
wasn't expecting this but then I'm still new to Linux and Debian. Anyway thanks again and know that you are
appreciated, nay worshiped by lesser beings!
'Guest'  - The Debian way...   |72.74.126.xxx |2007-05-18 02:02:51
I followed the Debian way, and everyting worked fine until the last command:
#modprobe nvdidia

Got this
answer:
FATAL: Error inserting nvidia (/lib/modules/2.6.18-4-686/nvidia/nvidia.ko): No such device
'Guest'   |72.74.126.xxx |2007-05-18 02:05:22
You forgot to run:

# apt-get install nvidia-glx

after you installed the kernel drivers. Go ahead and
install nvidia-glx, then make sure to change the nv to nvidia in your /etc/X11/xorg.conf file
'Guest'  - installing nvidia-glx NO GOOD!   |64.30.68.xxx |2007-11-02 05:27:33
This method apparently does NOT work for my version of Debian ETCH

debian:~# apt-get install
nvidia-glx
Reading package lists... Done
Building dependency tree... Done
The following packages will be
REMOVED:
fast-user-switch-applet foomatic-gui gdebi gdm gksu gnome-applets gnome-control-center gnome-core
gnome-desktop-environment
gnome-netstatus-applet gnome-panel gnome-session gnome-system-monitor
gnome-terminal gnome-volume-manager gparted kdelibs4c2a
libgksu1.2-0 libgksu2-0 libgksuui1.0-1
libgl1-mesa-swx11 libgl1-mesa-swx11-dev libglu1-mesa libglu1-mesa-dev libmyth-0.20.2
libqt3-mt-dev libxine1
libxklavier10 mpeglib nautilus nautilus-cd-burner python-gnome2-extras totem totem-mozilla totem-xine

update-notifier xbase-clients xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev

xserver-xorg-input-kbd xserver-xorg-input-mouse xserver-xorg-input-synaptics xserver-xorg-video-all
xserver-xorg-video-apm
xserver-xorg-video-ark xserver-xorg-video-ati xserver-xorg-video-chips
xserver-xorg-video-cirrus xserver-xorg-video-cyrix
xserver-xorg-video-dummy xserver-xorg-video-fbdev
xserver-xorg-video-glint xserver-xorg-video-i128 xserver-xorg-video-i740
xserver-xorg-video-i810
xserver-xorg-video-imstt xserver-xorg-video-mga xserver-xorg-video-neomagic xserver-xorg-video-newport

xserver-xorg-video-nsc xserver-xorg-video-nv xserver-xorg-video-rendition xserver-xorg-video-s3
xserver-xorg-video-s3virge
xserver-xorg-video-savage xserver-xorg-video-siliconmotion
xserver-xorg-video-sis xserver-xorg-video-sisusb
xserver-xorg-video-tdfx xserver-xorg-video-tga
xserver-xorg-video-trident xserver-xorg-video-tseng xserver-xorg-video-v4l
xserver-xorg-video-vesa
xserver-xorg-video-vga xserver-xorg-video-via xserver-xorg-video-vmware xserver-xorg-video-voodoo
The
following NEW packages will be installed:
nvidia-glx
0 upgraded, 1 newly installed, 80 to remove and 0 not
upgraded.
Need to get 0B/3294kB of archives.
After unpacking 126MB disk space will be freed.
Do you want to
continue [Y/n]?n

Installing nvidia-glx will uninstall alot of stuff, particularly gdm, and xserver-xorg...
this makes this particular howto guide unusable for some debian ETCH users

EDIT: You're kidding me,
right.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated on Friday, 27 February 2009 20:27