50

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
  • 513
  • Oli, I'm downloading from NVIDIA because nvidia-96 will not install, see here: http://askubuntu.com/questions/112206/how-can-i-get-nvidia-96-installed – Bob Mar 12 '12 at 15:12

9 Answers9

38

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

Luis Alvarado
  • 211,503
24

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,560
Oli
  • 293,335
  • 1
    I tried this out and it didn't do anything. I'm still getting the incompatibility error from the Nvidia install script. – Jake Mar 23 '12 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 Aug 21 '12 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. :) – EM-Creations Feb 03 '13 at 11:00
  • @geezanansa It's in there already (second paragraph). LightDM controls X. – Oli Apr 12 '13 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 Jul 23 '16 at 04:29
  • what is jockey? – thang Aug 13 '16 at 00:23
  • I would avoid using this method. I tried it and it made it impossible for me to boot into gui or TTY. I had to boot in recovery mode, drop into root, remount the file system from read to read/write find the file again and remove it. That was quite a hassle to come back from. – Bono May 18 '17 at 15:23
  • @Oli: take me for example, I'm currently forced to download and transfer the drivers manually. Running Linux with no internet is a real pain. – Tcll Oct 12 '17 at 23:54
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
  • 197,895
  • 55
  • 485
  • 740
Riccardo
  • 111
  • It tells me that nomodeset not found... – Dodgie Apr 10 '14 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 Jun 17 '16 at 06:19
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
  • 43,546
  • 8
  • 97
  • 150
  • @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 Feb 01 '16 at 14:25
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
  • 197,895
  • 55
  • 485
  • 740
  • 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. – Graydyn Young Aug 10 '17 at 13:09
  • install cuda 8.0 sudo apt-get install cuda-8-0 – JustWe Jan 18 '18 at 04: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?

geezanansa
  • 1,560
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
  • 18,843
user174233
  • 41
  • 1
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,502
  • 11
  • 47
  • 72
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.