Skip to content

Instantly share code, notes, and snippets.

@fordnox
Last active February 25, 2025 18:58
Show Gist options
  • Save fordnox/538b48ac956341728573786a80e08859 to your computer and use it in GitHub Desktop.
Save fordnox/538b48ac956341728573786a80e08859 to your computer and use it in GitHub Desktop.
Ubuntu 24.04 and GeForce RTX 4060 Ti 16GB drivers installation
sudo apt update && sudo apt upgrade;
sudo apt autoremove nvidia* --purge;
ubuntu-drivers devices;
sudo apt-get install linux-headers-$(uname -r) build-essential;
# reboot
sudo apt install nvidia-cuda-toolkit;
lspci | grep -i nvidia;
sudo apt install nvidia-driver-550;
sudo apt update && sudo apt upgrade;
# reboot
nvidia-smi;
nvcc --version;
@fordnox
Copy link
Author

fordnox commented Oct 8, 2024

root@mini:/home/mini# nvidia-smi
Tue Oct  8 09:42:02 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.90.12              Driver Version: 550.90.12      CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| 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 4060 Ti     Off |   00000000:08:00.0  On |                  N/A |
|  0%   45C    P2             32W /  165W |     582MiB /  16380MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      2050      G   /usr/lib/xorg/Xorg                             73MiB |
|    0   N/A  N/A      2409    C+G   ...libexec/gnome-remote-desktop-daemon        120MiB |
|    0   N/A  N/A      2502      G   /usr/bin/gnome-shell                          367MiB |
+-----------------------------------------------------------------------------------------+
root@mini:/home/mini#
root@mini:/home/mini# nvcc --version;
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Jan__6_16:45:21_PST_2023
Cuda compilation tools, release 12.0, V12.0.140
Build cuda_12.0.r12.0/compiler.32267302_0
root@mini:/home/mini# nvcc --version;
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Jan__6_16:45:21_PST_2023
Cuda compilation tools, release 12.0, V12.0.140
Build cuda_12.0.r12.0/compiler.32267302_0

@VannaDii
Copy link

Which kernel version (uname -r) are you running?

@fordnox
Copy link
Author

fordnox commented Oct 19, 2024

$ uname -r
6.8.0-45-generic

@dgarciam
Copy link

I got the following:

== /sys/devices/pci0000:00/0000:00:16.0/0000:0b:00.0 == modalias : pci:v000010DEd00002803sv00001462sd00005174bc03sc00i00 vendor : NVIDIA Corporation model : AD106 [GeForce RTX 4060 Ti] driver : nvidia-driver-550-open - distro non-free driver : nvidia-driver-535-open - distro non-free driver : nvidia-driver-535 - distro non-free driver : nvidia-driver-535-server - distro non-free driver : nvidia-driver-550 - distro non-free recommended driver : nvidia-driver-535-server-open - distro non-free driver : xserver-xorg-video-nouveau - distro free builtin

But in the end i get:

a@swarm:~$ nvidia-smi No devices were found

No clue what im doing wrong

@ashkansl
Copy link

ashkansl commented Jan 16, 2025

Thank you! These commands resolved the issue for me.
I think in previous cases where I encountered the two errors mentioned, I hadn't run the upgrade command.

1- NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running

2- Nvidia NVML Driver/library version mismatch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment