You can use Nvidia cards with the open-source Nouveau device driver or the Nvidia proprietary drivers. The proprietary driver supports more Nvidia cards than Nouveau.
Nouveau – Nvidia Open Source Driver
Nouveau is the open-source device driver to support Nvidia graphics cards and the Nvidia Tegra family of SoCs. The device driver was developed with the cooperation of Nvidia engineers but it’s not the official Nvidia driver.
Nouveau is based on Nvidia’s proprietary Linux driver. The project is currently managed by X.Org Foundation. It has three components:
- Linux Kernel KMS driver (nouveau)
- Gallium3D drivers in Mesa
- X.org DDX
The source code is hosted on freedesktop.org.
Nouveau is freely distributed under the MIT License. The predecessor of Nouveau is the deprecated 2D-only open-source nv driver. In 2005, Nouveau started as nv driver patches. The first official release was demonstrated in the Linux.conf.au in 2007. In 2010, Nouveau was accepted into the Linux kernel as an experimental device driver.
The initial versions of Nouveau were using Direct Rendering Infrastructure (DRI) for Mesa 3D for 3D graphics functionalities. But since 2008, Gallium3D is being used for 3D support. Nouveau is used as the default Nvidia device driver for Linux distributions like Fedora, Ubuntu, Debian, and OpenSUSE.
The Nouveau project is actively supported by the open-source community. It is improving with every new release.
Limitations:
Nouveau users should be aware of the following limitations:
- Performance: 3D performance may be slower than Nvidia proprietary drivers.
- Refresh Rates: Higher refresh rates (above 60 Hz) might run into bottlenecks.
- Advanced Features: The driver might not support new advanced features in the latest Nvidia graphics cards (like multiple-display capabilities of Nvidia Quadro cards without Scalable Link Interface or SLI).
Nvidia Proprietary Driver
The Nvidia proprietary driver is developed and maintained by Nvidia. It supports a wider range of graphics cards than Nouveau driver. This closed-source driver provides better performance for 3D graphics and computer games than the open-source option.
The Nvidia proprietary driver consists of two parts:
- Wrapper functions compile against the Linux kernel.
- The binary blob (Binary Large OBject) takes care of the communication with the card.
The kernel module and the X11 driver are included in a single package. Users have to choose the specifics of how the components are installed from the package.
Hardware Compatibility
The package comes with support for multiple generations of Nvidia cards. You can find out about the card compatibility with your system using the Nvidia driver download page form.
Kernel Compatibility
Nvidia kernel driver installs and runs against the current Linux kernel. The driver builds as a module and needs a kernel that is capable of loading kernel modules. The kernel module is called nvidia.ko. The nvidia.ko consists of a proprietary part, known as the binary blob, and an open-source part, known as the glue. The binary blob takes care of the graphics card functionalities. The glue part works as the intermediary between the binary blob and the kernel. The binary blob, the glue, and the system kernel have to work together to create a smooth operation. These components take care of operating system issues like kernel panics, X server crashes, overheating and power management.
The Challenges of Nvidia Drivers
A risk of using the Nvidia proprietary driver is the changes to any Linux internal Application Binary Interface (ABI) can have adverse consequences. New Linux kernel releases can change the internal ABI for drivers. It requires all drivers using those ABIs to be updated. It is not a big deal for open-source products. Users can easily review the chain of calls between drivers and update the ABIs easily. But users don’t have that level of transparency into nvidia.ko. So after a new kernel release, Nvidia cards might start to showcase data loss or hardware failures. If you are using nvidia.ko, always use caution before a kernel update. It’s recommended to stick to the current kernel version until Nvidia releases a new version of nvidia.ko for general use.
Relationship with the Open-Source Community
Nvidia has a contentious relationship with the open-source community. The Nvidia graphics cards still outperform Intel and AMD cards on Linux systems. But the closed-source nature of Nvidia drivers makes it difficult for open-source communities to contribute. In the past, open-source Nouveau developers used to take the firmware images of the Nvidia device drivers and reverse engineer them to find out more about the internals of the drivers. Then they would replicate the functionalities on Nouveau. But Nvidia started to release signed firmware images which can’t be reverse engineered. Nvidia has claimed that they want to stop the use of imitation graphics cards. But it is preventing the development of open-source support for Nvidia cards.
Switching Between Nouveau and Nvidia Drivers
Users can switch between Nouveau and Nvidia proprietary drivers. It’s difficult but still possible. Here are three methods you can use:
- Switching with the help of two kernels
- Switching with the help of a single kernel and hprofile
- Switching with the help of a single kernel and systemd
You can learn more about the methods here.
Linux Distribution Specific Installation Instructions
Please use the following links to find the installation instructions for specific Linux distributions. The detailed instructions should help you install the Nvidia proprietary driver on your Linux machine. If your favorite distribution is missing, you can send us an email and we will look into adding the necessary instructions.
In Conclusion
Nvidia is one of the best companies for graphics cards for Linux machines. However, installing and running Nvidia drivers on Linux systems is challenging due to the company’s propensity to keep its hardware and software closed-sourced. You can use Nouveau open-source drivers to run Nvidia cards at a performance penalty. Also, find out more about the performance differences between Nouveau and Nvidia proprietary drivers from this Phoronix review.
Further Information:
Switching Between Nouveau and Nvidia Proprietary Driver
References:
- https://linuxhint.com/install-nvidia-drivers-linux/
- https://www.phoronix.com/scan.php?page=article&item=nouveau-410-blob&num=1
- https://www.x.org/wiki/nv/
- https://en.wikipedia.org/wiki/Nouveau_(software)
- https://nouveau.freedesktop.org/wiki/
- https://wiki.gentoo.org/wiki/Nouveau
- https://wiki.gentoo.org/wiki/Nouveau_%26_nvidia-drivers_switching
- http://us.download.nvidia.com/XFree86/Linux-x86_64/346.35/README/index.html
- https://www.pcworld.com/article/2911459/why-nvidia-graphics-cards-are-the-worst-for-open-source-but-the-best-for-linux-gaming.html