Go Back   Hardware Forums > Software Support Forums > Linux and Other OSes

Reply
 
LinkBack Thread Tools
Old 15-11-2006, 02:49 AM   #1 (permalink) Top
Nonconformist Geek
 
Anti-Trend's Avatar
 
Join Date: Oct 2003
Age: 27 Male
Posts: 4,807
Times Helpful: 522
Status: Offline

My Computer

Lightbulb Howto: Install NVidia drivers In Debian or Ubuntu

Howto Install NVidia drivers In Debian or Ubuntu
-aka-
Getting 3D in Debian or Ubuntu with NVidia


Installing the proprietary NVidia drivers in Debian (or Ubuntu, a Debian spin-off) is surprisingly easy. Not as easy as they'd be if they were open-source, but I digress...


STOP! Before proceeding, make sure to backup your xorg.conf! Ubuntu may break your xorg.conf, and it's always nice to have a point of reference.
Also, I've written a script to make this much easier for *ubuntu users.


Requirements:
  • Your kernel headers must matched your installed kernel. If you roll your own kernels, this is already handled. Otherwise, use the command:
    Code:
    uname -a
    ...to identify your running kernel, and use your package manager to install the corresponding kernel header package.
  • Make sure the build-essential meta package is installed, which allows the drivers to compile in the first place.
    Code:
    apt-get install build-essential
  • If you do build your own kernels, leave out the Riva FB drivers, and do build the appropriate AGPart module if you have an AGP architecture.

Steps to install:
  1. Download NVidia's Linux drivers and save them someplace where you'll remember them later.
  2. Save anything you're working on and log out of your desktop session.
  3. Go to a virtual terminal (ALT+CTRL+F1)
  4. Login as root Note: In Ubuntu, you are already root... sort of. Yes, I know, this is dumb. To get full root in Ubuntu, run the following command:
    Code:
    sudo su -
  5. Terminate your graphical user environment. There are a few ways to do this; the easiest is to
    Code:
    /etc/init.d/kdm stop
    if you're using the KDE display manager,
    Code:
    /etc/init.d/gdm stop
    if you're running the Gnome display manager, or if you're using the X display manager:
    Code:
    /etc/init.d/xdm stop
  6. Navigate to the directory where you downloaded your drivers earlier. Note: If you don't know how to do this part, you need to first go over the absolute basics: http://anti-trend.homelinux.org/lite...ect_02_02.html ...you can always post here if you need help with something specific, but please at least read that first if you're having trouble navigating in a non-graphical environment.
  7. Install the NVidia drivers with the following command:
    Code:
    sh NVIDIA-Linux-x86-1.0-9629-pkg1.run --x-module-path=/usr/lib/xorg/modules/ -aqNX
    ...where "NVIDIA-Linux-x86-1.0-9629-pkg1.run" should be the actual name of the NVidia driver you're trying to install. Tip: You can start typing the name of the file, then hit the TAB key and your system will automatically complete the filename for you. That makes it a lot easier to type long filenames without making typos.
  8. Once you've got the new drivers installed, just start your display manager back up and logout of your virtual terminal. Here are the commands to do so with KDM, GDM and XDM respectively:
    Code:
    /etc/init.d/kdm start && exit
    Code:
    /etc/init.d/gdm start && exit
    Code:
    /etc/init.d/xdm start && exit
  9. To test your new 3D Drivers, log back in to a desktop session and run the following command in a terminal:
    Code:
    glxinfo | grep render
    Note: the "|" is a pipe symbol, not an "i" or an "L". You should see something similar to the following:
    Code:
    direct rendering: Yes
    OpenGL renderer string: GeForce 6800 GT/AGP/SSE/3DNOW!
        GL_NVX_conditional_render, GL_SGIS_generate_mipmap, GL_SGIS_texture_lod,
    ...If "Direct Rendering" reads as "yes", congratulations! If not, feel free to post here, and we'll see what we can do to help you out.

Send a message via ICQ to Anti-Trend Send a message via AIM to Anti-Trend   Reply With Quote
The Following 3 Users Say Thank You to Anti-Trend For This Useful Post: Show me >>
Whats this? diNovo Edge Bluetooth Wireless Keyboard
diNovo Edge Bluetooth Wireless Keyboard
Seller Price (inc. VAT) Delivery Total Price Availability Seller Rating
Dell £128.05 Free £128.05 In Stock Rated: 0 out of 5 - Number of votes: 0
Micro Direct £112.27 £3.51 £115.78 In Stock Rated: 1 out of 5 - Number of votes: 38
Laskys.com £115.00 Free £115.00 In Stock Rated: 3 out of 5 - Number of votes: 39
Old 18-11-2006, 09:00 PM   #2 (permalink) Top
MiCrO$oFt $uK$ :D
 
Willz's Avatar
 
Join Date: Jun 2005
Age: 19 Male
Posts: 4,234
Times Helpful: 150
My Mood: Lurking
Status: Offline

My Computer

Nice How to Guide there...
Off Topic:

...now we need someone to do a How to for the ATi Drivers :p
__________________
Send a message via AIM to Willz Send a message via MSN to Willz Send a message via Yahoo to Willz   Reply With Quote
Old 30-11-2006, 02:56 AM   #3 (permalink) Top
May the source be with u!


 
Impotence's Avatar
 
Join Date: Dec 2004
Age: 19 Male
Posts: 1,877
Times Helpful: 126
My Mood: Stressed
Status: Offline

My Computer

Off Topic:

how to install... ATI Graphics Drivers!

Ubuntu:Edgy - ATI Graphics Drivers
__________________
Dear intel,Already Made My Decision
Never trust a computer you can't repair yourself.
Windows Vista - Viruses Intruders Spyware Trojans Adware
Why Linux is Better!|Pastafairianism|Say no to National ID|Firefox Extensions Guide
scientology has been getting alot of attention recently

When the rich wage war, it is the poor who die.
Where are the WMD's that our governments used to justify the war?
  Reply With Quote
Old 03-04-2008, 08:54 PM   #4 (permalink) Top
Ani Ma'amin
 
sabashuali's Avatar
 
Join Date: May 2005
Age: 40 Male
Posts: 1,417
Times Helpful: 67
My Mood: Breezy
Status: Offline

My Computer

Hi AT

Followed the instructions, thenks! However, I have a query -
When I tried the command "glxinfo | grep render", debian complains that glxinfo is an unknown command.

When I check the KInfoCenter I can see under OpenGL - see attached image

I am using the HWF P4 kernel.....

Is everything alright here?
Attached Thumbnails
howto-install-nvidia-drivers-debian-ubuntu-opengl.jpg  
__________________
This is not a PC friendly user!!!
I want to use Linux because it is better. Cost and packages are added bonuses!

Help with digital video?

Help My Mini City to grow
Hit or Miss
Send a message via Skype™ to sabashuali   Reply With Quote
Old 03-04-2008, 11:19 PM   #5 (permalink) Top
Nonconformist Geek
 
Anti-Trend's Avatar
 
Join Date: Oct 2003
Age: 27 Male
Posts: 4,807
Times Helpful: 522
Status: Offline

My Computer

glxinfo is part of the mesa-utils package. Just install that and you'll have the command you're looking for.
Send a message via ICQ to Anti-Trend Send a message via AIM to Anti-Trend   Reply With Quote
The Following User Says Thank You to Anti-Trend For This Useful Post: Show me >>
Old 11-04-2008, 02:24 AM   #6 (permalink) Top
Nonconformist Geek
 
Anti-Trend's Avatar
 
Join Date: Oct 2003
Age: 27 Male
Posts: 4,807
Times Helpful: 522
Status: Offline

My Computer

Ubuntu has added some scripts to the mix which make building drivers the NVidia way a real pain in the ass. To help counter this, I've written a primitive BASH script which Ubuntu users may find useful:

Code:
#!/bin/sh
#
#######################################
# Easy NVidia Builder Script
# Licensed under the GPLv3 
# (or later at your option):
# http://www.gnu.org/copyleft/gpl.html
#######################################
#
#############################
## Default Display Manager ##
#############################
## Change to kdm, gdm or xdm as necessary:
DMNG=gdm

#############################
## NVidia Driver Location  ##
#############################
## What's the absolute path to the drivers?
NVDRIVER=/usr/local/src/nvidia/NVIDIA-current.run

#############################
## Path to X Modules       ##
#############################
## Shouldn't have to change this in Ubuntu:
XMODPATH=/usr/lib/xorg/modules

## Kill Ubuntu's annoying script that keeps respawning the display manager:
killall gdmopen
## Now stop the display manager we've defined earlier:
/etc/init.d/$DMNG stop
## If there are still any X.org processes hanging around, kill them too:
killall Xorg
## Zombie Clause - Wait 6 seconds and make absolutely sure they stay dead:
sleep 6
killall $DMNG
killall gdmopen
killall Xorg
## They've had their fair chance. After 3 seconds, we bring out the big guns:
sleep 3
killall -9 $DMNG
killall -9 gdmopen
killall -9 Xorg
## Now we build the NVidia driver:
sh $NVDRIVER --x-module-path=$XMODPATH -aqNX --no-runlevel-check
## Restart the display manager:
/etc/init.d/$DMNG start
How to use this script:
  1. Download the appropriate drivers from NVidia's website.
  2. Put this BASH script someplace in your path where it can executed. For instance, /usr/local/sbin/ would be a perfect location:
    Code:
    cd /usr/local/sbin && wget http://www.hardwareforums.com/repo/scripts/nvinst.sh
  3. chmod the script so that it can be executed:
    Code:
    chmod 755 /usr/local/sbin/nvinst.sh
  4. Using your favorite text editor, edit the NVDRIVER section of the script to account for the exact path to your downloaded drivers. For example:
    Code:
    #############################
    ## NVidia Driver Location  ##
    #############################
    ## What's the absolute path to the drivers?
    NVDRIVER=/usr/local/src/nvidia/NVIDIA-Linux-x86-169.12-pkg1.run
  5. Also change the display manager variable, if necessary.
  6. Logout of any X sessions (KDE, Gnome, etc) and either drop to a virtual terminal (Ctrl+Alt+F1-F6) or to runlevel 1, whichever is more convenient for you.
  7. Execute the script: sudo nvinst.sh
And of course, feel free to post here with problems or improvements.
Send a message via ICQ to Anti-Trend Send a message via AIM to Anti-Trend   Reply With Quote
The Following User Says Thank You to Anti-Trend For This Useful Post: Show me >>
Old 11-04-2008, 06:42 AM   #7 (permalink) Top
May the source be with u!


 
Impotence's Avatar
 
Join Date: Dec 2004
Age: 19 Male
Posts: 1,877
Times Helpful: 126
My Mood: Stressed
Status: Offline

My Computer

Off Topic:


Quote:
## They've had their fair chance. After 3 seconds, we bring out the big guns:
sleep 3
killall -9 $DMNG
killall -9 gdmopen
killall -9 Xorg
KILL DASH NINE,
No more CPU time.
I run KILL DASH NINE,
And your process is mine.
I run KILL DASH NINE,
'Cause it's MY time to shine
So don't step outta line or else it's
KILL DASH NINE!

Kill Dash Nine | Lyrics
__________________
Dear intel,Already Made My Decision
Never trust a computer you can't repair yourself.
Windows Vista - Viruses Intruders Spyware Trojans Adware
Why Linux is Better!|Pastafairianism|Say no to National ID|Firefox Extensions Guide
scientology has been getting alot of attention recently

When the rich wage war, it is the poor who die.
Where are the WMD's that our governments used to justify the war?
  Reply With Quote
Old 09-07-2008, 11:49 PM   #8 (permalink) Top
Ani Ma'amin
 
sabashuali's Avatar
 
Join Date: May 2005
Age: 40 Male
Posts: 1,417
Times Helpful: 67
My Mood: Breezy
Status: Offline

My Computer

Hey all

Just came against a big wall when trying to install the nVidia driver against the 2.6.25 Kernel In Debian (Lenny). Basically the short of it is that the latest from nVidia will not build against a XEN enabled Kernel #476504 - nvidia-kernel-source: Fails to build with Linux kernel 2.6.25 - Debian Bug report logs. If, like me you are using a stock kernel and have not a clue how to compile a kernel, disabling the option, your best bet is to try and use Debian's latest, own nvidia-glx driver. It is unfortunate that the driver is only available from the Sid repo's.

I suppose it is down to you whether you wish to dab in the unknown but this is how it worked for me:
Just to quickly explain that I am using the new kernel out of choice as it solves an issue I had. If you are using the new Kernel it is likely that you are experimenting anyway so on your head be it.....

Add and enable the Sid repository (I include the lot - main contrib non-free). Then as root:
Quote:
/etc/init.d/kdm stop (replace kdm with other if necessary)
apt-get update
apt-get install nvidia-kernel-source module-assistant (if it is not installed already) nvidia-settings nvidia-xconfig
You might get a warning that the packages suggest installing the nvidia-glx package. Options are Y/N/Q. I chose Y.

When all is done:
Quote:
m-a prepare && m-a a-i nvidia
apt-get install nvidia-glx
When this is finished, to make sure the new module is loaded:
Quote:
rmmod nvidia (not necessary if you were not using the module already)
modprobe nvidia
Now restart your desktop manager
Quote:
/etc/init.d/kdm start
or reboot
Quote:
reboot
.

Disclaimer - this is not a how-to but just an FYI which I felt would be a bit silly if I did not include the way I manged to install the driver.
I took the how to from here -
Debian User Forums :: View topic - Nvidia 100.14.19 - Debian way, custom (or not) kernel.
Note that I have omitted the
Quote:
grep -q ^nvidia /etc/modules || echo nvidia >> /etc/modules
as it crashed the whole process for me... probably because it was not intended for me.....

AAAAnyways I hope some of you will find this useful.
__________________
This is not a PC friendly user!!!
I want to use Linux because it is better. Cost and packages are added bonuses!

Help with digital video?

Help My Mini City to grow
Hit or Miss
Send a message via Skype™ to sabashuali   Reply With Quote
Old 09-07-2008, 11:57 PM   #9 (permalink) Top
Nonconformist Geek
 
Anti-Trend's Avatar
 
Join Date: Oct 2003
Age: 27 Male
Posts: 4,807
Times Helpful: 522
Status: Offline

My Computer

Yeah, to be honest one shouldn't enable Xen in their kernels unless they actually plan to run hypervisors... and that would be weird on a desktop warranting 3D graphics anyway. On typical desktops, Xen should be disabled.
Send a message via ICQ to Anti-Trend Send a message via AIM to Anti-Trend   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AIGLX + Beryl Nightly on Debian Sid HowTo Anti-Trend Linux and Other OSes 6 30-01-2007 07:35 AM
HOWTO: Overclock nVidia cards (ubuntu/debian) megamaced Linux and Other OSes 0 12-01-2007 07:29 PM
Latest nVidia & ATi drivers for Ubuntu 6.06 megamaced Linux and Other OSes 4 14-12-2006 01:12 AM
Installing nVidia drivers in Debian - Helpful Addis Linux and Other OSes 3 29-09-2006 07:12 PM
Do not install nVidia Beta drivers!! Exfoliate Drivers and Firmware 5 12-06-2005 07:43 PM


All times are GMT +1. The time now is 11:45 AM.


Copyright © 2000 - 2008 · HARDWAREFORUMS.COM · All rights reserved