Skip to content

Instantly share code, notes, and snippets.

@artynet
Last active February 9, 2024 19:59
Show Gist options
  • Save artynet/d97aa5c5e65c33f0fa68328fb9520a8d to your computer and use it in GitHub Desktop.
Save artynet/d97aa5c5e65c33f0fa68328fb9520a8d to your computer and use it in GitHub Desktop.
setting to blacklist nouveau drivers
Hi guys! I've made this tutorial cuz my Driver Manager wasn't working well, hope it helps:
1 Obviously starting with an update and upgrade:
sudo apt-get update && sudo apt-get upgrade
2 Then remove all Nvidia packages, skip this if your OS is fresh installed:
sudo apt-get remove nvidia* && sudo apt autoremove
3 Install some packages for build the kernel:
sudo apt-get install dkms build-essential linux-headers-$(uname -r)
4 Now block and disable Nouveau kernel driver:
sudo pluma /etc/modprobe.d/blacklist.conf
5 Insert the following lines to the blacklist.conf:
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
6 Save and exit.
7 Disable the Nouveau kernel by typing the following commands(nouveau-kms.conf may not exist, it is ok):
echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf
8 Build the new kernel:
sudo update-initramfs -u
9 Reboot.
10 After the reboot you need to exit the X Server, for that we need to stop LightDM, press Ctrl+Alt+F1 in the logging screen, log in with your user and password, after that:
sudo service lightdm stop
11 Now install your Nvidia driver:
sudo apt-get install nvidia-VERSION
12 Reboot.
This worked for me, I have a HP G60-125NR AMD Turion X2 64bits with a Nvidia 8200M G. This tutorial may not work if you need to install "bumblebee" too, I don't know how to configure it cuz I don't need it, you will have to read somewhere else about that.
Sorry for my bad english!
# This file was installed by nvidia-418
# Do not edit this file manually
blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-current
blacklist nvidia-173
blacklist nvidia-96
blacklist nvidia-current-updates
blacklist nvidia-173-updates
blacklist nvidia-96-updates
blacklist nvidia-418-updates
alias nvidia nvidia_418
alias nvidia-uvm nvidia_418_uvm
alias nvidia-modeset nvidia_418_modeset
alias nvidia-drm nvidia_418_drm
alias nouveau off
alias lbm-nouveau off
options nvidia_418_drm modeset=0
@typon
Copy link

typon commented Feb 2, 2022

You are an absolute life saver

@Marietto2008
Copy link

I'm looking for another method to black list the nouveau driver,because in my system I can't do "sudo update-initramfs -u". I tried to remove the "libdrm-nouveau2" driver,but it also removes a lot of files needed to run blender. And when I make the installation of blender,it copies those files again and when I try to run blender,cycles does not recognizes cuda and my gpu because it says "libGL error: failed to load driver: nouveau".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment