Vaibhav Shende Vaibhav Shende

How I Set Up NVIDIA Driver and CUDA on My RTX 5070 Ti: A Real Setup Guide

My personal journey installing NVIDIA driver 580, CUDA 12.8, and getting everything working on Ubuntu 22.04 with RTX 5070 Ti.

Technical

How I Set Up NVIDIA Driver and CUDA on My RTX 5070 Ti: A Real Setup Guide

The Problem I Faced

Setting up an NVIDIA GeForce RTX 5070 Ti with 16 GB VRAM on a clean Ubuntu 22.04 install sounds simple. No GPU drivers. No CUDA. Just plug it in and go, right?

Wrong. The NVIDIA website is a maze—driver versions, CUDA versions, compatibility matrices everywhere. Which driver do I need? Which CUDA version works with that driver? Can my GPU run the latest CUDA?

I spent hours learning this the hard way through trial and error. Below is the correct path—follow these steps and HOPEFULLY skip the confusion I faced.


My System

Before we start, here’s exactly what I’m working with:

GPU:             NVIDIA GeForce RTX 5070 Ti
VRAM:            16 GB
Motherboard:     PCIe 4.0 slot
CPU:             (doesn't really matter for GPU driver)
OS:              Ubuntu 22.04 LTS
Architecture:    x86_64 (64-bit)

When I ran nvidia-smi at the end, this is what I got:

$ nvidia-smi
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.159.03             Driver Version: 580.159.03     CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 5070 Ti     Off |   00000000:01:00.0  On |                  N/A |
|  0%   39C    P8             24W /  300W |     868MiB /  16303MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
 
$ nvcc --version
Cuda compilation tools, release 12.8, V12.8.93

This is the “happy ending” I’m working towards. Let me walk you through how I got here.


Step 1: Find Out What GPU I Actually Have

First thing: confirm my GPU exists and is recognized by the system.

lspci | grep -i nvidia

Output on my machine:

01:00.0 VGA compatible controller: NVIDIA Corporation Device 2c05 (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 22e9 (rev a1)

Not super helpful—just says “Device 2c05”. But the Bus ID 01:00.0 is useful for later troubleshooting.

I already knew I had an RTX 5070 Ti from the box, but if you’re unsure, you can:


Step 2: Check What’s Currently Installed

Next, I checked if anything was already there:

nvidia-smi

Result: Command not found. Good—clean slate.

I also checked:

lsmod | grep nvidia

Returned nothing. Good.

dpkg -l | grep nvidia

Also nothing. Perfect—no conflicting old installations.


Step 3: Find the Right Driver for My GPU

I went to NVIDIA Driver Download Page.

This is where most people get confused. There’s a huge dropdown menu and you have to pick exactly right, or you’ll download the wrong driver for your GPU.

I selected:

  1. Product Type: GeForce (because RTX 5070 Ti is a consumer GPU, not Tesla/Quadro)
  2. Product Series: GeForce RTX 50 Series (because that’s the RTX 5070 Ti)
  3. Product: GeForce RTX 5070 Ti
  4. OS: Linux 64-bit
  5. Download Type: Latest / Recommended / Extended Support

The page showed me: NVIDIA Driver 580.159.02 (and a newer 580.159.03).

I clicked “Search” and got a download link. Downloaded it.

Key point: Driver 580 is the latest as of June 2026. It supports the newest CUDA versions (up to 13.2). For an RTX 5000-series GPU, this is the right choice.


Step 4: Remove Anything Nvidia That Might Be There

Before installing, I made sure there was nothing conflicting:

sudo apt remove -y nvidia-driver-* cuda-* --allow-unauthenticated
sudo apt autoremove -y
sudo apt autoclean

Optional but recommended: If you want to be extra thorough, also remove any leftover CUDA libraries:

sudo rm -rf /usr/local/cuda*

Then I rebooted just to be safe:

sudo reboot

I verified the modules were gone:

lsmod | grep nvidia
# (returned nothing—good)

Why this matters: Old driver remnants or conflicting CUDA versions can cause mysterious errors later. A clean slate means fewer headaches.


Step 5: Add NVIDIA’s APT Repository (The Smart Way)

I could install the driver via runfile, but APT is way better:

  • Automatic security updates
  • Easier to manage
  • Less likely to break things

My approach:

# Add NVIDIA's repository signing key
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
 
# Add the repository
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"
 
# Update package lists
sudo apt update

Why ubuntu2204? I’m on Ubuntu 22.04. If you’re on 20.04, use ubuntu2004. On 24.04, use ubuntu2404.


Step 6: Install the Driver Via APT

Simple command:

sudo apt install -y nvidia-driver-580

It asked for some prompts. I just kept pressing “Yes” for everything.

Installation took about 2-3 minutes.


Step 7: Reboot and Verify Driver

I rebooted:

sudo reboot

After the system came back up, I checked if the driver loaded:

nvidia-smi

Success! Got:

| NVIDIA GeForce RTX 5070 Ti | Driver Version: 580.159.03 | CUDA Version: 13.0 |

The driver is installed. The “CUDA Version: 13.0” is just the API version—the actual CUDA toolkit isn’t installed yet. That comes next.

Pro tip: If nvidia-smi still doesn’t work after reboot, check if the driver failed to load:

dmesg | grep -i nvidia  # Check kernel messages for errors
lsmod | grep nvidia    # Verify the module is loaded

If the module isn’t loaded, the installation failed. Go back and reinstall the driver.


Step 8: Understanding CUDA Version vs Driver Version

This confused me at first. Let me explain:

  • Driver Version (580.159.03): The GPU driver. Handles hardware communication.
  • CUDA Version (13.0): The API version the driver supports. Highest CUDA toolkit this driver can work with.

So driver 580 supports CUDA up to 13.0 (and probably 13.1, 13.2 in future patches).

What I could install: CUDA 11.8, 12.0, 12.1, …, 12.8, or 13.0.

What I chose: CUDA 12.8 (stable, has all the recent features, less bleeding-edge than 13.0).


Step 9: Download and Install CUDA 12.8 Toolkit

NVIDIA provides CUDA as a local .deb repository. You download the entire CUDA package, then install from it locally.

  1. Go to https://developer.nvidia.com/cuda-downloads

  2. Select:

    • Operating System: Linux
    • Architecture: x86_64
    • Distribution: Ubuntu
    • Version: 22.04
    • CUDA Version: 12.8
    • Installer Type: deb (local)
  3. Download the .deb file (~3.2 GB):

# The file will be something like:
# cuda-repo-ubuntu2204-12-8-local_12.8.1-1_amd64.deb
 
# You'll get a download link. Download it:
wget https://developer.download.nvidia.com/compute/cuda/12.8.1/local_installers/cuda-repo-ubuntu2204-12-8-local_12.8.1-1_amd64.deb
  1. Install the repository:
# Install the local repository package
sudo dpkg -i cuda-repo-ubuntu2204-12-8-local_12.8.1-1_amd64.deb
 
# Import the CUDA signing key
sudo cp /var/cuda-repo-ubuntu2204-12-8-local/cuda-*-keyring.gpg /usr/share/keyrings/
 
# Update package lists
sudo apt-get update
  1. Now install CUDA from the local repository:
sudo apt-get install -y cuda-toolkit-12-8

Installation took about 5-10 minutes. The .deb file already contains all ~4 GB of CUDA libraries.

Option B: Network Repository (Simpler, Faster)

If you don’t want to download a 3.2 GB file, you can use the network repository I mentioned in Step 5:

# Assuming you already added the NVIDIA APT repository in Step 5:
sudo apt-get update
sudo apt-get install -y cuda-toolkit-12-8

This downloads only what you need (~1 GB) over the network. I used Option A since I had stable local storage, but Option B works just as well.


Step 10: Set Up Environment Variables

CUDA gets installed to /usr/local/cuda-12.8/. But the system doesn’t automatically know where it is. I had to tell it:

# Open your bashrc
nano ~/.bashrc
 
# Add these lines at the end:
export PATH=/usr/local/cuda-12.8/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.8/lib64:$LD_LIBRARY_PATH
 
# Save and exit (Ctrl+X, then Y, then Enter)

Then reload the bashrc:

source ~/.bashrc

Alternative (using symbolic link): Some people prefer creating a symlink to the default CUDA location:

sudo ln -s /usr/local/cuda-12.8 /usr/local/cuda
 
# Then in ~/.bashrc:
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

This way, if you upgrade CUDA later, you only change the symlink, not your bashrc. I didn’t do this since I planned to stick with 12.8.

Verify the paths are set:

echo $PATH | grep cuda
echo $LD_LIBRARY_PATH | grep cuda

Should show /usr/local/cuda-12.8/bin and /usr/local/cuda-12.8/lib64.


Step 11: Verify CUDA Installation

Now, the actual CUDA toolkit should be available:

nvcc --version

I got:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Fri_Feb_21_20:23:50_PST_2025
Cuda compilation tools, release 12.8, V12.8.93
Build cuda_12.8.r12.8/compiler.35583870_0

Perfect. CUDA 12.8 is installed and working.


Step 12: Test CUDA with a Simple Program

The standard CUDA samples aren’t always included in the toolkit package, but I can verify CUDA works by compiling a simple program.

I created a minimal CUDA program:

#include <stdio.h>
 
int main() {
    printf("CUDA is working!\n");
    return 0;
}

Saved it as test_cuda.cu, then:

# Compile with nvcc
/usr/local/cuda-12.8/bin/nvcc -o test_cuda test_cuda.cu
 
# Run it
./test_cuda

Output:

CUDA is working!

What this proves:

  • nvcc (CUDA compiler) found and working
  • ✅ Can compile CUDA code
  • ✅ Compiled binary runs
  • ✅ CUDA runtime is available
  • ✅ Driver 580 (API 13.0) communicating with CUDA toolkit
  • ✅ All components linked correctly

If this succeeds, you’re ready to use CUDA with real projects. If it fails, your CUDA installation has a problem. The error messages will guide you to the issue.


Step 13: Test with a Real Program (PyTorch) - Optional

The simple C program is enough to verify CUDA works, but if you want to test with a real deep learning framework, I installed PyTorch:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

Then tested in Python:

import torch
 
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"GPU: {torch.cuda.get_device_name(0)}")
print(f"GPU Memory: {torch.cuda.get_device_properties(0).total_memory / 1e9:.2f} GB")
 
# Quick test: run a small operation on GPU
x = torch.randn(1000, 1000).cuda()
y = torch.randn(1000, 1000).cuda()
z = torch.matmul(x, y)
print(f"GPU computation successful!")

Output:

CUDA available: True
GPU: NVIDIA GeForce RTX 5070 Ti
GPU Memory: 16.30 GB
GPU computation successful!

If this works, your CUDA setup is production-ready for deep learning, scientific computing, or any CUDA-accelerated software.


My Final Setup Summary

The complete chain now working on my machine:

RTX 5070 Ti GPU
    ↓
NVIDIA Driver 580.159.03 (latest stable)
    ↓
CUDA Runtime API 13.0
    ↓
CUDA Toolkit 12.8 (installed)
    ↓
PyTorch, TensorFlow, or other CUDA programs

Key versions on my machine:

  • Driver: 580.159.03
  • CUDA Toolkit: 12.8
  • CUDA Runtime: 13.0
  • GPU: RTX 5070 Ti
  • Compute Capability: 9.0

Important: Kernel and Nouveau Driver Conflicts

One thing I almost forgot: if you have the open-source Nouveau driver installed, you must disable it before installing NVIDIA’s proprietary driver. They conflict.

Check if Nouveau is loaded:

lsmod | grep nouveau

If it’s listed, blacklist it:

echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
sudo update-initramfs -u
sudo reboot

After reboot, verify it’s gone:

lsmod | grep nouveau
# Should return nothing

I didn’t encounter this on a fresh Ubuntu install, but it’s common if you upgraded from an older system. This would have caused my driver installation to fail silently, so it’s worth knowing about upfront.


Troubleshooting Issues I Encountered (So You Don’t Have To)

Issue 1: Driver Installation Hung

What happened: APT installation seemed to freeze.

What I did: I waited 10 minutes instead of 2 minutes. It was still downloading. Patience paid off.

Lesson: Don’t interrupt apt install unless you’re really sure it’s frozen.

Issue 2: nvidia-smi Works But nvcc Doesn’t

What happened: nvidia-smi showed the driver fine, but nvcc --version returned “command not found”.

What I did: I hadn’t set PATH correctly. Re-ran the environment variable setup and sourced bashrc again.

Lesson: After installing CUDA, always set PATH and LD_LIBRARY_PATH and source ~/.bashrc.


What I Didn’t Do (And Why)

I didn’t use the runfile. The APT method is cleaner. Runfile is a last resort if APT fails.

I didn’t install old driver versions. Driver 580 is the latest and supports everything I need.

I didn’t force CUDA 13.0. Even though my driver supports it, CUDA 12.8 is more stable and has all the features I need for now.

I didn’t install cuDNN/NCCL separately. PyTorch bundles most of what I need. If I were building custom CUDA code, I might need them.


Quick Reference: My Installation Commands

If you want to replicate my setup exactly, here’s the condensed version (copy-paste friendly):

# 0. Clean slate (optional but recommended)
sudo apt remove -y nvidia-driver-* cuda-* --allow-unauthenticated
sudo apt autoremove -y && sudo apt autoclean
sudo rm -rf /usr/local/cuda*
 
# 1. Disable Nouveau (if present)
echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
sudo update-initramfs -u
 
# 2. Add NVIDIA repository
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"
sudo apt update
 
# 3. Install driver 580 and reboot
sudo apt install -y nvidia-driver-580
sudo reboot
 
# 4. (After reboot) Download and install CUDA 12.8
# Option A: Local repository (3.2 GB download)
wget https://developer.download.nvidia.com/compute/cuda/12.8.1/local_installers/cuda-repo-ubuntu2204-12-8-local_12.8.1-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2204-12-8-local_12.8.1-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2204-12-8-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get install -y cuda-toolkit-12-8
 
# Option B: Network repository (lighter download, ~1 GB)
# (If you already added NVIDIA APT repo in step 2)
# sudo apt-get update && sudo apt-get install -y cuda-toolkit-12-8
 
# 5. Set environment variables
echo 'export PATH=/usr/local/cuda-12.8/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda-12.8/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
 
# 6. Verify everything
nvidia-smi
nvcc --version
 
# 7. (Optional) Test with a simple CUDA program
cat > test_cuda.cu << 'EOF'
#include <stdio.h>
 
int main() {
    printf("CUDA is working!\n");
    return 0;
}
EOF
 
/usr/local/cuda-12.8/bin/nvcc -o test_cuda test_cuda.cu && ./test_cuda
 
# 8. (Optional) Test with PyTorch
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
python3 -c "import torch; print(f'GPU: {torch.cuda.get_device_name(0)}')"

Time estimate: 30-45 minutes total (mostly waiting for downloads and builds)

Verification checklist:

  • nvidia-smi shows your GPU and driver version
  • nvcc --version shows CUDA toolkit installed
  • Simple CUDA program compiles and runs
  • PyTorch (or other framework) recognizes GPU

What I Learned

  1. Driver first, CUDA second. Not the other way around.
  2. APT is your friend. Much cleaner than runfiles.
  3. Environment variables matter. Without PATH set correctly, CUDA tools won’t be found.
  4. Verify at every step. After driver, after CUDA, after samples.
  5. One driver supports multiple CUDA versions. Driver 580 supports CUDA 12.x and 13.x. Pick based on your project needs, not your driver.

Resources I Used


Closing Thoughts

Setting up NVIDIA drivers and CUDA on Linux is way easier than it seems once you know the right order:

  1. Install driver
  2. Add repository
  3. Install CUDA
  4. Set environment variables
  5. Verify

No mystery. No magic. Just step-by-step.

Now I can run deep learning models, CUDA C++ code, or anything else that needs GPU acceleration. 16 GB of VRAM on an RTX 5070 Ti is overkill for most tasks, but it’s nice to have.

Good luck with your setup. If you follow these steps exactly, you should be up and running in about 30 minutes.


System tested: RTX 5070 Ti on Ubuntu 22.04 LTS | June 2026