TechBuzzPro

Install NVIDIA Drivers in Elementary OS

· 5 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can install NVIDIA GPU drivers in Elementary OS, but it requires a bit more manual work than on some other Linux distributions due to Elementary OS’s focus on simplicity and curated apps. This guide details the process, ensuring you get the latest drivers for optimal performance, especially for gaming and graphics-intensive applications. You'll need a stable internet connection and a basic understanding of the terminal.

What You'll Need

  • A computer running Elementary OS.
  • An NVIDIA graphics card.
  • A stable internet connection.

Step-by-Step

  1. Identify Your NVIDIA Card: Open the terminal (Ctrl+Alt+T). Type lspci | grep -i nvidia and press Enter. This command lists PCI devices and filters for anything containing 'nvidia', revealing your graphics card model. Note this down; you’ll need it later.
  2. Add the NVIDIA PPA: Elementary OS uses PPAs (Personal Package Archives) to provide software outside of the official repositories. Add the NVIDIA PPA with the following commands. Be extremely careful to type these commands exactly as shown: sudo add-apt-repository ppa:graphics-drivers/ppa. Press Enter when prompted. You will need to press Enter again to accept adding the repository.
  3. Refresh Package Lists: After adding the PPA, update your package lists to include the new drivers. Run: sudo apt update. This command can take a few minutes to complete.
  4. List Available Drivers: To see a list of available NVIDIA drivers, use: ubuntu-drivers devices. This will display a table showing your card, the recommended driver, and other available versions. Note the recommended driver version; this is usually a good starting point.
  5. Install the Recommended Driver: Install the recommended driver using: sudo apt install nvidia-driver-. Replace `` with the actual version number from the previous step (e.g., sudo apt install nvidia-driver-535). Press Enter and confirm the installation when prompted.
  6. Alternatively, Install a Specific Driver Version: If you prefer a specific version (perhaps for compatibility reasons), use: sudo apt install nvidia-driver-. Replace `` with the desired version.
  7. Reboot Your System: After the driver installation completes, reboot your computer. This is crucial for the new drivers to load correctly. Type sudo reboot and press Enter.
  8. Verify Installation: After rebooting, open the terminal again. Type nvidia-smi and press Enter. If the installation was successful, this command will display information about your NVIDIA GPU, including driver version and GPU temperature. If you see an error message, proceed to the Troubleshooting section.

Common Mistakes

  • Incorrect PPA Addition: Typos in the PPA command can prevent the drivers from being added correctly. Double-check the command before executing it.
  • Not Rebooting: Forgetting to reboot after installation is a common mistake that prevents the drivers from loading.
  • Installing Incompatible Drivers: While the recommended driver is usually the best choice, sometimes installing a driver that's too new or too old can cause problems. If you encounter issues, try a different version.
  • Conflicting Drivers: If you previously installed NVIDIA drivers using a different method (e.g., directly from NVIDIA's website), there might be conflicts. Remove those drivers before proceeding.

Tips

  • Keep Drivers Updated: Regularly update your system using sudo apt update && sudo apt upgrade to ensure you have the latest driver versions and security patches.
  • Monitor GPU Temperature: Use a monitoring tool like nvidia-smi or a third-party application to monitor your GPU temperature, especially during gaming or other intensive tasks.
  • Consider Secure Boot: If you have Secure Boot enabled in your BIOS, you might need to sign the NVIDIA drivers for them to load correctly. This is a more advanced topic and requires specific steps depending on your system.
  • Use the 'experts-only' PPA with caution: The graphics-drivers/ppa/stable PPA offers even newer drivers, but these are less tested and may introduce instability. Only use this if you're comfortable troubleshooting potential issues.

Troubleshooting

  • `nvidia-smi` Command Fails: If the nvidia-smi command fails, it usually indicates that the drivers aren't loaded correctly. Double-check that you rebooted after installation. If the problem persists, try reinstalling the drivers.
  • Black Screen or Display Issues: A black screen or other display problems can occur if the drivers are incompatible or corrupted. Try booting into recovery mode and uninstalling the NVIDIA drivers, then reinstalling them.
  • System Instability: If your system becomes unstable after installing the drivers, it's likely due to an incompatible driver version. Try downgrading to a previous version that worked correctly.
  • Kernel Module Errors: Examine the system logs (using journalctl -b) for kernel module errors related to NVIDIA. These errors can provide clues about the cause of the problem.
  • Purge Previous Drivers: If you’ve tried multiple drivers and are still having issues, completely remove any previous NVIDIA driver installations with sudo apt purge nvidia-*. Then reboot and try installing the recommended driver again.

Frequently Asked Questions

What is the best NVIDIA driver version for my card?

The `ubuntu-drivers devices` command will recommend a driver version based on your graphics card model. This is generally the safest option.

Can I use the drivers directly from the NVIDIA website?

While you can download drivers from the NVIDIA website, it's generally not recommended on Elementary OS. The PPA method ensures compatibility with the system's package management.

How do I uninstall NVIDIA drivers?

Use the command sudo apt purge nvidia-* to remove all NVIDIA driver packages. Then reboot your system.

Does Elementary OS support all NVIDIA graphics cards?

Elementary OS generally supports a wide range of NVIDIA graphics cards, but older or very new cards might not have drivers readily available in the PPA.

What if I need a specific driver version for a game or application?

If a particular game or application requires a specific driver version, try installing that version using the sudo apt install nvidia-driver- command. Remember to test thoroughly after installation.