- Joined
- Jun 14, 2004
I wanted to give an easy but long winded explanation how to install the nVidia drivers manually on a generic Ubuntu system. This is not an end all guide. It may open the understanding up how to install the manual nVidia driver to those who need it on an Ubuntu setup.
It might sound long and hard, but it goes pretty fast the second time around.
Simple as:
backup xorg
install kernel headers and build-essential
have driver installer ready
go out of display manger
then stop the display manager
navigate to driver.run file
restart display manager
startx... Log in and watch the new splashscren for nVidia
It is not overly difficult or will it take long. The key here is to have everything in place and a basic understanding why things happen and how to recover. In the event of a boo boo. First I will go through and hopefully get anyone who does not know, up to speed.
The advantages of not using automated driver install. Is that you have more control over what goes into your system. Your not reliant on trying to fix things with another script and what went wrong. Doing it manually, also gives some perks of trying out new drivers or reverting to ones that may work to your needs. A manual install once your used to it. Takes about 20 minutes. Not including getting the files you need to do it.
First thing first.
You should be able to do backup of the xorg. This is important and is really fast. Don't be afraid to talk to your machine via the Cli or Command Line interface. Plus make sure the old driver is removed.
To do a backup of the xorg.Open the terminal up. Then type :
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
To revert the file back. It is simple as :
sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf
Simple as pie. One thing to keep in mind. Case sensitive is important. Also making sure the space bar is used when needed. Here is the basic of what you just did.
The sudo tells the system you would like to be boss for a short time. So it lets you be so, after you finish asking it. Linux lets you speak your peace before it bugs you asking for passwords.
The cp tells the system to copy.. hence the cp.
You can send the copy as a new name if you like or keep the original file name. You can also send it to wherever you like. really versatile if you have specific needs.
Simpler explanation: You you become boss, then tell the system. I would like to make a copy. Then what you would like to copy. Then to where the copy shall go. Does this make sense?
Next up. That you understand how to do a simple backup and make copies. We need to get the files for the action. First off. We are going to need the kernel header.
Lets get the kernel header. there is two ways to do so. The longer method is to just use synaptic. One thing. Your going to probably want to use the terminal anyways. So unless you know which specific kernel you use. Open that up... But I know some folks are dependent on the GUI.. Not a bash, just sometimes text is much faster.
Type: uname -r
My output was:
enablingwolf@freewheel:~$ uname -r
2.6.22-15-generic
So I would look for 2.6.22-15-generic. You have to make sure of your specific version. Now I know which kernel I have. I can install the proper header for my install..
I would go into synaptic and type in the find dialog.:
linux-header
Then look for my specific header.
Mine is properly checked as: linux-headers-generic.
If it is not checked, you have some pretty big issues on your machine, or are not allowed to work with the header. Ok now you know you have the headers in place and they are correct. We need to be able to build on the header file. So lets install one more thing while when are there. Locate build-essential. Which will enable the system to build stuff for you. this is one thing most overlook and end up installing anyways. So it is easier to get that in now.
Now the easy way...
Let's open the terminal up. This is much faster and works so much smoother. I will simply give the commands. Since if you already read above. You got a basic understanding where we are going.
sudo apt-get install linux-<insert your version here> build-essential
Ok notice how I asked it to install both packages at once? Just make sure you got the right header. The rest is like eating pie. Tastes good don't it? You could do a uname -r prior , just so you know what kernel you have. I kind of suggest that..
For most installs. Simply using this will work:
sudo apt-get install linux-generic build-essential
Yes the command line is that easy and fast. Unless you only type with one finger and it is in a box someplace.
Lets move on to the next part. The nVidia driver itself. We need to download the driver from the website. Or if you have it stored locally, woot, your one up. I would suggest putting in a spot that is easy to type to. Using, /home would be an good pick. If you put it in your user 's home folder. Just make sure you know that it will then be. /home/your_user_name/driver_name.sh. So simple works wonders here. It would then look like: /home/driver_name.sh
Ok now for some insight and to make it easier to understand things. We are going to be deeper in the system that your used to. So knowing some basic commands and why they are used will help some. As for most operating systems. The cd is used. It stands for change directory. Another one is ls (ell ess). I think it stands for list stuff.. Good enough and makes it easy to remember.
So why do you need to know these things? Well moving around to directories and knowing what is inside them helps a bunch. As for example. When your not in the user interface. Your going to be in the root folder. So being able to skip around will help a bunch.. Plus seeing if your actually in the right folder(actually directory) and if you spelled it right.
So a sample usage would be.
cd /home/user_name
To see what is inside there...
simple type ls That should show you what is in there, plus it is colorized too.
If the file was really deep inside the file structure. Heck how about I just copy and paste me looking for the xorg...
enablingwolf@freewheel:~$ ls
dad Desktop frame_vin.gap innotek.asc sony temp Themes triplea
enablingwolf@freewheel:~$ cd /etc/X11
enablingwolf@freewheel:/etc/X11$ ls
app-defaults rgb.txt xorg.conf Xsession.d
cursors X Xresources Xsession.options
default-display-manager xinit xserver XvMCConfig
fonts xkb Xsession Xwrapper.config
enablingwolf@freewheel:/etc/X11$
Now that you have the file and know where it is and how to get to it, or in the case hunt for it... Even remember how the heck it is spelled... We can move to the next part... This is where it gets sort of hard.... You won't have you fancy smanchy visuals.. Just text.. So the driver will not install in the GUI.. or graphic user interface. It needs a higher runtime to do that. Technical stuff alert. You need runlvl-3.
So we pop out of the GUI... and ask the system to let us have what we need. This is not all that hard, but most might be uncomfortable using only the text thing. Don't worry.. If you can post on a forum, do email.. or IM/PM folks. You can do just fine typing and ask your computer to do your bidding.
Here is how we do this.
Ctrl+Alt+Backspace, you will be in the login window
Then hit Ctrl+Alt+F2
This will pop you out of the GUI. Now you got text only. So type:
sudo ect/init.d/gdm stop
(replace gdm with kdm if you use KDE.. this is you using your nogging here.. Xubuntu will use xdm)
What you just did. Was stop the gnome display manager. Hence why replacing the g for k or x is needed for KDE or other display managers.. This gives you a higher level run time. You can now navigate to the driver file... I am going to assume. That it is in your /home/user_name folder. So lets go on over...
Type:
cd /home/user_name
Then lets see if we are in the right spot. So do a list stuff thing, which if you recall is ls. You will see the driver package. Keep in mind what is in caps and what is not.. Plus any spaces..
In my case I see:
dad frame_vin.gap NVIDIA-Linux-x86-173.14.12-pkg1.run temp triplea
Desktop innotek.asc sony Themes
How about we remove the old driver. Since we are not using it right now plus replacing it. No reason to have it muck up the new one.
Sudo apt-get uninstall <version of driver>
Or simply:
sudo rm /etc/init.d/<version of driver>
To find out which driver your running, type in the terminal:
nvidia-settings.
(You might of not known that was there did ya?)
So, lets start to install this.... type:
sudo sh NVIDIA-Linux-x86-173.14.12-pkg1.run
Ok it should fire off the installer. Follow the prompts and it should go smooth. When it is done... Back in the command line. Just restart the display manager.
sudo /etc/init.d/gdm start
Then use:
startx
Log in as usual... Your done...
To uninstall.. I just grabbed this off of linuxquestons.org.
Then reset the xorg file. or revert to your backup.
How to reset the oxrg:
sudo dpgk-reconfigure --phigh xserver-xorg
It might sound long and hard, but it goes pretty fast the second time around.
Simple as:
backup xorg
install kernel headers and build-essential
have driver installer ready
go out of display manger
then stop the display manager
navigate to driver.run file
restart display manager
startx... Log in and watch the new splashscren for nVidia
It is not overly difficult or will it take long. The key here is to have everything in place and a basic understanding why things happen and how to recover. In the event of a boo boo. First I will go through and hopefully get anyone who does not know, up to speed.
The advantages of not using automated driver install. Is that you have more control over what goes into your system. Your not reliant on trying to fix things with another script and what went wrong. Doing it manually, also gives some perks of trying out new drivers or reverting to ones that may work to your needs. A manual install once your used to it. Takes about 20 minutes. Not including getting the files you need to do it.
First thing first.
You should be able to do backup of the xorg. This is important and is really fast. Don't be afraid to talk to your machine via the Cli or Command Line interface. Plus make sure the old driver is removed.
To do a backup of the xorg.Open the terminal up. Then type :
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
To revert the file back. It is simple as :
sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf
Simple as pie. One thing to keep in mind. Case sensitive is important. Also making sure the space bar is used when needed. Here is the basic of what you just did.
The sudo tells the system you would like to be boss for a short time. So it lets you be so, after you finish asking it. Linux lets you speak your peace before it bugs you asking for passwords.
The cp tells the system to copy.. hence the cp.
You can send the copy as a new name if you like or keep the original file name. You can also send it to wherever you like. really versatile if you have specific needs.
Simpler explanation: You you become boss, then tell the system. I would like to make a copy. Then what you would like to copy. Then to where the copy shall go. Does this make sense?
Next up. That you understand how to do a simple backup and make copies. We need to get the files for the action. First off. We are going to need the kernel header.
Lets get the kernel header. there is two ways to do so. The longer method is to just use synaptic. One thing. Your going to probably want to use the terminal anyways. So unless you know which specific kernel you use. Open that up... But I know some folks are dependent on the GUI.. Not a bash, just sometimes text is much faster.
Type: uname -r
My output was:
enablingwolf@freewheel:~$ uname -r
2.6.22-15-generic
So I would look for 2.6.22-15-generic. You have to make sure of your specific version. Now I know which kernel I have. I can install the proper header for my install..
I would go into synaptic and type in the find dialog.:
linux-header
Then look for my specific header.
Mine is properly checked as: linux-headers-generic.
If it is not checked, you have some pretty big issues on your machine, or are not allowed to work with the header. Ok now you know you have the headers in place and they are correct. We need to be able to build on the header file. So lets install one more thing while when are there. Locate build-essential. Which will enable the system to build stuff for you. this is one thing most overlook and end up installing anyways. So it is easier to get that in now.
Now the easy way...
Let's open the terminal up. This is much faster and works so much smoother. I will simply give the commands. Since if you already read above. You got a basic understanding where we are going.
sudo apt-get install linux-<insert your version here> build-essential
Ok notice how I asked it to install both packages at once? Just make sure you got the right header. The rest is like eating pie. Tastes good don't it? You could do a uname -r prior , just so you know what kernel you have. I kind of suggest that..
For most installs. Simply using this will work:
sudo apt-get install linux-generic build-essential
Yes the command line is that easy and fast. Unless you only type with one finger and it is in a box someplace.
Lets move on to the next part. The nVidia driver itself. We need to download the driver from the website. Or if you have it stored locally, woot, your one up. I would suggest putting in a spot that is easy to type to. Using, /home would be an good pick. If you put it in your user 's home folder. Just make sure you know that it will then be. /home/your_user_name/driver_name.sh. So simple works wonders here. It would then look like: /home/driver_name.sh
Ok now for some insight and to make it easier to understand things. We are going to be deeper in the system that your used to. So knowing some basic commands and why they are used will help some. As for most operating systems. The cd is used. It stands for change directory. Another one is ls (ell ess). I think it stands for list stuff.. Good enough and makes it easy to remember.
So why do you need to know these things? Well moving around to directories and knowing what is inside them helps a bunch. As for example. When your not in the user interface. Your going to be in the root folder. So being able to skip around will help a bunch.. Plus seeing if your actually in the right folder(actually directory) and if you spelled it right.
So a sample usage would be.
cd /home/user_name
To see what is inside there...
simple type ls That should show you what is in there, plus it is colorized too.
If the file was really deep inside the file structure. Heck how about I just copy and paste me looking for the xorg...
enablingwolf@freewheel:~$ ls
dad Desktop frame_vin.gap innotek.asc sony temp Themes triplea
enablingwolf@freewheel:~$ cd /etc/X11
enablingwolf@freewheel:/etc/X11$ ls
app-defaults rgb.txt xorg.conf Xsession.d
cursors X Xresources Xsession.options
default-display-manager xinit xserver XvMCConfig
fonts xkb Xsession Xwrapper.config
enablingwolf@freewheel:/etc/X11$
Now that you have the file and know where it is and how to get to it, or in the case hunt for it... Even remember how the heck it is spelled... We can move to the next part... This is where it gets sort of hard.... You won't have you fancy smanchy visuals.. Just text.. So the driver will not install in the GUI.. or graphic user interface. It needs a higher runtime to do that. Technical stuff alert. You need runlvl-3.
So we pop out of the GUI... and ask the system to let us have what we need. This is not all that hard, but most might be uncomfortable using only the text thing. Don't worry.. If you can post on a forum, do email.. or IM/PM folks. You can do just fine typing and ask your computer to do your bidding.
Here is how we do this.
Ctrl+Alt+Backspace, you will be in the login window
Then hit Ctrl+Alt+F2
This will pop you out of the GUI. Now you got text only. So type:
sudo ect/init.d/gdm stop
(replace gdm with kdm if you use KDE.. this is you using your nogging here.. Xubuntu will use xdm)
What you just did. Was stop the gnome display manager. Hence why replacing the g for k or x is needed for KDE or other display managers.. This gives you a higher level run time. You can now navigate to the driver file... I am going to assume. That it is in your /home/user_name folder. So lets go on over...
Type:
cd /home/user_name
Then lets see if we are in the right spot. So do a list stuff thing, which if you recall is ls. You will see the driver package. Keep in mind what is in caps and what is not.. Plus any spaces..
In my case I see:
dad frame_vin.gap NVIDIA-Linux-x86-173.14.12-pkg1.run temp triplea
Desktop innotek.asc sony Themes
How about we remove the old driver. Since we are not using it right now plus replacing it. No reason to have it muck up the new one.
Sudo apt-get uninstall <version of driver>
Or simply:
sudo rm /etc/init.d/<version of driver>
To find out which driver your running, type in the terminal:
nvidia-settings.
(You might of not known that was there did ya?)
So, lets start to install this.... type:
sudo sh NVIDIA-Linux-x86-173.14.12-pkg1.run
Ok it should fire off the installer. Follow the prompts and it should go smooth. When it is done... Back in the command line. Just restart the display manager.
sudo /etc/init.d/gdm start
Then use:
startx
Log in as usual... Your done...
To uninstall.. I just grabbed this off of linuxquestons.org.
Did something in your installation go terribly, terrible wrong? No problem! Start your box up in console-only mode, navigate to where you have the nvidia driver installation file saved, and run it with the --uninstall option. sh filename.run --uninstall, and it uninstalls everything it put in.
Then reset the xorg file. or revert to your backup.
How to reset the oxrg:
sudo dpgk-reconfigure --phigh xserver-xorg
Last edited: