51

I'm trying to install proprietary nvidia graphics driver I downloaded from nvidia website. It will not install because it says that the "Nouveau kernel driver" needs to be disabled first.

I opened synaptic and uninstalled everything that had nvidia, nouveau, or jockey in its name. It still won't work.

What exactly do I need to do to disable the "Nouveau kernel driver"?

Bob
  • 523

9 Answers9

39

All links above are correct, however you must run sudo update-initramfs -u so the initramfs can be purged of nouveau

Luis Alvarado
  • 216,643
25

Just a quick question: Why are you downloading the drivers from Nvidia directly? The packages available through jockey (the Additional Drivers application) should be fine for most people and if you don't fit into "most people", using the X-SWAT PPA should give you the latest version of the nvidia driver.

Anyway, what you want is simple. Firstly you have to get out of X before you can install. You can do that by switching to a virtual terminal (tty) by pressing ctrl+alt+ F1 logging on and then running sudo stop lightdm. Now run the installer. If it's still moaning about nouveau continue:

Run sudoedit /etc/modprobe.d/nvidia-graphics-drivers.conf and fill it with this:

# This file was installed by nvidia-current-updates
# Do not edit this file manually

blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-173
blacklist nvidia-96
blacklist nvidia-current
blacklist nvidia-173-updates
blacklist nvidia-96-updates
alias nvidia nvidia_current_updates
alias nouveau off
alias lbm-nouveau off

The driver will create that file when it's installed, but you just want to speed things along. You'll need to reboot and kill X again now.

Then run the installer and all should be fine.

geezanansa
  • 1,610
Oli
  • 299,380
11

Add string nomodeset to your /etc/default/grub file at line GRUB_CMDLINE_LINUX_DEFAULT=line, or your nvidia driver won't work.

After the modifications, run:

sudo update-grub
muru
  • 207,228
Riccardo
  • 111
11

Pass a kernel argument (nouveau.blacklist=1) at boot to blacklist the driver by editing your /etc/default/grub file:

sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="nouveau.blacklist=1 /g' /etc/default/grub
sudo update-grub

reboot

mchid
  • 44,904
  • 8
  • 102
  • 162
6

I was stuck with this issue for a long time. After installing a fresh copy of Ubuntu 16.04, I installed cuda 8.0 using the deb(local):

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda

Nvidia driver is working well on my computer now. Prior to that, I was trying to install Nvidia driver using the *.run file without any luck. Give it a shot it will save your valuable time.

muru
  • 207,228
4

I am just a little penguin and have found disabling/blacklisting nouveau breaks many features within ubuntu especially window management items(i.e. missing menus etc which is fine if you know keyboard shortcuts for navigation/operation.) NVidia themselves in the readme highlight the possible need to create another file if modeprobe.d/blacklist allready contains anythingelse. It is possible to change from mesa to vesa drivers by disabling nouveau in ubuntu. Using mesa or vesa will give different listings in jockey(additional drivers) as will using jockey-common(handy for adding older drivers to jockey list) There has been much hard work going on in this department by many and have found personally that the recommended driver has been hugely improved in recent months as well as the NVidia 310 driver being available either in ubuntu software centre or additional drivers after activating proposed updates in Software Sources (and then updating). What i have found after installation is that there is never a proprietary driver installed which means little things like launcher icon size can not be adjusted (system settings>appearance) which is indicative of a 2d session and not 3d session (newer flavours). So bearing in mind the ubuntu philosophy and the fact different people use their machines for different things; it might be worth asking,"Is it a bug? and/or What happens when nouveau is disabled?

geezanansa
  • 1,610
4

Put the file nvidia-graphics-drivers.conf under the /etc/modprobe.d/ directory and then reboot the system.

Get into console and execute NVIDIA-Linux-x86-319.32.run again, thus it won't get the incompatibility error.

Lucio
  • 19,191
  • 32
  • 112
  • 191
2

Can you add your graphics card model and Ubuntu version to the question?

Even though you can download 96 series drivers from nVidia's website, it will be incompatible with the latest version of Xorg and will not install.You can make an attempt to downgrade your X server, but you may find that other features of Ubuntu will be broken and you may even be unable to get to any sort of graphical desktop. I would provide instructions on how to do this, but I don't know which version of Ubuntu you're using. Maybe you can find out with a Google search. See post #7, here, or this launchpad project, which may be, well, fun to try ;)

Pang
  • 373
Richard
  • 8,588
1

Gentoo Users (others, ymmv): After configuring nouveau as a [M]odule in your kernel (genkernel gets this for free), and installing the nvidia kernel module (emerge nvidia-drivers), I'm running a fully interchangeable nouveau/nvidia build with only the following:

/etc/default/grub

GRUB_CMDLINE_LINUX="nouveau.modeset=0"

I find the elegance of the solution charming, myself.