Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
8  
any reason why you are not using the default additional drivers tab? askubuntu.com/questions/47506/how-do-i-install-extra-drivers – fossfreedom Apr 20 '14 at 9:53
3  
reason: I haven't seen that tag – Horst Seeger Apr 21 '14 at 8:10
1  
possible duplicate of Ubuntu 14.04: nvidia drivers cannot be installed – RockScience May 18 '14 at 5:30
    
@HorstSeeger, If your problem is solved you should check the correct answer. – Scotia 웃 Jul 3 '14 at 3:55
up vote 9 down vote accepted

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.

share|improve this answer
4  
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? – Horst Seeger Apr 21 '14 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 '14 at 6:56
6  
I once screwed up my system entirely by running "sudo apt-get install nvidia-something", too. NEVER DO THAT – matteo Aug 5 '14 at 19:08
1  
Do you mind to rephrase your answer ? nvidia-304 is not Ubuntu open source driver. – NikTh Oct 28 '14 at 10:28
3  
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 '15 at 15:11

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

or

    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)  

or

  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.

Note

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.

share|improve this answer
    
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 – Horst Seeger Apr 21 '14 at 8:17
1  
Nice guide, helped me a lot :) – BlackHawkDesign Aug 23 '14 at 15:24
3  
Is there any particular reason to use this answer and not the simple "additonal drivers tab" thing – user2618142 Aug 25 '14 at 14:51
1  
No reason at all! – Taz D. Aug 25 '14 at 16:18
2  
And in every kernel update, you will probably need to repeat the procedure. – NikTh Oct 28 '14 at 10:30

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.

share|improve this answer
    
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" – Aquarius Power Feb 22 '15 at 22:53

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.

share|improve this answer

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
/opt/cuda-6.0/bin:/opt/cuda-5.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

$ echo $LD_LIBRARY_PATH
/opt/cuda-6.0/lib64:/opt/cuda-6.0/lib:/opt/cuda-5.5/lib64:/opt/cuda-5.5/lib:
share|improve this answer

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.

Troubleshooting

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.

share|improve this answer
    
@karel Thanks. didn't notice that. – Rexford Oct 27 '14 at 0:25
    
Freezing of ubuntu, I came to learn is caused by my laptop mouse pad. Using external mouse, never freezes. – Rexford Oct 28 '14 at 0:56

Since most of these answers are outdated... here is the 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 reccomended 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 reccomended driver
    • $ sudo apt-get install nvidia-361
  5. restart your system
    • $ sudo reboot
share|improve this answer
    
You can see which driver versions are provided by going to launchpad.net/~graphics-drivers/+archive/ubuntu/ppa – Azmisov Jan 28 at 2:49

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.

share|improve this answer
1  
Can you please explain how to do that? – David Foerster Dec 23 '14 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 '15 at 16:26

protected by Community Dec 23 '14 at 19:14

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.