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

12.0464-bitkernelnvidianvidia-optimus

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 ?

Best Answer

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?

Related Question