I recently installed 14.04.

But now I need a new driver for my nVidia GeForce GT 630. The former driver was rejected as not compatible with the 64-bit. I found that other driver and when I wanted to install it in the terminal with sh I was called first to stop the x-server. It cannot be installed with running x-server.

So how do I install them?


9 Answers 9


You can download the driver for your video card for Ubuntu 64bit from here. Assuming that you are using Ubuntu 64bit now. If you installed Ubuntu 32 bit, there is 331 version of the same driver for Ubuntu 32bit. Save your driver somewhere where you can easily access it, like your user home directory or inside a newly created nvidia directory in your user home directory.

To be able to install your nvidia driver you have to remove your previous video driver with this code in a terminal window:

    sudo apt-get remove nvidia* && sudo apt-get autoremove

After you finish with this one, you should also blacklist the nouveau driver by editing this file with either:

    gksudo gedit /etc/modprobe.d/blacklist-nouveau.conf


    sudo nano /etc/modprobe.d/blacklist-nouveau.conf

…and add these lines at the end:

    blacklist nouveau
    blacklist lbm-nouveau
    options nouveau modeset=0
    alias nouveau off
    alias lbm-nouveau off

If, by any chance, there is no blacklist-nouveau.conf present in /etc/modprobe.d/, you can save your file as blacklist-nouveau.conf when prompted.

And you can also disable the Kernel Nouveau by typing these lines in a terminal window:

    echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf

and after that

    update-initramfs -u

Now you can reboot your computer, and when you get to the login prompt, press Ctrl+Alt+F1 to exit to the terminal console. Login with your username and password.

Go to the directory where you saved your nvidia driver using the command cd in the terminal console. Eg. cd nvidia considering that you are already in your user home directory after you login. You can use command dir to be able to see your exact driver's name.

To stop your display manager or the X server, you can type in the console this code:

   sudo stop lightdm   or

   sudo lightdm stop

If you are not using lightdm as your default display manager (DM), replace lightdm with your default display manager, which can be either kdm or gdm or whatever your display manager is.

You should get a message in the terminal console saying --> lightdm stopped/waiting

And now you can finally install the nvidia driver using a code similar to this one:

  sudo sh NVIDIA-Linux-x86_64.....run    (for Ubuntu 64bit)  


  sudo sh NVIDIA-Linux-x86.....run    (for Ubuntu 32bit)

If you don't type the exact name of the driver, you'll get this message: NVIDIA-Linux... could not be found and you should type again the code for installing the driver.

Nvidia installer automatically installs the driver, and at the end it will ask you whether you want to save your new X configuration. Press Yes. After reboot and getting to your desktop and changing your NVIDIA settings as you please you should open a terminal window and type in this code:

  sudo nvidia-xconfig

to save your new nvidia configuration in /etc/X11/xorg.conf.


You might need to install some extra software packages if nvidia installer gives an error and prompts for missing dependencies:

    sudo apt-get install dkms fakeroot build-essential linux-headers-generic

But you need to install all these missing packages only if nvidia-installer can't do the job by itself.

It can happen that after reboot your system shows a black screen or enters the low graphics mode. To fix this you should exit again to the console terminal, login with your username and password, and use the code provided above sudo nvidia-xconfig and also make use of the following tutorial. It is meant to fix the greeter assuming that they haven't fixed this bug in Ubuntu 14.04.

  • Thanks for that clear explanation. Maybe I should have followed it. But I went the simpler way as you see above. Now I need a way to make Unity and Gnome running again Apr 21, 2014 at 8:17
  • 1
    Nice guide, helped me a lot :) Aug 23, 2014 at 15:24
  • 3
    Is there any particular reason to use this answer and not the simple "additonal drivers tab" thing Aug 25, 2014 at 14:51
  • 1
    No reason at all!
    – Taz D.
    Aug 25, 2014 at 16:18
  • 2
    And in every kernel update, you will probably need to repeat the procedure.
    – NickTux
    Oct 28, 2014 at 10:30

Since most of these answers are outdated... Here is modern way to install the nvidia drivers for Ubuntu (for 14.04 and newer):

  1. Add the graphics-drivers ppa

    sudo add-apt-repository ppa:graphics-drivers/ppa
    sudo apt-get update
  2. Install the recommended driver

    sudo ubuntu-drivers autoinstall
  3. Restart your system

    sudo reboot

To select a different driver, or if the above doesn't work:

  1. Add the graphics-drivers ppa

    sudo add-apt-repository ppa:graphics-drivers/ppa
    sudo apt-get update
  2. Purge any existing nvidia related packages you have installed

    sudo apt-get purge nvidia*
  3. Check which drivers are available for your system

    ubuntu-drivers devices
  4. Install the recommended driver

    sudo apt-get install nvidia-361
  5. Restart your system

    sudo reboot
  • 2
    You can see which driver versions are provided by going to launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
    – Azmisov
    Jan 28, 2016 at 2:49
  • Thank you so much! This issue was driving me nuts and this post helped me much more than my psychiatrist tried to. Aug 3, 2016 at 14:56
  • This is the best answer right now. Aug 6, 2016 at 3:15
  • Works well on 16.04. I already disabled the nouveau drivers, however, so I don't know if that was a factor in my success Aug 28, 2016 at 1:55
  • 1
    I've looked at many answers on this website and I have tried several of them. As of 2016 December, in my opinion, this is the best answer.
    – H2ONaCl
    Dec 22, 2016 at 0:53

You can install Ubuntu drivers , for GT 630 you can use: sudo apt-get install nvidia-304 OR sudo apt-get install nvidia-304-updates, not both.

  • 5
    As I say: I followed your advice to use that line. result: ubuntu bootes till the red screen with Ubuntu 14.04 LTS down left and the mouse pointer works but nether Unity nor Gnome appears. Before at least Unity was working without letting me change the background. It was also just read but with all icons and the launcher. Gnome was working completely. Now there is just that red background without anything accessable. How to go on now? Apr 21, 2014 at 8:12
  • 1
    In this situation you can use Ctrl+Alt+1 and use ubuntu in text mode, if it blocks you can switch to 2 by Ctrl+Alt+2. The number 7 is the desktop and the number 8 is the log screen.
    – L.V.A
    Apr 22, 2014 at 6:56
  • 8
    I once screwed up my system entirely by running "sudo apt-get install nvidia-something", too. NEVER DO THAT
    – matteo
    Aug 5, 2014 at 19:08
  • 2
    Do you mind to rephrase your answer ? nvidia-304 is not Ubuntu open source driver.
    – NickTux
    Oct 28, 2014 at 10:28
  • 4
    Your answer is a bit misleading: one should either do sudo apt-get install nvidia-304 or sudo apt-get install nvidia-304-updates not both. Afaik, they're different packages of the same driver, -updates being slightly ahead.
    – user25588
    May 28, 2015 at 15:11

Here's what I do (via PPA):

I add a xorg-edgers PPA first:

sudo add-apt-repository -y ppa:xorg-edgers/ppa

Then I either install from command line or from additional drivers section.

First, update your package list:

sudo apt-get update

Additional drivers are now updated with newer packages.

And alternatively, from terminal, install nvidia-331 (for v331), nvidia-337 (for v337) or nvidia-current (for very recent version).

After installing, don't forget to logout or reboot, and log back in.

  • on this line, some more useful info here, according to it, you can install more than one driver version and select it with Synaptic at "Settings > Repositories > Additional Drivers" Feb 22, 2015 at 22:53
  • you should use the graphics-drivers ppa rather than xorg-edgers Apr 3, 2016 at 11:42
  • @CoreyGoldberg This answer is almost 2 years old, an answer here already suggests the new ppa: askubuntu.com/a/700613/107722
    – Arda
    Apr 3, 2016 at 12:41
  • exactly... my comment just pointed out that this answer is out of date and you should use graphics-drivers ppa these days Apr 3, 2016 at 14:19
  • 1
    @Arda btw, the answer you linked to was mine Apr 3, 2016 at 14:20

I'm using geforce gt820m.

I have tried almost all the suggestions above, but none worked for me. However, combining what I learned from above with other many online resources like here, This is how I went about mine.

You'll eventually end up with something like this, should you follow these steps.

What I had

First of all, reset everything to default. How?

Uninstal any nvidia things

sudo apt-get --purge remove nvidia*

Blow xorg Edgers ppa away

In your "Other Softwares" tab, uncheck the Xorg Edgers PPA, to look like in below image. That ppa caused me so much pain than good.

Uncheck xorg edges ppa in

Then allow the packages to be updated when prompted to or let ...

sudo apt-get update

...do the rest.

Its about time

Go back to additional drivers, and you should see only one Nvidia binary listed (at least for my card, that's what was listed, instead of the two that showed when the xorg edges ppa was active )

What was/is the difference? The drivers showed by the xorg edgers ppa are open source. The one which now shows has the indication proprietary. In this case, proprietary rocks, so please go with it, unless you wanna mess your head around for the next hours without success.

Switch from the x.org x server to the nvidia binary and apply. It should take a bit of time to apply (it took a bit of time on my end here, and I realized it downloaded some packages in the process). Restart your computer when its done.


If you added anything different from the default to either /etc/default/grub or have made changes to /etc/X11/xorg.conf , please reset them to their defaults. You should be smart to know what you added and take it away.

After reverting all your changes to these two areas, please update these:

sudo update-initramfs -u
sudo update-grub

The above two commands will ensure the changes you made to the above file, especially the one in /etc/default/grub is applied on next reboot. Failing to apply the update commands kept me stuck with whatever changes I made to the grub file, even after reboots.

For the xorg.conf file, you can delete it from that folder (you're free to make a backup of it)

If you are not seeing a good resolution, be sure to do

sudo nvidia-xconfig

Restart your PC then.

If you're feeling excited, you can delete nouveau from your PC by simply

sudo apt-get remove xserver-xorg-video-nouveau

I won't recommend you remove the nouveau, but I did though :P

Doing the steps above got me up and running again with nvidia driver after several hours of try and error.

Any Issues?

Yes. For some reasons I do not know yet, running many applications causes the PC to freeze. Ctrl + Alt + F1 gets me the chance to re-spawn the lightdm, but why the freeze happens is a mystery for me now. Any assistance is much appreciated.

  • 1
    @karel Thanks. didn't notice that.
    – KhoPhi
    Oct 27, 2014 at 0:25
  • Freezing of ubuntu, I came to learn is caused by my laptop mouse pad. Using external mouse, never freezes.
    – KhoPhi
    Oct 28, 2014 at 0:56

You can install additional drivers for nVidia graphics adapters (and for other hardware) with ubuntu-drivers-common (formerly jockey). Apparently hardware detection and driver management is now done through a command-line interface:

sudo ubuntu-drivers autoinstall

For details see https://askubuntu.com/a/9465/175814.

  • "autoinstall is deprecated", "install" is recommended instead
    – Alkanshel
    Oct 21, 2022 at 21:05

I have had a lot of issues with NVIDIA and Ubuntu 14.04. But eventually, I managed to install it. I have Acer Aspire laptop with Nvidia GeForce 820M.

Here how it goes:

  • Install nvidia-331. I did it through Synaptic Package Manager. But I guess

$ sudo apt-get install nvidia-331

will work as well. I did NOT perform sudo apt-get install nvidia-331-updates. I did NOT perform any additional disabling of the nouveau driver.

  • Then I rebooted the system.

  • I have downloaded cuda_5.5.22_linux_64.run from NVidia web page and extracted to separate files:

    $ chmod 755 cuda_5.5.22_linux_64.run
    $ ./cuda_5.5.22_linux_64.run -extract=/home/user/Downloads/cuda-5.5
    $ ls 
    cuda-linux64-rel-5.5.22-16488124.run    NVIDIA-Linux-x86_64-319.37.run cuda-samples-linux-5.5.22-16488124.run
    $ sudo sh cuda-linux64-rel-5.5.22-16488124.run
    $ sudo sh cuda-samples-linux-5.5.22-16488124.run
  • Then I compiled 1_Utilities/deviceQuery and it worked. And then I compiled the 0_Simple/matrixMul and it worked as well. Be sure to set $PATH and $LD_LIBRARY_PATH.

I have tried to follow the same path with cuda 6.0. Although deviceQuery compiled, it failed to execute:

$ ./deviceQuery 
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 3
-> initialization error
Result = FAIL

$ echo $PATH


if you're stuck offline, but can access 3rd-party internet, you can always download your driver as a .run file from the Nvidia website.

you'll have to stop lightdm to install, which isn't hard:

  • use Ctrl + Alt + F1 and login to the terminal environment
  • sudo service lightdm stop
  • cd *directory of .run file*
  • *drivername*.run after following the setup procedure, this will take you back to your desktop:
  • sudo service lightdm start

you may not have to restart, though it's recommended you do.

I also recommend using the proprietary drivers over nouveau.
In my experience, nouveau can't do multi-monitor at 1600x1200, but can only do single monitor at 1280x1024 max for my Galaxy Nvidia GeForce GT430.
Not to mention very poor gaming FPS.


You should try the nouveau driver with bumblebee. I got stuck with it because for some reason, in ubuntu gnome 14.04.1 amd64, installing any nvidia proprietary driver has the result of gnome shell being unable to load successfully. Although, if you use optirun glxspheres64 or primusrun glxspheres64 the fps is very low, in games it appeears to be vary robust. I play NFS World and WOT and the performance is quite better than using nvidia 331 with bumblebee.

  • 1
    Can you please explain how to do that? Dec 23, 2014 at 15:38
  • Been on Vivid for a while, but have been running proprietary nvidia drivers for years. Pretty sure they usually worked fine with any desktop environment including Gnome.
    – Nephente
    Oct 4, 2015 at 16:26
  • Coming here from a long time, I had many nasty issues with Ubuntu over the years, right now I am on Fedora 23, and they mention in documentation that bumblebee+nouveau + gnome-shell does not work with gdm. This was the problem two years ago, and I had it. It's also hardware dependent (my laptop has some issues). As of installing nouveau, you should uninstall: <pre> sudo apt-get purge bumblebee* nvidia* primus*<code> and then install this way: <pre> sudo apt-get install bumblebee nouveau primus virtualgl <code> Apr 20, 2016 at 14:00
  • There are 2 things I can confirm: nouveau was stable, but did not implement hardware acceleration verry well. So you may have found yourselves in the position that you wanted to play Steam Games with a config like mine (Intel Core I7 3610 QM 2.30GHz, Nvidia 610m, and got the same performance as with intel gpu. If you'd wanted stable, if you'd wanted free, nouveau was fine. If you'd wanted performance you should have gone with NVidia Apr 20, 2016 at 14:21
  • About installing nvidia on ubuntu: there are 2 options: nvidia-prime with allows switching cards with the cost of log out -> log in, and bumblebee + nvidia that offers less performance in theory. I am more of a bumblebee fan because I don't have to log out. In my case nvidia-prime would cause severe tearing whilst bumblebee does not. Using bumblebee with primus and VGLTransport=proxy seems the best choice in respect to performance. I am not using Ubuntu for quite a while and I would mention that this is my personal choice and I won't comment on it. Apr 20, 2016 at 14:29

Not the answer you're looking for? Browse other questions tagged .