How to prevent nvidia kernel module from loading Ubuntu 12.04 64 bit

I have a Nvidia Optimus Laptop with Ubuntu 11.10 and previous i used to blacklist nouveau (by "sudo gedit /etc/modprobe.d/blacklist.conf" and adding "blacklist nouveau" then executing "sudo update-initramfs -u") so the built in Intel graphic was used, it work with Unity 3D.

Now i have installed Ubuntu 12.04 64bit tried to blacklist nouveau nvidia nvidiafb nv and updating ramfs but lsmod still showes that the nvidia module was loaded.

How do i prevent this ?


The module name is "nvidia" (which shows up in lsmod), but the actual filename is nvidia-current.ko. Therefore you need to add to blacklist nvidia-current to /etc/modprobe.d/blacklist-nvidia.conf (filename does not matter). After that, run sudo update-initramfs -u.

Do note that this change applies only on the next boot. To unload the module in the current session, run sudo rmmod nvidia.

By the way, when you install Bumblebee, it'll automatically blacklist nvidia and nouveau. See Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?