Installing NVIDIA drivers in Kubuntu

Posted by Flo in Site news, Tricks on August 17th, 2008.
Tags: , , ,

When installing my NVIDIA drivers on Kubuntu Hardy, it came to me that this wasn’t as easy as it probably should be. I use the word probably because I use a quite old graphics card, and Kubuntu automatically seems to install the drivers for the newest cards. However it may be, I had some problems with it, and when solving these problems, I saw that it is possible to install your NVIDIA drivers in a better way than just letting Kubuntu fix this. Here’s a quick guide (with a small troubleshooting section that you can use when you boot into the command line interface) how to install your NVIDIA drivers on Kubuntu the “easy” way.

So, what do I expect you to have?

  • A working Kubuntu, except that the graphics card isn’t installed yet
  • Your Kubuntu computer must be connected to the internet (you’ll need it for the packages that you need to install, otherwise you must find yourself a list of the packages, and you’ll need to download them on another computer, and afterwards put them on your Kubuntu computer).
  • An NVIDIA gfx card, although this trick also works with ATi, but this guide is focussed at the NVIDIA cards.

There are a few possible situations that you’re in now. You could be reading this on your kubuntu computer, this is the best situation. Otherwise, you already tried to install it the hard way, but it failed. Then there are two options. You can either be in the GUI of kubuntu… or you are reading this on another computer because you boot into the command line interface (yay!). I will discuss the first 2 situations (you’re in the GUI of Kubuntu) first, and after that I will discuss the problem from the command line interface.

Just a little warning: you can get yourself into some trouble if you install the wrong drivers, but that’s probably not the only way. If you follow this guide, you will do it on your own risk 🙂 of course.

Normal Installation

  1. We will need to install envyng, it’s a great tool for installing ATi and NVIDIA drivers. You can either do it with commands (view this site to see how) or you can just use the Adept Manager, like we will in this guide.
  2. To open the manager, press alt+F1 (it’s the K Menu), go to system and then open the Adept Manager.
  3. Fetch updates, and after that, search for envy.
  4. Right-click on envyng-core and envyng-qt and press `request install`.

    IMPORTANT: If you already have envy installed, you should uninstall it. If you already have envyng installed, you should update it to the newest version.

  5. Now fully upgrade (this can take a while).
  6. Again, open the K Menu, go to system, but now select EnvyNG from the list.
  7. Go to the NVIDIA tab (or ATi tab, depending on your gfx card)
  8. Here you can choose to let envyng automatically select the driver you’ll need for your card, but I really recommend to manually select the driver you need to install, because to auto-pilot DOES make mistakes. You can probably find this information on the internet (google!). To manually install them select `Install the NVIDIA driver (Manual selection)`.

    IMPORTANT: if you’re not sure which driver you should install, let envyng choose for you. Yes, you’re taking a guess, but it seems to work in most cases. You’ll need to select `Install the NVIDIA driver (Automatic Hardware Recognition)` to do this.

  9. Now press apply, and follow the steps (if there are any).
  10. When this process has finished, you’re just one reboot away from installed drivers, congratulations!  But be prepared, if you have installed the wrong drivers, you can reboot into the command line interface… and you don’t want that. (at least, not with my command line experience). So, be sure  you’ve installed the right drivers, and then… REBOOT!.
  11. If you boot into the Kubuntu GUI, you have succeeded! enjoy your new drivers.


command-line interface install

Let’s fix the problem.

  1. First of all, make sure that you are in the command line interface. If you just see a black screen, press ALT+CTRL+F1 till you end up where I want you to be.
  2. Log in. If it’s possible (probably not), log in as root, but it’s not really needed.
  3. If you’ve entered this guide without doing the first part (the normal installation), you may not have envyng installed, see this site to see how.
  4. enter the following command:

    startx
     

  5. Your screen will now probably go black, but after a while, this should stop (otherwise press ctrl+c or ctrl+z), and you will see some errors, marked by (EE), that xserver couldn’t start. One of this errors (srry, I can quote it) tells you that the drivers that you’ve installed aren’t for the Kernel you are using, and this Kernel is numbered. It’s either 169.12 or 96.43.05 or 71.86.04. Remember this number, it will help you.

    Note: If you don’t see these errors, you can access the error log with the commands:

    cd /var/log/
    sudo nano Xorg.0.log            (this will open the error log in the nano editor)
     

  6. from now on, it’s quite simple. Type the command:

    sudo envyng
     

  7. If everything is allright, you should be able to see a sort of menu, first select `uninstall NVIDIA drivers`. DON’T REBOOT. After this, the menu will open again, otherwise open it again like in step 6.
  8. Now select `manually install NVIDIA drivers` (or something that looks like that).
  9. Remember the number from step 5? You will need it here. Install the driver that fits your number. When it asks to reboot, reboot. If it doesn’t ask for it, open the menu again, and select reboot computer from the menu.
  10. Everything should work now and you should boot into the graphical kubuntu interface.

    IF THIS DOESN`T HAPPEN:
    – you really have an NVIDIA card?
    – check what the web says about the drivers you need to install
    – reinstall the open source drivers (they always work?). You can do this by following the command line interface install till step 7, but then you WILL need to reboot. So you only uninstall the nvidia drivers.

I hope this guide was useful. If this was not your problem, or if this didn’t fix the problem, you can always try the ubuntu forums www.ubuntuforums.org. This guide is just a compilation of little tricks I found there and on other websites, so it really is useful to check this forum.





6 Responses to “Installing NVIDIA drivers in Kubuntu”

  1. Egro says:

    Thanks for a fine article. It really helped me out!

  2. Corey says:

    I will give it a try!

    I’m a little late seeing this, but better late then never – right? 😆

  3. Raeann says:

    WOW thank you SO much for this!!! I was terrified that I couldn’t install Kubuntu or any distro at all on my new computer but after following these steps it worked perfectly!!

    Thanks again! 😀

    -Rachel

  4. jangsunday says:

    thank so much! 😛

  5. izes says:

    Does this work for kubuntu 10 as well? They recommend using jockey instead and it didn’t work for me. Should I use ennvyNG instead?

  6. Flo says:

    I don’t know for sure, you can try. As far as I know, EnvyNG doesn’t really work anymore on Kubuntu when installing ATI drivers for the newest cards, but it might still work for older ATI cards and nvidia hardware. If that doesn’t work, you can try to download and install the drivers directly from the nvdia website if you have a nvidia card (large chance that they work properly). As for ATI drivers, they are in the kubuntu repository (hope I spelled that right), so you can install them using KPackageKit. That might be the same case for NVidia drivers (I think the package is called nvidia-glx, you should look it up). Don’t forget to reboot afterwards.
    I hope this is of any help to you.

Leave a Reply

*