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"?

1

9 Answers 9

39

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

2
  • Cool this worked for me. I installed the blacklist file but it did not work. But strangely this step is not required on Ubuntu proper.
    – Autodidact
    Commented Dec 10, 2014 at 9:26
  • 24
    what are "the links above"?
    – dinosaur
    Commented Aug 3, 2017 at 20:49
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.

8
  • 1
    I tried this out and it didn't do anything. I'm still getting the incompatibility error from the Nvidia install script.
    – Jake
    Commented Mar 23, 2012 at 20:10
  • To anyone reading this I would strongly suggest that you use X-SWAT PPA as that should work and the blacklist solution might or might not (it didn't in my case).
    – enedene
    Commented Aug 21, 2012 at 19:33
  • I just installed the NVIDIA 64 bit drivers (310) for my GeForce 210 and the installer did the disabling step for me. Rebooted and it installed fine. :) Commented Feb 3, 2013 at 11:00
  • @geezanansa It's in there already (second paragraph). LightDM controls X.
    – Oli
    Commented Apr 12, 2013 at 13:05
  • driviers in 16.04 doesn't appear to create this file, I had to create it manually. nomodeset is required in boot option
    – jyavenard
    Commented Jul 23, 2016 at 4:29
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

1
  • @cl-netbox I agree, this is fun. Also, I already tried to revoke some of them and there were maybe one or two that needed to be edited although I could always find some grammar somewhere to fix. I really should be a little less trigger happy with those as I often revoke them. Additionally, I later realized that passing nouveau.modeset=0 was through editing the menu at boot instead of editing the file like I do so it shouldn't cause any future display issues like extra monitors.
    – mchid
    Commented Feb 1, 2016 at 14:25
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
2
  • It tells me that nomodeset not found...
    – Dodgie
    Commented Apr 10, 2014 at 17:34
  • Strange, indeed the message is gone from dmesg now, but why? And additionally, this the nomodeset option seems to cause the splash screen to blank-out and redraw incorrectly, not that this is a blocking issue, but it's really ugly.
    – Coder Guy
    Commented Jun 17, 2016 at 6:19
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.

2
  • 2
    I really think this should be the accepted answer. Don't spend your afternoon smashing your face against your monitor like I did. This completely sidesteps the problem. Commented Aug 10, 2017 at 13:09
  • install cuda 8.0 sudo apt-get install cuda-8-0
    – JustWe
    Commented Jan 18, 2018 at 4:49
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?

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.

1
  • 5
    where the hell is the nvidia-graphics-drivers.conf? Commented Aug 26, 2018 at 22:11
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 ;)

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .