• +43 660 1453541
  • contact@germaniumhq.com

Blacklisting Modules for the Linux Kernel

Blacklisting Modules for the Linux Kernel

After the fiasco with the previous graphic card, I ordered a new one. Since Linux is Linux, nouveau was picked as the driver instead of the nvidia-drm. Because now we have a race condition: we just need to make sure that nouveau is never loaded first though.

Well, there’s an easy fix. First we need to blacklist the module. With this, we instruct the kernel that we don’t want that driver ever to be loaded. For that we just create a file /etc/modprobe.d/nvidia.d with the following content:

blacklist nouveau

If you hurry up and reboot you’ll notice that nouveau it’s still being loaded. The reason is that a copy of the modprobe.d folder exists in the initramfs. On reboot the old content is still being used.

So we just need to update the initramfs:

sudo update-initramfs -u

After this nouveau is never loaded, so no more race conditions.

Life is good.