Skip to content
Bring technology into reality

Tech Blogs

Linux Ubuntu OS install Nvidia Driver Guide

09 Apr 2025 0 comments

 

1. Check if Graphics Card Drivers Are Installed on Your Computer

Run the following command in the terminal:

nvidia-smi

If the output matches the following, drivers are already installed. No need to proceed with this guide.

nvidia-smi result

If the output differs, follow the installation steps below.

Preparation is critical to avoid issues like black screens after driver installation. These steps will not affect your system but skipping them may cause failures.

2. Disable Secure Boot

  1. Restart your computer and enter BIOS settings during boot.
  2. Locate the security settings and disable Secure Boot. Press F10 to save and exit.
Note: BIOS access methods and security settings vary by manufacturer.

enter bios


3. Switch to Discrete Graphics Mode

Configure this based on your computer's specifications.


4. Update Software List and Install Essential Tools/Dependencies

sudo apt-get update   
sudo apt-get install g++
sudo apt-get install gcc
sudo apt-get install make

5. Disable Nouveau

Nouveau is a generic driver. Disable it before installing NVIDIA drivers.

  1. Edit the configuration file:
    sudo gedit /etc/modprobe.d/blacklist.conf
  2. Add these lines at the end:
    blacklist nouveau
    options nouveau modeset=0
  3. Execute the following commands:
    sudo update-initramfs -u
    sudo reboot  # Restart the computer
  4. After reboot, verify Nouveau is disabled:
    lsmod | grep nouveau  # If the output is empty, nouveau is successfully disabled

6. Install LightDM

LightDM is a display manager with better compatibility than gdm3.

sudo apt-get install lightdm

lightdm

Press Enter to confirm.

lightdm selection

Use arrow keys to select lightdm and press Enter.


7. Install NVIDIA CUDA Toolkit

sudo apt-get install nvidia-cuda-toolkit

Check the recommended driver version and note it:

sudo ubuntu-drivers devices

ubuntu-drivers


8. Add Driver Repository

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

9. Install the Recommended Driver Version

sudo apt-get install nvidia-driver-570  # Replace "570" with your recommended version

Reboot after installation. Successful installation will show:

nvidia-drivers-570

Troubleshooting Black Screen

  1. On the black screen, press ctrl+alt+f1 to enter the tty command line.
  2. Log in with your credentials, then run:
    export LANGUAGE="en_US.UTF-8"  # Set locale
    sudo apt-get --purge remove nvidia*
    sudo apt autoremove
    reboot
  3. If the issue persists, use:
    sudo apt-get remove --purge nvidia*
Prev post
Next post

Leave a comment

Please note, comments need to be approved before they are published.

Thanks for subscribing!

This email has been registered!

Shop the look

Choose options

Edit option

Choose options

this is just a warning
Login
Shopping cart
0 items