Install Nvidia Driver 334.21 in Ubuntu linux

Last updated: March 5, 2014

Nvidia 334.21 ubuntu

Nvidia has just announced the short lived branch driver 334.21 for Linux. This driver added support for the new GeForce GTX 750 Ti, GeForce GTX 750, GeForce GTX 745, and GeForce GTX TITAN Black.

Besides that, Nvidia 334.21 brings quite a few bug fixes, the first in the list is for a regression in the NVIDIA kernel module which caused it to improperly dereference a userspace pointer. This potential security issue was initially reported on the grsecurity forums. Check out the changelog for a complete list of fixes and improvements.

Install Nvidia 334.21:

1. To get started, press Ctrl+Alt+T on your keyboard to open the terminal. When it opens, run the commands below to remove the previous driver:

sudo apt-get purge nvidia*; sudo apt-get install nvidia-319-updates-dev

2. You may switch to the recommended open-source driver in “Software & Updates -> Additional drivers” utility after restarted your computer.

3. Download the driver from the official links below:

Nvidia 334.21 for 32 bit Linux

Nvidia 334.21 for 64 bit Linux

Nvidia 334.21 for 32 bit ARM Linux

4. Press Ctrl+Alt+F1 key combination on your keyboard to switch to command console and login.

5. Stop the graphic session with the appropriate command below:

sudo service lightdm stop     ## For the default LightDM

sudo service gdm stop     ## For the Gnome GDM

sudo service mdm stop     ## For the Linux Mint default MDM

6. Now give executable permission and start the installer, and finally follow the on-screen instructions to complete the process.

chmod +x ~/Downloads/NVIDIA-Linux-*-334.21.run && sudo sh ~/Downloads/NVIDIA-Linux-*-334.21.run

Tips: You may keep the installer file so that you can remove this driver via below command if for some reason this driver does not work properly:

sudo sh ~/Downloads/NVIDIA-Linux-*-334.21.run --uninstall

That’s it. Enjoy!

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

13 responses to Install Nvidia Driver 334.21 in Ubuntu linux

  1. Worked perfectly for me. I’m sure in distros coming this spring and summer this won’t be a problem. My distro is Linux Mint 16 and the version of Nouveau packaged with it simply will not work with the new GTX 750’s. These “Maxwell” cards are only a month old and I gues it’s the price we “early adopters” pay for buying them so soon after their release.

  2. Why are you not using the xorg-edgers ppa in Ubuntu? I think this is a much simpler method that will also upgrade many related display driver packages and will update the 334 driver automatically in the future.

    PPA info here: https://launchpad.net/~xorg-edgers/+archive/ppa
    and here: http://www.ubuntuupdates.org/ppa/xorg-edgers
    Package info here: http://www.ubuntuupdates.org/package/xorg-edgers/trusty/main/base/nvidia-graphics-drivers-334

    sudo add-apt-repository ppa:xorg-edgers/ppa
    sudo apt-get install ppa-purge
    sudo apt-get update
    sudo apt-get install nvidia-334
    sudo apt-get install nvidia-334-uvm

    Installing ppa-purge allows for proper downgrading of all packages from xorg-edgers (which you must do before upgrading to another release) with “sudo ppa–purge xorg-edgers” as noted here: https://launchpad.net/~xorg-edgers/+archive/ppa

    I first learned about this solution here: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-331/+bug/1287753

    Note that you could just as easily use this method for the new nvidia 337 beta driver which is also in the xorg-edgers repository: http://www.ubuntuupdates.org/package/xorg-edgers/trusty/main/base/nvidia-graphics-drivers-337

    Hope someone finds this useful.

    • Found this very useful in setting up my 2nd monitor. After I did it though, a notification pops up each time I log in saying: “System program problem detected. Do you want to report the problem now?”

    • Thanks a lot! Very convenient way! :)

    • I’m trying your method because for the life of me I can’t get these two GTX 750s to work.

      The intial method works until I actually try to install the driver, then I get a message saying the directories are bad and I should abort the install.

      With your method, I stall out at the “Get” commands, “Unable to locate package nvidia-334”

      Any idea what’s going on? I’m stumped and on a time constraint.

  3. I could not get the gtx 750 card to work. I am still new to Linux. Time to get the repair hammer out.

    • Use the open-source driver if you can’t get the proprietary driver working.

      sudo apt-get install nvidia-current

      You may also search and open “Additional Drivers” in dash to choose a driver to use.

      • I tried this, but after re-booting the screen goes black. I then un-plugged DVI from mobo and into GFX 1 and am treated to the command line…though it’s blury. I’ve logged into the command line and am now wondering how to boot the graphics back up. Any ideas?

        Trying to get two GTX 750s running on Ubuntu 14.04, having zero success so far.

  4. I got to the console process with Ctrl+all+F1 just fine and installed the driver. Problem was lighten wouldn’t restart and now I’m getting a nonGUI login screen that crashes to black moments after. Any recommendations?

    • Try to get into console via Ctrl+Alt+F2 and login, or reboot into recovery mode from Grub bootloader and drop into root.

      Then uninstall this driver via the command below:

      sudo sh /home/YOUR_USERNAME/Downloads/NVIDIA-Linux-*-334.21.run --uninstall

      Or remove it via apt-get command :

      sudo apt-get remove --purge nvidia-*

      And finally reboot:

      sudo reboot
  5. Hey there…..so it seemed like only doing step 1 solved my issues…is that possible? Or should I follow through with the rest of the steps?

  6. I too got this to work by just doing Step 1 and rebooting. Using Linux Mint 17. It worked in both MATE and Cinnamon.

    Awesome.

  7. Just wanted to confirm that Boyz method has worked very well for me in the past.

    I have just tested this method on a fresh Ubuntu 14 LTS install. One note is that the recommend drivers for the video card have changed from 334 since this post was written.


    sudo apt-get install nvidia-349
    sudo apt-get install nvidia-349-uvm