This is an old revision of the document!
Disabling the NVIDIA Nouveau driver in Ubuntu
sometimes you might want to use the most current nvidia binary driver rather than the nouveau driver package.. or you want no driver at all for whatever reason, so you need to disable the pre-installed nouveau driver..
note all commands below should be executed with root privileges, either prepend sudo
or become root first by running sudo su -
edit /etc/modprobe.d/blacklist-framebuffer.conf
make sure these two lines are in there:
blacklist nouveau blacklist nvidiafb
now uninstall the driver
sudo apt-get --purge remove xserver-xorg-video-nouveau
also recreate the initrd image as newer ubuntu releases load the nouveau module in there already.
update-initramfs -u
and reboot
after the reboot there should not be any nouveau related modules anymore. try
lsmod | grep nouveau
if it returns an empty result, you where successful :) if not, try adding these parameters in the file /etc/default/grub
to the GRUB_CMDLINE_LINUX_DEFAULT
parameter:
rdblacklist=nouveau nouveau.modeset=0
after that, you need to recreate the grub config by running
update-grub
and reboot once more. check again and if you still see nouveau modules, start googling ;) so far these steps have always worked on all ubuntu systems i had touched since 10.04
use a repository for a packaged driver
if you want to install the nvidia driver instead of the nouveau driver, you can probably save the above steps if you are happy with the “proprietary drivers” provided through ubuntu. however, these drivers might be rather old. if you need newer drivers, you can use a repository which provides them. and if you need to auto-install the latest nvidia driver, you can use a python utility to detect which driver package you need. Here is how this is done:
# install python pip to get pyvidia apt-get -y install python-pip pip install --upgrade pip pip install pyvidia pip install six add-apt-repository -y ppa:graphics-drivers/ppa apt-get -y update apt-get -y install nvidia-$(pyvidia)