NVIDIA has been the target of many attacks by the free software, And all of us who follow closely the news of our favorite operating system will remember the insults that Linus Torvalds himself addressed to him at the time. No one disputes whether both in this case and others were well-founded or not, the truth is that luckily for those who prefer to have all the free software possible there is the option to use Nouveau drivers.
These as we know have improved a lot, but sometimes it is unfortunate to have to resort if or if to the official drivers for reasons of this extra performance margin they can come to offer us. So in this post we will see how to install NVIDIA proprietary drivers on Ubuntu, So first let’s check what is the graphics card model we have in our system.
We open a terminal window (Ctrl + Alt + T) and run:
lspci | grep VGA
And after that we have to see something like:
02: 00.0 VGA compatible controller: NVIDIA Corporation GT215 [GeForce GT 240] (Rev a2)
In my case, the graphics card that my computer has is the NVIDIA GeForce GT 240. Perfect, then we will install the linux-headers-generic package, which will install the header files of the kernel version we have installed:
sudo apt-get install build-essential linux-headers-generic
That done we go to the NVIDIA download page, which is on http://www.nvidia.es/Download/index.aspx?lang=es, And there we selected the driver for our card. In my case, with the information obtained before I searched among the options; I would have something like what is seen in the image above in this post and once I have this I click on ‘Search’, after which we will finally have access to the page from which we can download the drivers for our card.
Once we have the drivers on our computer we go to the downloads folder and run it, the file is something of the type ‘NVIDIA-Linux-x86_64-340.76.run’. It is a script file and the part that says ‘-340.76’ will vary according to the version type. Well, we have to run this script but for that we have to give it permission to run:
its chmod +755 NVIDIA-Linux-x86_64-340.76.run
Now let’s add the Nouveau driver to the Blacklist of kernel modules, to prevent it from loading at system startup:
sudo gedit /etc/modprobe.d/blacklist.conf
And we add at the end of the file the line:
Then what we will need is to uninstall all the graphics driver packages that came with our Ubuntu installation. That’s why we run:
sudo apt-get remove -purge nvidia *
sudo apt-get remove -purge xserver-xorg-video-nouveau
Now open a new console window (Ctrl + Alt + F2), log in and enter the following:
its /etc/init.d/lightdm stop
With this we end the graphical environment, and once we have done we restart the computer:
This time, when the system starts we will receive a warning that will alert us to that Ubuntu is running in low resolution mode, Which we must accept. Next, we’ll get several alternatives for booting, and what we need to do is select the one that says “Log in to console mode”. We return to a login like the one we saw in the previous step, and this time after entering our data we will run the installation script of the NVIDIA drivers:
sudo sh NVIDIA-Linux-x86_64-340.76.run
Start the installation, and the most practical and safe is to click on “Yes, I accept” all of them, and when finished restart the graphical environment:
its lightdm start service
Now we can log in to the graphical environment, all we have to do is run the “NVIDIA Server Configuration Settings” tool, where in the NVIDIA X Server Settings or X Server Display Configuration option we will save the configuration to a file by clicking “Save to X Configuration File”. That’s it, now we are ready and using the best NVIDIA options for our system.