
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.
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.
- 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
- 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
- After adding these lines, save and close the file. The
blacklist
command prevents the kernel from loading the Nouveau drivers at startup. - Update the initial RAM filesystem (initramfs) by running:
sudo update-initramfs -u
- Finally, reboot your system.
Solution 2: Disabling Nouveau through GRUB
Another method of disabling Nouveau is through the GRUB bootloader.
- Open the
grub
file located in the/etc/default/
directory:
sudo nano /etc/default/grub
- Find the line that starts with
GRUB_CMDLINE_LINUX_DEFAULT
and addnouveau.modeset=0
at the end. It should look something like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0"
- Save and close the file. The
nouveau.modeset=0
parameter disables the Nouveau drivers. - Update GRUB with the following command:
sudo update-grub
- Reboot your system.
Solution 3: Disabling Wayland
If your gdm3 session is running in Wayland, you may need to disable it.
- Check if your gdm3 session is running in Wayland by running:
loginctl show-session <session-n> -p Type
- If the session type is Wayland, edit the
/etc/gdm3/custom.conf
file and uncomment the lineWaylandEnable=false
. - Reboot your system.
Solution 4: Disabling Nvidia Fallback Service
In some cases, disabling the nvidia-fallback.service
might be necessary.
- 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.
- 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.
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.
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.
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.
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.
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.