nVidia Driver Installation

Started by dragonheart, December 24, 2012, 11:21:55 PM

Previous topic - Next topic

dragonheart

This howto contains the steps to install nVidia binary driver, but without configuring xorg.conf which its a very important step. So if someone knows how to properly configure xorg.conf please let us know...

In order to do that you are required to remove nouveau drivers from the system. This guide will tell you how to disable and remove nouveau drivers step by step.
Before starting, you might want to know that nouveau is a project which aims to develop open source drivers for Nvidia cards. When you install Ubuntu, it detects your card and installs these drivers.
* * *
If you have a new card may things will not go as you expected and better solution is the default driver.
The nvidia's driver for linux is not always the best solution.

* * *

Please note that, nouveau drivers manual removal is required only if you are going to install the propreitary nvidia drivers yourself. If this is not the case then directly install the required graphic drivers from BackBoxKey(upper left corner)->Settings->Hardware drivers. Its the recommended and the most convenient way available.

For our little endeavour, here is what we are going to do.

  • We'll blacklist all the culprit modules,
  • remove all the nvidia* packages and
  • as an extra step we may have to update the initramfs disk because it could be configured to load the modules at startup.

If you are not familiar with Linux console you should see first this guide:
http://us.download.nvidia.com/XFree86/Linux-x86_64/310.19/README/newusertips.html

**You can apply the following steps with your own responsibility**

Installing

1) Visit nvidia's website and download the driver for your card.

2) Blacklist the modules. Open the blacklist.conf file.
sudo nano /etc/modprobe.d/blacklist.conf
add the following modules in the file then save and exit.
Nano is a text editor, you can use whatever fits your needs

blacklist amd76x_edac #this might not be required for x86 32 bit users.
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv


3) Remove all the nvidia* packages:
sudo apt-get remove --purge nvidia*

4) Once you are done with the steps above, reboot, stop the display manager and try to install nvidia drivers.
Press Ctrl-Alt-F1. Once you are in the text mode, stop the display manager. This will end all the applications, so you better close them yourself before completing this step.
To stop the display manager use the following command (for the xfce4):
sudo service lightdm stop
If you using gnome as display manager you must apply the following:
sudo /etc/init.d/gdm stop
If you using kde then use "kdm":
sudo /etc/init.d/kdm stop
and for other display managers:
sudo service gdm stop

4.1) Also you can hit:
sudo init 3

5) Now, run the driver package that you downloaded from Nvidia's website.
Note that it's better not to delete the installer after installation in case you want to uninstall it later.
sudo ./NVIDIA-Linux-x86-260.19.44.run
While installing will ask you if you want to create a /etc/X11/xorg.conf file. Choose yes. This will create a file with the default settings of nvidia driver but will also keep a backup of the existing xorg.conf called /etc/X11/xorg.conf.backup or /etc/X11/xorg.conf.nvidia-xconfig-original in case you want to restore it later...

5.1) If you choose no, after installation you can run in console:
sudo nvidia-xconfig
The command above will create an xorg.conf skeleton.

6) If you still get the error related to nouveau drivers then you are probably required to update the initramfs disk. Probably it might be configured to load the nouveau drivers. Don't reboot or poweroff, run this command to update the initramfs disk.
sudo update-initramfs -u

7) Now reboot and repeat the step 4. This time things should go smoothly.
sudo shutdown -r now

8 ) After installation you can run nvidia-settings to adjust your card settings:
sudo nvidia-settings
Reference Here...




Uninstalling

To revert the process and uninstall the nvidia driver you should do the following:

1) Open the terminal and go to /etc/X11/ in order to restore the backup file xorg.conf.backup
Write in terminal:
sudo mv xorg.conf.backup xorg.conf

2) Unblacklist the modules in blacklist.conf file.
sudo nano /etc/modprobe.d/blacklist.conf
Remove the following modules from the file then save and exit.
Nano is a text editor, you can use whatever fits your needs

blacklist amd76x_edac #this might not be required for x86 32 bit users.
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv


3) Press Ctrl-Alt-F1. Once you are in the text mode, stop the display manager. This will end all the applications, so you better close them yourself before completing this step.
To stop the display manager use the following command (for the xfce4):
sudo service lightdm stop
If you using gnome as display manager you must apply the following:
sudo /etc/init.d/gdm stop
If you using kde then use "kdm":
sudo /etc/init.d/kdm stop
and for other display managers:
sudo service gdm stop

3.1) Also you can hit:
sudo init 3

4) This will remove the driver module from the kernel:
sudo rmmod nvidia

5) Move in the place you previously downloaded the nvidia driver binary (for example cd ~/Downloads) and run:
sudo ./NVIDIA-Linux-x86-260.19.44.run --uninstall

6) Now reinstall the following modules because probably you will still have nvidia version of libgl(x) installed. Try:
sudo apt-get install --reinstall libgl1-mesa-glx xserver-xorg-core

7) Finally update the initramfs disk:
sudo update-initramfs -u

8 ) Restart you computer:
sudo shutdown -r now

Other References
http://us.download.nvidia.com/XFree86/Linux-x86_64/310.19/README/installdriver.html
ftp://download.nvidia.com/XFree86/Linux-x86/169.04/README/chapter-19.html
https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia

dante

hi, i just installed backbox in my alienware m14xr1 ( has gtx555m nvidia ). I try to install using your step above, and i fail. When i finish all your step then my screen resolution is bigger. And when i execute sudo nvidia-settings it said, i need to run nvidia-xconfig as root. But i already run it, and i saw the xorg.conf in the /etc/X11/ folder.

Can you please help me or give me advice please.

nXXo

This setup does work with dual card also optimus

weVeg

Guys,
look at the date please:  December 24, 2012

may be something has been changed?!?!?
una voce libera è sempre liberatrice
under_r00t

dante

yes something indeed changes. using bumblebee fix everything.  :) good to go now to use bbox as my daily OS.