Software & AppsOperating SystemLinux

How To Successfully Disable Nouveau Drivers in Ubuntu 18.04

Ubuntu 2

In this article, we will delve into the process of disabling Nouveau drivers in Ubuntu 18.04. Nouveau is a free and open-source graphics device driver for Nvidia video cards. While it’s a great solution for many users, there are instances where you might need to disable it, for example, to install proprietary Nvidia drivers.

Quick Answer

To successfully disable Nouveau drivers in Ubuntu 18.04, you can use various methods such as blacklisting Nouveau drivers, disabling Nouveau through GRUB, disabling Wayland, disabling the Nvidia fallback service, or renaming the Nouveau module file. These methods can help you install proprietary Nvidia drivers if needed.

What is Nouveau?

Nouveau is a free and open-source graphics device driver developed by the community. It aims to provide support for Nvidia graphics cards in Linux distributions. While it’s an excellent initiative, it may not provide the optimal performance for high-end graphics cards or specific applications. In such cases, disabling Nouveau and installing proprietary Nvidia drivers might be necessary.

Disabling Nouveau

There are several methods to disable Nouveau drivers. We will cover five solutions in this article.

Solution 1: Blacklisting Nouveau Drivers

One of the most common methods is to blacklist the Nouveau drivers. This process involves editing the blacklist.conf file located in the /etc/modprobe.d/ directory.

  1. Open the terminal and type the following command to open the blacklist.conf file in a text editor:
sudo nano /etc/modprobe.d/blacklist.conf
  1. Add the following lines at the end of the file:
#Blacklist nouveau drivers
blacklist nouveau
blacklist lbm-nouveau
alias nouveau off
alias lbm-nouveau off
  1. After adding these lines, save and close the file. The blacklist command prevents the kernel from loading the Nouveau drivers at startup.
  2. Update the initial RAM filesystem (initramfs) by running:
sudo update-initramfs -u
  1. Finally, reboot your system.

Solution 2: Disabling Nouveau through GRUB

Another method of disabling Nouveau is through the GRUB bootloader.

  1. Open the grub file located in the /etc/default/ directory:
sudo nano /etc/default/grub
  1. Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT and add nouveau.modeset=0 at the end. It should look something like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0"
  1. Save and close the file. The nouveau.modeset=0 parameter disables the Nouveau drivers.
  2. Update GRUB with the following command:
sudo update-grub
  1. Reboot your system.

Solution 3: Disabling Wayland

If your gdm3 session is running in Wayland, you may need to disable it.

  1. Check if your gdm3 session is running in Wayland by running:
loginctl show-session <session-n> -p Type
  1. If the session type is Wayland, edit the /etc/gdm3/custom.conf file and uncomment the line WaylandEnable=false.
  2. Reboot your system.

Solution 4: Disabling Nvidia Fallback Service

In some cases, disabling the nvidia-fallback.service might be necessary.

  1. Run the following command:
sudo systemctl disable nvidia-fallback.service

Solution 5: Renaming the Nouveau Module File

Finally, you can also disable Nouveau by renaming the Nouveau module file.

  1. Run the following commands:
sudo mv /lib/modules/4.15.0-20-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko /lib/modules/4.15.0-20-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko-old
sudo reboot

Conclusion

Disabling Nouveau drivers in Ubuntu 18.04 can be achieved through various methods. It’s crucial to remember that you should only disable Nouveau if you’re planning to install proprietary Nvidia drivers. Always ensure to backup your data before making any significant changes to your system. If you encounter any issues, don’t hesitate to seek help from the Ubuntu community or other online forums.

What are Nouveau drivers?

Nouveau drivers are free and open-source graphics device drivers developed by the community. They aim to provide support for Nvidia graphics cards in Linux distributions.

Why would I need to disable Nouveau drivers?

There are instances where you might need to disable Nouveau drivers, such as when you want to install proprietary Nvidia drivers for optimal performance or compatibility with specific applications.

How can I disable Nouveau drivers in Ubuntu 18.04?

There are several methods to disable Nouveau drivers in Ubuntu 18.04. You can either blacklist Nouveau drivers, disable Nouveau through GRUB, disable Wayland if running in gdm3, disable the Nvidia fallback service, or rename the Nouveau module file. Choose the method that suits your needs and follow the provided steps in the article.

Can I re-enable Nouveau drivers after disabling them?

Yes, you can re-enable Nouveau drivers if needed. Simply reverse the steps you took to disable them. For example, if you blacklisted Nouveau drivers, you can remove the lines added to the blacklist.conf file and update the initramfs. If you disabled Nouveau through GRUB, remove the nouveau.modeset=0 parameter from the grub file and update GRUB.

Are there any risks involved in disabling Nouveau drivers?

Disabling Nouveau drivers should not pose any significant risks to your system. However, it’s essential to ensure that you have a backup of your data before making any significant changes. Additionally, if you encounter any issues during the process, it’s advisable to seek help from the Ubuntu community or other online forums.

Leave a Comment

Your email address will not be published. Required fields are marked *