Re: How To Install Nvidia Drivers [v9.2.13 by Bogan].
In many cases an incorrect Screen Resolution, a Blank or Black Screen,or a hang-up at "Checking Battery State [OK]" are caused by Video driver problems. This guide aims to provide instructions covering NVIDIA video card installation.
Here is the latest version: [ Updated 1/Feb/2013 ]
Including an important change to the 'Removal of old drivers' instruction.[Section2a.]
When installing a different driver it is important to ensure ALL components are removed before install the new one; especially so after video problems and xorg FataL Errors.
Nvidia drivers for Linux come in various forms; directly downloaded from the Nvidia.com/Drivers website, or modified by Ubuntu as 'nvidia-current', and down loaded from a PPA . This guide is mainly concerned with the first, and installation via a Terminal.
TIP: If you have a three-button or a scroll-wheel Mouse, to Copy/Paste, highlight the command, move the Mouse cursor to the destination point and press the middle button or scroll-wheel. - Presto!
Ubuntu nvidia-current drivers. [ Sometimes called 'Proprietary Drivers'.]
To install the Ubuntu modified drivers called nvidia-current and variants, the same preparatory steps should be taken, but omit stage 3.; and at stage 5, use:
Code:
sudo apt-get install nvidia-current nvidia-settings # alter nvidia packagename to suit.
Nvidia-current drivers can also be installed from System Settings>Additional Drivers, or from Synaptic Package Manager, which will tell what is available. [ From Ubuntu 12.10, 'Additional Drivers ' is included in Software Sources. You can Right-Click on the Desktop, select 'Change Desktop Background', click the 'All Settings' tab, select 'System>Software Sources' and the 'Additional Drivers ' tab, and Activate the driver you want.]
[The following is based on Post #280 of MAFoElffen's 'Blank Screen' magnum-opus Sticky in the Installations & Upgrades Forum.]
There is a Trouble-Shooter in Post#1 & an index in Post#2.
http://ubuntuforums.org/showthread.p...43535&page=113
Summary.
Under normal circumstances, this is all you need to do, to install an nvidia.com downloaded driver:
Reboot to a 'TTY' [Text Terminal or Text Console], or shut down the Xsession from a GUI screen, as the nvidia driver must be installed when the Xserver and GUI screen are inactive. Then CD to the folder where you have downloaded the NVIDIAxxx.run file, make it executable and run it with 'sudo sh'.
Kernel Updates:
There are many Posts deprecating the use of the drivers Downloaded from the Nvidia.com>Drivers website; mainly because it used to be necessary to re-install them following a Kernel update. From v304.xx this is no longer the case as nvidia drivers are now compatible with DKMS and hence the kernel modules are updated automatically, in the same way as with nvidia-current installations. With earlier versions it is still necessary.
Preparation.
However, the first time you do this there are some preparatory steps: first you should check or add some Blacklists in the /etc/modprobe.d folder; then ensure the necessary build procedures and header files are installed, and it is also advisable to purge any previous nvidia installations, essential if installing a different driver.
Adding blacklists:
Note: There may already be nouveau blacklist files in /etc/modeprobe.d. Recent versions, v.304 onwards, of both the nvidia-installer and the Ubuntu-nvidia-current installations can create files blacklisting the default Nouveau driver so Stage 1. can be omitted. The nvidia-installer will offer to create a blacklist file.
1.: Add blacklists, [ For drivers prior to v.304 ]:
In a Terminal ['Crtl+Alt+t'] enter:
Code:
gksudo gedit /etc/modprobe.d/nouveaublacklist.conf # If you do not have a GUI
# Screen you will need to use a different text editor, eg. 'nano' or 'vim'.
If the file does not exist, gedit will show a blank screen with that name, add:
Code:
# Added for nvidia driver.
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
Save and close gedit. [ The filename you use must end in: ".conf" ]
2.: Prep and make sure everything is there for any dependencies, and Cleanup:
Ensure you have fully updated your installation.
Code:
sudo apt-get update
sudo apt-get install build-essential gcc-4.5 g++-4.5 libxi-dev libxmu-dev freeglut3-dev libgl1-mesa-glx libglu1-mesa libglui-dev
uname -r
Insert the output of 'uname -r' in the following command: substituting it for 'uname -r'; for example:
"sudo apt-get install linux-headers-3.2.0-2-33-generic-pae"
Code:
sudo apt-get install linux-headers-'uname -r'
sudo apt-get install linux-headers-generic
2a.: Removing previous different drivers. Synaptic Package Manager is useful to give the correct packagenames.
Code:
sudo nvidia-installer --uninstall # not needed if no prior nvidia.com-installation
sudo apt-get remove --purge <nvidia-driver packagename> # for each preinstalled driver by name,
# if installing a different one, not just a newer version of the same. Then:
sudo apt-get remove --purge nvidia*
You may get some 'file not found' messages on the last commands. That is okay. Continue. We just want to make sure that older modules are completely removed so that there is no conflict.
3.: Download. [ Omit if choosing an nvidia-current driver]
Download the appropriate driver from nvidia.com/Drivers:
http://www.nvidia.co.uk/object/linux...driver-uk.html That is for the 32.bit version, make sure you have the correct one for your GPU.
If you do not know which GPU/Video card you have, run:
Code:
lspci -nnk | grep -iA3 vga
4.: Stopping the Graphics session.
To install the downloaded driver, Xorg cannot be running. You need to shut down the X-Session. In a TTY [Text Terminal], [ 'Ctrl+Alt+F1' ] or Terminal, enter:
Code:
sudo service lightdm stop # If using 10.10 or earlier use 'gdm' in place of 'lightdm'
You will get a black screen; if it does not have a login prompt, to get one, press 'Ctrl+Alt+F1' [or F2-F6], login, enter your password. [ It will not show, just type it & press 'Enter'] If you need to return to the GUI screen, press: 'Ctrl+Alt+F7', but first, run:
Code:
sudo service lightdm start
Alternatively, reboot into the Recovery drop-down menu, run 'Fsck' to set system to Read/Write, then 'Drop to a Root shell' and login if requested:
In this case you should enter:
Code:
telinit 3 # to set system level
[Should 'fsck' hang, wait a minute or two, then enter 'Ctrl+c']
5.: Installing the driver. If choosing an nvidia-current driver, see fifth paragraph at start above,"Ubuntu nvidia-current drivers." and skip to Stage 6.
Change directory [cd] to the directory where you saved the nvidiaxxx.run file, for example:
Code:
cd /home/username/Downloads
ls
Running 'ls' will confirm you are in the right place and you can be sure the spelling is correct - entering 'NV' and pressing 'Tab' will [/should] Auto-complete the file name.
[In the following, substitute the correct file name:]
Mark the downloaded file as executable:
Code:
sudo chmod a+x NVIDIA-Linux-x86-304.60.run
Run the file to Install drivers:
Code:
sudo sh NVIDIA-Linux-x86-304.60.run
You may get an error message about a failed script, continue, accept the options, navigating by using 'Tab' and pressing 'Enter'. [If Nouveau is found to be running, the nvidia-installer may advise to abort and blacklist it, but if you choose to continue, it will create a blacklist for you.]
6.: When complete, reboot, 7.: In case of difficulty:
If necessary edit the grub boot menu script, by pressing 'e' with the boot option highlighted and entering 'nomodeset' after 'splash ' in the Linux boot line where it shows "ro quiet splash ", and pressing 'Ctrl+x' to boot.
You may need to run one or more of:
NVIDIA XServer Settings [run as Root]
Code:
gksudo nvidia-settings
sudo nvidia-xconfig # after renaming the /etc/X11/xorg.cnf file
sudo apt-get install --reinstall nvidia-common # for nvidia cards 5xxx FX or earlier
sudo apt-get install --reinstall ubuntu-desktop
sudo dpkg-reconfigure nvidia-current # If needed, change package name.
sudo update-initramfs -u
[Revised: 1/FEB/2013]
Chao!, bogan.
Bookmarks