Installing the nVidia driver in Kubuntu 12.04

Running the vanilla install of Kubuntu 12.04 worked incredibly well. It took me quite some time to notice that I was in fact using the open source noveau driver. Dual displays, desktop effects and all other first impressions worked without glitches. In fact, it was not before I tried to run Google Maps’ WebGL version that I started noticing some rendering errors. And according to the noveau project’s own webpages, the OpenGL acceleration is exactly where noveau is still lacking.

In addition, the graphics card seemed to heat itself more easily with the noveau driver.

Sadly this lead me to realize that I would still have to use the proprietary NVIDIA driver to make use of my graphics card and the applications I use daily. Even worse, getting this installed would prove to harder than in earlier versions of Ubuntu. I don’t know if this is due to using Kubuntu or not, but if you should experience some of the same symptoms, here is how I fixed it.

First of all, the symptoms were as follows after installing the nvidia-current package:

  • The computer started only with one display and with a very low resolution (640 x 480)
  • Enabling the nvidia driver using jockey-kde or jockey-text resulted in errors such as
    • ERROR: XorgDriverHandler.enable(): package or module not installed, aborting
    • WARNING: modinfo for module nvidia_current_updates failed: ERROR: modinfo: could not find module nvidia_current_updates
  • Finally, installing nvidia-current only gave the error:
    • Module build for the currently running kernel was skipped since the
      kernel source for this kernel does not seem to be installed.

So, if you experience any of these, the reason is most likely missing kernel source and header libraries. The fix is thankfully simple, just run the following commands in a terminal:

sudo apt-get update
sudo apt-get purge nvidia-current
sudo apt-get install linux-source
sudo apt-get install linux-headers-generic
sudo apt-get install linux-image
sudo apt-get install nvidia-current
jockey-text -e xorg:nvidia_current

After this, if you get no errors, try to reboot and run

nvidia-settings

after booting. Now you should be able to set up and use your system with full graphics acceleration.

Good luck!

35 thoughts on “Installing the nVidia driver in Kubuntu 12.04

  1. Hey –
    I did actually hit an error on jockey-text -e xorg:nvidia_current
    I had returned:

    Unknown driver: xorg:nvidia_current
    Use –list to see available drivers

    Any advice appreciated!

    1. Have you tried running

      jockey-text –list

      This should probably list available drivers for your system. If you have an Nvidia card and jockey-text does not detect it, there might be some problems detecting your card properly.

      1. For me, the command to use was “jockey-text -e kmod:nvidia_current”, and after restarting the system things seem to work at least as well as with the open source driver, so thank you. :)

        My original problem, though, was that after using the system for a few hours with the original driver, the xorg process would start taking about 100% of the CPU, which, you can imagine, was problematic. It remains to be seen whether this issue got fixed with the installation of the proprietary driver, but I certainly hope so.

  2. Thanks for that! Solved the problem I was having here with a fresh Mythbuntu 12.04 setup with a Gigabyte GT440 card.

  3. Thanks for the information, it was a little after I had found out how to resolve the issue myself, but I pointed to your site when entering the bug ticket. Mainly because the maintainer of Netrunner had said

    “Seriously, with proprietory binary driver blobs there is not much we can do other than recommend sticking to the free driver nouveau, which has actually reached a pretty good state.”

    When I reported the issue (which appears to be upstream)

  4. As a side note, I resolved mine merely by using apt to install nvidia-current-updates (or nvidia current) as the packages include the kernel source for compiling the modules. Why Jockey is pulling down a package without the ability is beyond me, but I’ll leave it at that.

  5. Hi

    I didn’t get jockey-text working. I run nvidia-xconfig and that created new xorg.conf and after reboot new driver was working.

  6. Many thanks for this very good description – it works well!
    After an update my monitor resolution suddenly turned to a lower one. I had no idea why, but found out that the nvidia driver wasn’t installed anymore…cause re-installing didn’t work I searched for a solution and this was what I found…thanks again.

  7. Thank you SO much! I had that ‘ERROR:root:Could not find any typelib for AppIndicator3′ error too, but the driver itself is working perfectly!

  8. hi! i’d like to know if i can put a resolution different from the default or from the list where i can choose with the gadget. thank you very much :-)

  9. Hello,

    Thanks for making a guide for people to use and fix their problems, I know I appreciate it, but I was wondering if this would work for my older Legacy Card? It is a GeForce Sparkle 6600 LE 256mb card.

    Thank you!

    1. Hi,

      I think that really depends on whether or not Nvidia still supports the card with their drivers. My best guess would be to search online for any mentioning of the card and support on Linux and/or Windows.

      Good luck!

  10. Hello,

    It does not work for me ! I still got :
    2013-01-23 23:36:44,511 WARNING: modinfo for module nvidia_current failed: ERROR: modinfo: could not find module nvidia_current

    2013-01-23 23:36:44,511 ERROR: XorgDriverHandler.enable(): package or module not installed, aborting

    Any idea ?

    Thanks

    1. Hi,

      That’s strange. I would try to check if you’re actually running the newest version of the Linux kernel. I think you can do this by typing
      uname -a
      in a terminal and compare this version to what you get with
      apt-cache show linux-headers-generic
      The latter will list different versions of the linux-headers-generic, which of one will likely have the status installed:
      Package: linux-headers-generic
      Status: install ok installed
      ...
      Version: 3.2.0.31.34

      This is the one you want to compare the output of uname -a with. If they are not the same, you might have to check if you boot up the wrong version with Grub, or perhaps just uninstall the currently running version and install a newer one.

      The reason you have to do this is that you may be running a different version of the Linux image than the header files the Nvidia driver tries to compile against.

      Good luck!

  11. Hi, i`ve done what you suggest in your post, but still having the follow problem. After I type ‘nvidia-settings’, it says “You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server.”. Alright, going back in console, running ‘nvidia-xconfig’ as root, reboot and and still have the lowest resolution 640 x 480.
    In console, ‘ jockey-text –list’ says:

    kmod:nvidia_experimental_304 – Experimental NVIDIA binary Xorg driver, kernel module and VDPAU library (Proprietary, Disabled, Not in use)
    kmod:nvidia_experimental_310 – Experimental NVIDIA binary Xorg driver, kernel module and VDPAU library (Proprietary, Disabled, Not in use)
    kmod:nvidia_current – NVIDIA binary Xorg driver, kernel module and VDPAU library (Proprietary, Disabled, Not in use)
    kmod:nvidia_current_updates – nvidia_current_updates (Proprietary, Enabled, Not in use)
    You can see, the last driver nvidia_current_updates is proprietary, enabled but not in use.
    Any help please? My graphic card is NVIDIA GeForce GT 635M

    Best

    1. Do you get any output after running this?
      jockey-text -e xorg:nvidia_current

      Also, what is your output of the commands
      uname -a
      and
      apt-cache show linux-headers-generic

      Might be that you don’t have the right Linux headers installed for the driver to compile. (Have a look for any such output while running apt-get install nvidia-current for instance)

      1. “Do you get any output after running this?
        jockey-text -e xorg:nvidia_current”

        jockey-text -e xorg:nvidia_current
        Unknown driver: xorg:nvidia_current
        Use –list to see available drivers

        “Also, what is your output of the commands
        uname -a”
        Linux unix 3.7.0-7-generic #15-Ubuntu SMP Sat Dec 15 16:34:21 UTC 2012 i686 i686 i686 GNU/Linux

        “apt-cache show linux-headers-generic”

        Package: linux-headers-generic
        Source: linux-meta
        Priority: optional
        Section: kernel
        Installed-Size: 32
        Maintainer: Ubuntu Kernel Team
        Architecture: i386
        Version: 3.7.0.7.11
        Depends: linux-headers-3.7.0-7-generic
        Filename: pool/main/l/linux-meta/linux-headers-generic_3.7.0.7.11_i386.deb
        Size: 8018
        MD5sum: e5fd9bf861985a220de977611b6e25a2
        SHA1: 4d325a34a090790e21049ba25757756a3866ffce
        Description-en: Generic Linux kernel headers
        This package will always depend on the latest generic kernel headers
        available.

        Package: linux-headers-generic
        Priority: optional
        Section: devel
        Installed-Size: 32
        Maintainer: Ubuntu Kernel Team
        Architecture: i386
        Source: linux-meta
        Version: 3.5.0.22.28
        Depends: linux-headers-3.5.0-22-generic
        Filename: pool/main/l/linux-meta/linux-headers-generic_3.5.0.22.28_i386.deb
        Size: 2588
        MD5sum: 4f96118e16488280856fd88310ed3cd9
        SHA1: fa368be816ef698d125b771d84a0290ad0c062b9
        SHA256: 6c7a8882e38ec5a3153dd658f6ed3a1183b6cd193eeee67ea4cbf94099c5af63
        Description-en: Generic Linux kernel headers
        This package will always depend on the latest generic kernel headers
        available.
        Description-md5: 9c9742ab9c289b1e900fab477bc0070d
        Bugs: https://bugs.launchpad.net/ubuntu/+filebug
        Origin: Ubuntu
        Supported: 18m
        Task: ubuntu-desktop, ubuntu-usb, edubuntu-desktop, edubuntu-usb, xubuntu-desktop, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, lubuntu-desktop

        Package: linux-headers-generic
        Priority: optional
        Section: devel
        Installed-Size: 31
        Maintainer: Ubuntu Kernel Team
        Architecture: i386
        Source: linux-meta
        Version: 3.5.0.17.19
        Depends: linux-headers-3.5.0-17-generic
        Filename: pool/main/l/linux-meta/linux-headers-generic_3.5.0.17.19_i386.deb
        Size: 2368
        MD5sum: 0f18b8b0504e7e9d2476ff363c4ee770
        SHA1: 17e3a45c2211195273fb53293f09f007dd92bcb8
        SHA256: 6d938a693d616ba0715dbf6d417ff5046f4df01361d1bde1a04d7fefed451ec0
        Description-en: Generic Linux kernel headers
        This package will always depend on the latest generic kernel headers
        available.
        Description-md5: 9c9742ab9c289b1e900fab477bc0070d
        Bugs: https://bugs.launchpad.net/ubuntu/+filebug
        Origin: Ubuntu
        Supported: 18m
        Task: ubuntu-desktop, ubuntu-usb, edubuntu-desktop, edubuntu-usb, xubuntu-desktop, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, lubuntu-desktop

        The ouput from “apt-get install nvidia-current”

        sudo apt-get install nvidia-current
        Reading package lists… Done
        Building dependency tree
        Reading state information… Done
        The following extra packages will be installed:
        dkms
        The following NEW packages will be installed:
        dkms nvidia-current
        0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
        Need to get 0 B/38.2 MB of archives.
        After this operation, 109 MB of additional disk space will be used.
        Do you want to continue [Y/n]? y
        Selecting previously unselected package dkms.
        (Reading database … 230986 files and directories currently installed.)
        Unpacking dkms (from …/dkms_2.2.0.3-1.1ubuntu1.1_all.deb) …
        Selecting previously unselected package nvidia-current.
        Unpacking nvidia-current (from …/nvidia-current_304.51.really.304.43-0ubuntu1_i386.deb) …
        Processing triggers for man-db …
        Setting up dkms (2.2.0.3-1.1ubuntu1.1) …
        Setting up nvidia-current (304.51.really.304.43-0ubuntu1) …
        update-alternatives: using /usr/lib/nvidia-current/ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in auto mode
        update-alternatives: warning: skip creation of /usr/lib32/libOpenCL.so because associated file /usr/lib32/nvidia-current/libOpenCL.so (of link group i386-linux-gnu_gl_conf) doesn’t exist
        update-alternatives: warning: skip creation of /usr/lib32/vdpau/libvdpau_nvidia.so.1 because associated file /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.1 (of link group i386-linux-gnu_gl_conf) doesn’t exist
        update-alternatives: warning: skip creation of /usr/lib32/libvdpau_nvidia.so because associated file /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so (of link group i386-linux-gnu_gl_conf) doesn’t exist
        update-alternatives: using /usr/lib/nvidia-current/alt_ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in auto mode
        update-initramfs: deferring update (trigger activated)
        Loading new nvidia-current-304.43 DKMS files…
        First Installation: checking all kernels…
        Building only for 3.7.0-7-generic
        Building for architecture i686
        Building initial module for 3.7.0-7-generic
        ERROR (dkms apport): kernel package linux-headers-3.7.0-7-generic is not supported
        Error! Bad return status for module build on kernel: 3.7.0-7-generic (i686)
        Consult /var/lib/dkms/nvidia-current/304.43/build/make.log for more information.
        Processing triggers for initramfs-tools …
        update-initramfs: Generating /boot/initrd.img-3.7.0-7-generic

        1. I bet you’ve figured out a way to solve this by now, but if somebody else should have the same problem, it seems that you are a running a too new kernel version. Reverting to an older version that is supported by the NVIDIA driver might help.

  12. If you’re trying to use WebGL in Chrome, it’s worth experimenting with the options

    –enable-webgl –ignore-gpu-blacklist

  13. This worked, but it doesn’t let me open game EXAMPLE minetest minecraft or even steam. and thanks, contact me about this error.

    1. Do you get any errors trying to open the games? Perhaps you could try to launch them from a terminal and see what output you get – that sometimes gives some more helpful output than launching with a shortcut.

  14. Hey,

    Having some issues. I’m running the newest Kubuntu (freshly installed just now) and am running the kernel 3.2.0-49-generic-pae.

    Everything installs fine, but when I try to list the drivers (jockey-text –list), I get nothing at all. Trying to enable the nvidia driver (jockey-text -e xorg:nvidia_current) doesn’t work either.

    What could be causing this?

    1. What happens if you search for the nvidia packages using apt-cache? I.e. by typing

      apt-cache search nvidia

      in a terminal? You should see results like nvidia-310 and nvidia-current. If these do not show up there might be a problem with your repositories, for instance the “restricted” repository not being enabled. To see if that is the case, look for the Software Sources or Software and Updates application and see if “Proprietary drivers for devices (restricted)” is ticked. If not, this is likely the reason and might be caused by Kubuntu not coming with this enabled by default.

  15. when i type in terminal “sudo apt-get purge nvidia-current” error shows

    E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

    I have nvidia geforce gt330 running ubuntu ultimate edition amd64

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>