How to install nVidia graphic driver in Ubutnu/Kubuntu

ubuntuhowto | 11.4.10 | 10 comments

Hello again,

In this post i will try to explain how in a very simple way you can install your nVidia graphic driver. Even i am quite aware that a lot of newbies are shaking when they need to install something using Terminal or Konsole i will give you perfect tutorial on how you can do that in a few simple steps. It is important to say that this tutorial is for both Ubuntu and Kubuntu with a difference that in Ubuntu you are using Terminal and in Kubuntu you will use Konsole.



It is also important to know that you can install graphic driver with you Hardware Drivers program where you will mostly just pick recommended driver which will be installed automatically and only thing you have to do is to reboot your system.

Naturally you will wonder why do we install nVidia driver with Terminal and Konsole if we have GUI for that. The answer is simple, because in the repositories you can get only the drivers which Ubuntu supports and that driver is usually older then the one on the nVidia offical website.

It is also important to know that it is not compulsory to have latest drivers but if you want that little extra then you need them.

Step 1.

Download newest nVidia driver from here. You will do that by picking your model and version of your Linux OS (32bit or 64bit). Download your file on your Desktop.

Step 2.

Hit CTRL+ALT+F2 and your desktop will disappear and you will see new black screen with bottom line blinking in expectation that you will type your username and just after that your password.

Step 3.

In order not to let down blinking bottom line, type username, hit ENTER and then type your password and hit ENTER again. If you wonder why your password does not appear i will just say that it should be like that. Just type it correctly and do not worry.

Step 4.

Now you are logged in and since you are also logged in on other desktop we will need to stop all activities from there so we could successful driver installation.

If you use Ubuntu type following line:

sudo /etc/init.d/gdm stop

If you use Kubuntu type following line:

sudo /etc/init.d/kdm stop


Step 5.

In previous step we have stopped all graphical activities on your system and now we need to uninstall old nVidia driver. In the case that you are installing nVidia graphic driver for the first time skip to next step.


Type:

sudo nvidia-uninstall 


When you have done that type:


sudo reboot

This will reboot your system which once upon the reboot will show you black screen again (terminal) where you again need to type username and password like i explained in the step 3.


Step 6. 


Now you are logged in again and we have just one final step to install nVidia video driver. I presume that you have downloaded your driver on Desktop as i suggested.


Pay attention to big and small letters since Terminal is case sensitive. Type exactly what i am saying! :)


Type:


cd Desktop


Type:

ls

This command will list you all files and folders on your desktop where you will see your driver file which always begins with NVIDIA-Linux-...

Type:

sudo sh ./NVIDIA-Linux-x86_64-195.136.15-pkg2.run


*Notice that version might be newer than this one so type file name of the driver you have downloaded. Little trick is when you start typing NVIDIA hit tab button on your keyboard and Terminal will automatically finish the name of your file! :)

Step 7.

Now your have started installation process and you should see some blue screen where nVidia is asking if your agree with it's policy. Hit Accept because Do Not Accept will kick you out of installation. :)

Then another blue screen will be prompted and it will ask you:

Install NVIDIA's 32-bit compatibility openGL libraries?


Hit Yes.


This will prompt another blue screen with the following very long question:

Would you like to run nvidia-xconfig.....

Hit Yes.


When process is finished hit ok and you will be returned to Terminal (black screen).

Step 8.

Type:

sudo reboot


After reboot you will be sent to your log in screen and you will see significant difference. :)

That is it. Simple as 1,2,3...

Thank you for reading this post.

Category: ,

Saša Rakezić: My name is Saša Rakezić. Known as Raka. I'm administrator of www.ubuntu-hot-to.com. Enjoy your stay and come again.

10 comments

  1. Anonymous says:

    Had to reinstall the old Nvidia driver to get CTRL ALT F2 to work. And now it won't accept sudo /etc/init.d/gdm stop

  2. Anonymous says:

    Instead of sudo /etc/init.d/gdm/stop I used simply sudo gdm stop. It worked for me. Now OpenGL works again.

  3. Instead of using sudo /etc/init.d/gdm stop you can also use sudo service gdm stop

  4. adam says:

    Thanks for a useful howto. Just a few things though (on an Nvidia GeForce GT 220M 1GB) running Ubuntu Lucid.

    1) CTRL ALT F2 only works with an old Nvidia driver already installed

    2) After uninstalling the old Nvidia driver, the system reboots to the desktop and then CTRL ALT F2 won't work.

    3) "sudo /etc/init.d/gdm/stop" does not work, however both "sudo service gdm stop" and "sudo gdm stop" seem to work fine.

    4) After updating Ubuntu, it reverts to "Low graphics mode" on the old drivers and I have to go through this process again to take advantage of my graphics card. This is the most crucial problem to me, I would love to find a way to make this fix permanent.

  5. Unknown says:

    This comment has been removed by the author.

  6. Adam,

    1) CTRL+ALT+F2-F7 is a standard combination for Ubuntu, and i believe for other Linux based distribution, with which you are calling different desktops/terminals. There are six of them and they are not related anyhow with nVidia drivers. It might be some error on your system.
    2)That is right, before it was returning into KDM normally but lately it is going in terminal only and in that case you do not need to hit combination CTRL+ALT+F2
    3)command sudo /etc/init.d/gdm/stop does not exist but only the other two. If i have put it somewhere in the text that is by mistake and i will immediately review that.
    4)I have noticed the same you are talking about. That is why i have decided to install drivers from "Hardware drivers" program and not from terminal. Simply by checking latest drivers option you will get almost newest drivers. Before drivers there were very old but in Lucid Ubuntu is updating it more often. I also read somewhere that 195.36.24 has some problem with Kernel compatibility so maybe part of the problems is there.

    Thank you for comment.

  7. Lescar says:

    Isso não funcionou pra mim...todos os passos foram feitos, mas no final o sistema perguntou se queria reiniciar o X, reconfigurar Graficos, etc...
    Alguem tem uma solução para a placa NVIDIA GT330m?

  8. ISILETH says:

    I would like to thank you with the bottom of my Ubuntu Heart.
    I've been trying without success to install the Nvidia Driver on my Sony Vaio All-in-one, even with the help of half the Ubuntu world.
    Now I am writing from my Ubuntu installation that actually works.
    THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  9. You welcome. Always pleasure to help. Did you try to install nVidia drivers from your Hardware Drivers program? In 10.10 it is much much better.

  10. ISILETH says:

    Before using your solution I tried the install from the hardware driver program and I only got a black screen.
    I also had problems in going into recovery mode.
    I tried many times to fix the thing, but the instruction I found didn't help.
    I asked for help and also was unsuccessful.
    I think that Nvidia released better driver recently.
    One thing that helped was the advice to use another command to stop the gdm, because I recall that I had problem with that the first time I tried to use the Nvidia file from their site.
    I also tried different distros to use my computer with Linux, but I do prefer Ubuntu.
    Thank you once again.