Installing the open-source NVIDIA driver, known commonly as "Nouveau," on Linux is typically straightforward because Nouveau is included by default with most Linux distributions. However, the steps involved can vary somewhat depending on your distribution. Here’s a general guide on how to ensure Nouveau is installed and being used:
Step 1: Remove Proprietary NVIDIA Drivers
If the proprietary NVIDIA drivers are installed on your system, you may need to remove them first to avoid conflicts. The method to remove these drivers depends on how you installed them initially. If you used your distribution's package manager, you could remove the drivers using the same tool.
For example, on Ubuntu or Debian-based systems, you can remove the proprietary drivers using:
sudo apt-get remove --purge '^nvidia-.*'
On Fedora or Red Hat systems, you might use:
sudo dnf remove '^nvidia.*'
Step 2: Install Nouveau
For most users, Nouveau will be installed by default. However, if you've previously removed it or if it's somehow not present, you can reinstall it using your distribution's package manager.
On Ubuntu/Debian-based distributions:
sudo apt-get install xserver-xorg-video-nouveau
On Fedora:
sudo dnf install xorg-x11-drv-nouveau
On CentOS, the Nouveau driver is included by default with the "xorg-x11-drv-nouveau" package, which should be installed as part of the group package "X Window System".
Step 3: Ensure the Nouveau module is not blacklisted
Sometimes, when installing proprietary NVIDIA drivers, the Nouveau driver could be blacklisted to prevent it from loading. You'll need to check for any blacklist file in /etc/modprobe.d/ and remove or comment out lines related to Nouveau, such as:
blacklist nouveau
Step 4: Reconfigure or Update Initramfs (Optional)
After making these changes, you may need to update your initial ramdisk (initramfs) to ensure it includes Nouveau. This is done differently depending on the distribution.
On Ubuntu or Debian:
sudo update-initramfs -u
On Fedora:
sudo dracut --force
Step 5: Reboot
Once done, reboot your system:
sudo reboot
After rebooting, your system should be using the Nouveau driver.
Verify Nouveau Driver Usage
You can verify that your system is using the Nouveau driver by running:
lspci -nnk | grep -i vga -A3
Look for a line that says "Kernel driver in use: nouveau" in the output, signaling that the Nouveau driver is actively being used for your NVIDIA GPU.
Troubleshooting
If you run into issues, consulting the logs can be helpful. Use dmesg or look into /var/log/Xorg.0.log for any errors or warnings related to Nouveau. The Nouveau project also has a troubleshooting guide and a wiki that can be valuable resources.