NVIDIA Drivers installer script

NVIDIA Drivers installer script

With the thousands of commands available for the command line user, how can you remember them all? The answer is, you don’t. The real power of the computer is its ability to do the work for you. To get it to do that, we use the power of the shell to automate things. First we test, second we write and then we provide.

Our nVIDIA Installer script is a collections of commands that are stored in a file. The shell can read this file and act on the commands as if they were typed at the keyboard. This is the very early beta of this script, and soon enough there will be a GUI version with lot’s of features.

Please notice that our script works only with Ubuntu. No other Linux distributions are supported.


After you download the tar.gz file just right click and unzip it. The executable is the nvidia_installer.sh

How to use Nvidia Installer

  1. Just open a terminal (Ctrl + T)
  2. type sudo -i
  3. hit enter and provide your password to become admin
  4. “drag n’ drop” the nvidia_installer.sh executable to the terminal
  5. hit enter to run the script

– Remove opensource drivers (if any)
– Remove nvidia proprietary drivers (if any)
– Blacklist and remove modules (if any)
– Remove X-Swat PPA
– Update
– Upgrade
– Install nvidia latest proprietary from Xorg-edgers PPA
– Checks for sources integrity bug
– Reboots your PC

Try it 😉

If you want to hack the code, just clone the repository

git clone git://github.com/ubuntuxtreme/Nvidia-installer.git

If you have any issues please report them here:


47 responses to “NVIDIA Drivers installer script”

  1. not working, explain us how you run it please, i even ran it as root but it just doesn’t install the driver, only looks for what gpu i have…… exactly how will u know what gpu i have cause i don’t have any driver at all yet ( just installed ubuntu 12.04)

  2. Hey, I tested again on Ubuntu 12.04 and Linux Mint 13. The changed script does not seem to be working at all. The ASCII header looks altered at the beginning – then the script gives an error. You’re great to be making an effort with these crazy drivers!

  3. thanks for this script – makes life easier, any ideas how I can fix the sound?
    Ubuntu 10.04
    Gigabyte Nvidia GT 610
    Nvidia Driver Version: 304.43

  4. Thank you Pano! You saved me (Με έσωσες). I had a problem to load Ubuntu after I updated Ubuntu 12.04 and changed the additional drivers. Don’t ask me which one I don’t remember. Now Ubuntu is back!
    One question Pano. I can’t change the resolution. It gives me only 1440X900 (16:10) . I have an Acer laptop. Is there any solution?

      • In my case there is only auto and 1440×900. Everything else has gone. I can’t remember which driver I had before and worked fine. Before the updates 2 month ago everything was ok.
        Anyway that was a first step to have ubuntu back

          • Hi Panos! I had some difficulties and now I found time. Can you help me to add extra resolutions manually? Should I see before from windows which resolutions my laptop supports? I believe that I have to change something in xorg.conf file you mentioned.

            This is the file

            # nvidia-settings: X configuration file generated by nvidia-settings
            # nvidia-settings: version 295.33 (buildd@allspice) Fri Mar 30 13:37:33 UTC 2012

            Section “Monitor”
            Identifier “Monitor0”
            VendorName “Unknown”
            ModelName “TV-0”
            HorizSync 28.0 – 55.0
            VertRefresh 43.0 – 72.0

            Section “Screen”
            Identifier “Default Screen”
            Device “Default Device”
            Monitor “Monitor0”

            Section “Screen”
            Identifier “Screen0”
            Device “Device0”
            Monitor “Monitor0”
            DefaultDepth 24
            Option “TwinView” “1”
            Option “TwinViewXineramaInfoOrder” “DFP-0”
            Option “metamodes” “TV: 1024×768 +1440+0, DFP: nvidia-auto-select +0+0”
            # Removed Option “TwinViewXineramaInfoOrder” “TV-0”
            SubSection “Display”
            Depth 24

            Section “InputDevice”
            Identifier “Keyboard0”
            Driver “kbd”

            Section “InputDevice”
            Identifier “Mouse0”
            Driver “mouse”
            Option “Protocol” “auto”
            Option “Device” “/dev/psaux”
            Option “Emulate3Buttons” “no”
            Option “ZAxisMapping” “4 5”
            # generated from default

            Section “ServerLayout”
            Identifier “Default Layout”
            Screen 0 “Screen0” 0 0
            InputDevice “Keyboard0” “CoreKeyboard”
            InputDevice “Mouse0” “CorePointer”
            Option “Xinerama” “0”

            Section “Device”
            Identifier “Default Device”
            Driver “nvidia”
            Option “NoLogo” “True”
            Option “RandRRotation” “on”

            Section “Device”
            Identifier “Device0”
            Driver “nvidia”
            VendorName “NVIDIA Corporation”
            BoardName “GeForce 9500M GS”
            Option “NoLogo” “True”

            Can you please write the exact change that I have to make? I am not so good in Linux.

            Thanks a lot

          • Hi Pano! can you please see my post once again and help me how to add extra resolutions manually by editing xorg.conf?

  5. I’ve been in troubles for a long week with my NVIDIA 8600M GS !! Official drivers seemed to function well but ooppps, OpenGL never worked. I was unable to execute glxgears to perform a simple test, nor glxinfo… Also, I’m batlling with a Notebook with the Local Display (LCD) crashed, so I had to quit de LCD and proceed with a fresh ubuntu (12.04) server because Xorg was unable to load at first. After battling a little against unity, stopping lightdm, rescuing gdm, I had a full operating graphic mode and gnome-classic running on it… but NVIDIA was struggling me about OpenGL. Many thanx for your script! Its been like founding a lifeboat in the midle of the pacific ocean. Really! Oh, NOUVEAU drivers were the ones that saved me. They are not the best in performance, but they really work!

  6. Hi Panos,
    Thanks for the help. However after running your script, x server is working and
    lshw -c video shows
    configuration: driver=nvidia latency=0
    modinfo nvidia shows
    filename: /lib/modules/3.2.0-31-generic/updates/dkms/nvidia.ko
    alias: char-major-195-*
    version: 304.51
    supported: external
    license: NVIDIA
    Looks good…
    But I don’t have the NVIDIA shortcut in the menu to setup the configuration.
    Do I need to open “Additional Drivers” and activate
    “NVIDIA binary Xorg driver, kernel module and VDPAU library” ?

    I tried but it failed.

    BTW, I have 2 entries in this “Additional Drivers” with the same name.
    One has
    See /usr/share/doc/nvidia-current/README.txt.gz for a complete list of supported GPUs and PCIIDs
    and the second has
    See /usr/share/doc/nvidia-current-updates/README.txt.gz for a complete list of supported GPUs and PCIIDs

    If I look at
    /usr/share/doc/nvidia-current, NVIDIA_Changelog.gz file says
    2012-09-11 version 304.48
    For the second entry there is no directory.

    Thank you to advice how to setup the driver.

      • Thanks a lot.
        sudo apt-get install nvidia-settings
        Reading package lists… Done
        Building dependency tree
        Reading state information… Done
        nvidia-settings is already the newest version.
        nvidia-settings set to manually installed.
        0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

        Nothing added.
        I added the shurtcut in the menu.

        BTW, when I try manually to install the driver, after commands uninstall, remove, purge all the NVidia drivers and reboot in nouveau driver, I alway had 2 entries in the “Additional Driver” with the previous not deleted version.
        Your script seems to have the same behaviour. Maybe, you could add some commands to completely remove that?

        Second suggestion: When the script is downloading the driver, depending of the Internet speed, it can take long time. You could add a sentence to inform or better (but more expensive) a progression scale.
        Thanks again for your help

          • Just tried to play streaming video and the colors are still bad.
            NVidia should have fix that !!!
            lshw -c video says
            configuration: driver=nvidia latency=0
            modinfo nvidia
            ERROR: modinfo: could not find module nvidia

            I changed to the new driver to correct that. No luck…
            Any idea?

  7. This script failed on my ws having k5000m card. Following is the error message:

    -e e[0m
    -e Let me identify your GPU…
    X Error of failed request: BadRequest (invalid request code or no such operation)
    Major opcode of failed request: 136 (GLX)
    Minor opcode of failed request: 19 (X_GLXQueryServerString)
    Serial number of failed request: 12
    Current serial number in output stream: 12
    X Error of failed request: BadRequest (invalid request code or no such operation)
    Major opcode of failed request: 136 (GLX)
    Minor opcode of failed request: 19 (X_GLXQueryServerString)
    Serial number of failed request: 12
    Current serial number in output stream: 12
    X Error of failed request: BadRequest (invalid request code or no such operation)
    Major opcode of failed request: 136 (GLX)
    Minor opcode of failed request: 19 (X_GLXQueryServerString)
    Serial number of failed request: 12
    Current serial number in output stream: 12
    X Error of failed request: BadRequest (invalid request code or no such operation)
    Major opcode of failed request: 136 (GLX)
    Minor opcode of failed request: 19 (X_GLXQueryServerString)
    Serial number of failed request: 12
    Current serial number in output stream: 12
    -e e[1;32mVideo Card:e[0m
    -e Vendor:
    -e GPU:
    -e Driver in use: i915
    -e Driver version:
    -e Direct Rendering:
    nvidia_installer.sh: 363: [: i915: unexpected operator
    nvidia_installer.sh: 384: [: i915: unexpected operator
    nvidia_installer.sh: 413: [: i915: unexpected operator

    • I had the same problem however I found that although ultimately the scipt failed it did at least run when I used sudo ./nvidia_installer.sh it looks as though you may have tried to install as user root.

  8. Ok. I feel like a complete idiot and probably am. Directions seem simple enough, but when I drag and drop the installer.sh file to terminal after obtaining root through sudo -i, all it says is that my repository integrity is ok, what driver I am using, then awaits command prompt. I’ve already tried about command related to the tasks the program is orientated to, nothing works, and I’m lost. Somebody help the ADD guy please…

    • The script need a fast internet connection because it download and install several packages in the background. Just run the script and wait until:
      1) it reboots
      2) or exit to the command prompt (probably something went wrong).

      • I do have a pretty slow internet connection, but that is exactly what is happening every time: It exits to the command prompt. I have ensured that it has the permissions specified in the video, re-downloaded the program, tried it with sudo, sudo bash, and sudo i. I also purged all nvidia software and it still didn’t work. I’m still kind of a newb when it comes to Linux, and I experiment with the system a lot. I probably screwed something up, though I haven’t been having any other problems :shrug:

  9. i have a problem, when a start the script, it identify my gpu, but he show’s me GPU:

    Video Card:

    Vendor: Intel Open Source Technology Center

    GPU: Mesa DRI Intel(R) Sandybridge Mobile x86

    Driver in use: nouveau


    Driver version: 3.0 Mesa 9.0

    Direct Rendering: Yes

    But i have an Nvidiacard GeForce GT 630M. 🙁
    My ubuntu 12.10
    Why he doesn’t show up?

    Sorry for my gramatical errors…

    • You have probably a CPU with integrated GPU. The script recognizes your active GPU not all available ones. For that use the lspci command.

      To only see your graphical controller units type:

      lspci | grep VGA

      You should get two results.

  10. I have a problem with my GPU’s drivers so I tried this tool…and well, it seems like the OS can’t really manage two GPU’s (integrated Intel and NVidia) (In other words: I am a newb to Linux and I know shit about it so I blame it on the OS! ^_^ )

    Help? 😀

  11. Wonderful time saver – worked fantastic for me on my Dell Latitude D620 with Linux Mint 14 Mate installed.
    Bob in San Antonio

  12. I just tried the script on a newly installed 12.10. By default linux-headers-generic is not installed and dkms won’t compile/install the module without this package.

    Please add the installation of the package linux-headers-generic to the script.

  13. I’ve been trying to get the nvidia drivers to work on my laptop with a GeForce GT 525m, and jockey always say that no proprietary drivers are in use on the system, give a choice of four or 5 drivers, and for one of them says “This driver is activated but not currently in use” After about a day of struggling I tried this script, and for some reason I never get to the point where the script asks me what I want to do. It just says:

    Let me identify your GPU…
    Error: couldn’t find RGB GLX visual or fbconfig
    Error: couldn’t find RGB GLX visual or fbconfig
    Error: couldn’t find RGB GLX visual or fbconfig
    Error: couldn’t find RGB GLX visual or fbconfig
    Video Card:
    Driver in use: nvidia
    Driver version:
    Direct Rendering:

    Any idea how to get past this? Googling the error doesn’t come up with anything relevant…

  14. I love you. LOL. No seriously, you saved my linux mint installation. I spent two weeks working on this and then I found your script. My computer is now running beautifully and I have full graphics. Thank you! Thank you! Thank you!

  15. Hi Panos! Your work is awesome! I installed latest dev-version of my driver! Now, i feel that I bought new graphic card =) Thanks!

  16. System Intel 4 core CPU 4Gb memory
    OS Mint 13 Maya and 12.10 64bit Desktop Ubuntu
    GeForce 9500 GT (I have two cards but using the one until I can get it to work)

    sudo apt-get install linux-headers-$(uname -r) is installed prior to running scrtipt

    I came across your script and decided to try this on Mint 13 Maya LTS 64 bit version well that didn’t work all I was able to get when the script went to identify the card was that it was using VMware, so not sure what thats about. Well iI get exactly the same problem with 12.10 Ubuntu Desktop 64bit. If I run the program in a console on the Desktop on both Maya or 12.10 it tells me I have vmware drivers and then explains my display is broken and do I want to fix it, when I select option “1” I think processing takes place but nothing gets corrected and does not install or seems not to install the nvidia drivers if it does it does not use them.

    To further investigate exit Desktop at login screen using Ctrl+Alt+F1 and I shut down mdm in case of Maya or lightdm on 12.10 Ubuntu

    sudo service mdm stop
    sudo service lightdm stop

    I then run the script which is already executable with sudo

    sudo ./nvidia_installer.sh

    This gives me sometimes 4 options if I select the first for the Beta drivers the process for installing the drivers seems to continue until the end were the program restarts the computer. On Mint this throws the Desktop completely out of whack and disable mdm until fix so I don’t get any further with that OS. On 12.10 Ubuntu 64bit, I get a little further in that it can displays a Desktop and system details can be displayed.

    Ubuntu 12.10

    Memory 2.0 Gib
    Processor Intel Core 2 Quad Q6700 @ 2.66Ghz x 4
    Graphics Vesa: BIOS-P/N@N4795:00
    OS type 64-bit
    Disk 35.2 GB

    So obviously the Nvidia drivers did not get installed

    For the sceptical this is what I get with lspci

    lspci |grep “VGA”
    03:00.0 VGA compatible controller: NVIDIA Corporation G96 [GeForce 9500 GT] (rev a1)

    Help would be much appreciated as I would like to close the chapter on accelerated graphics using OCL. In my humble opinion and for what it is worth it should not be anything like this hard to install the proprietry drivers on any system let alone Ubuntu or Mint. I can only hope that Mir whenever it comes about is a true advancement that addresses these installation issues.

  17. plss help.. i want to change my video card with inno3d ddr2 1 gb but i dont have the installer of the inno3d .. what should i do? is it will work if i put the inno3d on my cpu without the installer?

  18. I’m a total newbie to Ubuntu and Linux. My GTX 650 Open Source drivers, which came with the distro, worked bad, interface very very lagged, everything was slow. I tried to install proprietary drivers by myself, but got gazillion of errors (turn off Xserver; something to do with nouveau; something about “linux headers are missing”), but your script made everything just fine in 1 “enter”. Thank you very much, you saved my day!

  19. Will this work with the KDE desktop? I am running Kubuntu 14.10
    This is a great day for former windows users and one of the main complaints about Linux

Leave a Reply to Derek Shaw Cancel reply

Your email address will not be published.