Unlocking Ultimate GPU Power: A Step-by-Step Guide to Installing NVIDIA Drivers on Ubuntu (Linux)

Unlocking Ultimate GPU Power: A Step-by-Step Guide to Installing NVIDIA Drivers on Ubuntu (Linux)

~ Moon Tzu

In the art of installing NVIDIA drivers, one must first identify the graphics card, choose the right the driver, and be prepared for the reboot, lest your screen go dark and your spirit falter.

Hello everyone! Today, I’m going to guide you through the process of installing NVIDIA drivers on Ubuntu 20.04 Focal Fossa. We’ll cover several methods to switch from the open-source Nouveau driver to the proprietary NVIDIA driver. This guide will help you enhance the performance of your graphics card, particularly useful for gaming, video editing, and other graphic-intensive tasks.

Why Choose the NVIDIA Driver?

The Nouveau driver, which is open-source and comes installed by default, works well for basic tasks. However, for high-end gaming or video editing, the proprietary NVIDIA driver can offer better performance and stability. You can install the NVIDIA driver from the Ubuntu repository, the NVIDIA PPA repository, or directly from the official NVIDIA website. Let’s dive into each method.

Method 1: Installing NVIDIA Drivers from the Ubuntu Repository

This method is straightforward and recommended for most users. You can use either the GNOME GUI or the command line.

GNOME GUI Method

  1. Open the Software & Updates application.
  2. Select the “Additional Drivers” tab. Here, you will see a list of available NVIDIA drivers. Choose the latest proprietary driver.
  3. Apply the changes and wait for the installation to complete.
  4. Reboot your system.

Command Line Method

Detect your NVIDIA graphic card model and the recommended driver:

bash
$ ubuntu-drivers devices

Install the recommended driver:

bash
$ sudo ubuntu-drivers autoinstall

Reboot your system:

$ sudo reboot

Method 2: Installing NVIDIA Drivers from the PPA Repository

Using the PPA repository can provide you with bleeding-edge NVIDIA beta drivers. Note that these may be less stable.

Add the PPA repository:

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update

Detect your NVIDIA graphic card model and the recommended driver:

$ ubuntu-drivers devices

Install the recommended driver:

$ sudo ubuntu-drivers autoinstall

Or, install a specific driver version:

bash

$ sudo apt install nvidia-driver-535

Reboot your system:

$ sudo reboot

Method 3: Installing NVIDIA Drivers from the Official Website

This method involves more steps and might require troubleshooting, but it ensures you have the latest driver version.

Identify your NVIDIA VGA card:

$ lshw -numeric -C display

Download the official NVIDIA driver from their website.

Install the necessary prerequisites:

$ sudo apt install build-essential libglvnd-dev pkg-config

Disable the Nouveau driver and reboot your system:

$ sudo nano /etc/modprobe.d/blacklist-nouveau.conf

Add the following lines:

blacklist nouveau
options nouveau modeset=0

Then, update the initramfs:

$ sudo update-initramfs -u
$ sudo reboot

Stop the current display server:

$ sudo telinit 3

Install the NVIDIA driver:

$ sudo bash <Name-Of-Your-Installed-File>.run

Reboot Your System

$ sudo reboot

If your screen goes black after rebooting , you can access the console using Ctrl+Alt+{F1-F6} . After pressing Ctrl+Alt+F1 you can use prime-select to change you default graphics driver to intel , or proceed with reinstalling driver if you feel it was broken .

How to Uninstall NVIDIA Drivers

If you ever need to switch back to the Nouveau driver, follow these steps:

Uninstall the NVIDIA driver:

$ sudo apt-get purge '^nvidia.*'

Reinstall the Nouveau driver:

$ sudo apt-get install xserver-xorg-video-nouveau

Reboot your system:

$ sudo reboot

Related Tutorials:

By Chief Geek

Hello Geeks, I'm Chief Geek, your self-appointed Chief Geek(duh) at Weekend Geeks. By day, I’m a tech enthusiast, but by night, I morph into a caffeinated zombie on steroids type super-geek, diving headfirst into the world of gadgets, games, and all things nerdy.If something plugs in, powers up, or requires a firmware update, I’m on it faster than you can sneeze.From vintage arcade classics to the latest console crazes, I’ve rekt my way to the Chicken Dinner (not to mention a few aimbots here and there! ) . Python, Java, C++ , BrainFek– you name it, I’ve probably debugged it at 3 AM while munching on cold rocks .I talk to my Raspberry Pi more than I do to actual humans. My terminal is my therapist.When I’m not buried under a pile of intel manuals, you’ll find me blogging about the latest geek trends, reverse engineering the universe, and curating the ultimate playlist of 8-bit games and keygen soundtracks. My mission? To make Weekend Geeks your go-to destination for all things geeky, quirky, and downright fun.Fun Fact: I once stayed up 48 hours straight trying to perfect my high score in Flappy-Bird (True Story). Spoiler alert: I didn’t, but I did discover the perfect ratio of caffeine to snacks.Let's make the world a little geekier, one blog post at a time.

Leave a Reply

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

  • Facebook
  • X (Twitter)
  • LinkedIn
  • More Networks
Copy link