Score:2

Problem with nvidia-smi, nvtop, nvcc [Ubuntu 22.04] (hybrid GPU)

gi flag

I know that there are thousands posts on how to install drivers, I tried several but nothing helps.

Let me describe how I got to my problem. My GPU is NVIDIA GeForce RTX 3050 Mobile CUDA available

  1. I purged my current (at the time) driver using sudo apt-get purge nvidia-* pic (I took the image from Additional Drivers) (was't grayed out at the time) --> driver

  2. Ran several commands after that sudo apt-get update and sudo apt-get autoremove

  3. Did apt search nvidia-driver I had 20+ options there. 470, 535, 390, 525, and etc

  4. Install driver version 470 using sudo apt install nvidia-driver-470. I should mention that nvidia website says driver version 535 pic (was't grayed out at the time) --> for my gpu

  5. Did sudo reboot

  6. Logged into ubuntu again and checked Additional Drivers (driver installed fine since it was ticked) (was't grayed out at the time) 470

At this moment multiple problems occured! Note I dont have CUDA installed yet!

  1. nvidia-smi returned 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. I installed sudo apt install nvtop, but nvtop returns No GPU to monitor.

Now it becomes weird

  1. Installed CUDA sudo apt install nvidia-cuda-toolkit nvidia-cuda-toolkit-gcc, nvcc --version 11.5

However, step 9 somehow "removed" nvidia utils. When I run nvidia-smi again it returns:

Command 'nvidia-smi' not found, but can be installed with:
sudo apt install nvidia-utils-390         # version 390.157-0ubuntu0.22.04.2, or
sudo apt install nvidia-utils-418-server  # version 418.226.00-0ubuntu5~0.22.04.1
sudo apt install nvidia-utils-450-server  # version 450.248.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-470         # version 470.199.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-470-server  # version 470.199.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-525         # version 525.125.06-0ubuntu0.22.04.1
sudo apt install nvidia-utils-525-server  # version 525.125.06-0ubuntu0.22.04.1
sudo apt install nvidia-utils-510-server  # version 510.47.03-0ubuntu3
sudo apt install nvidia-utils-510         # version 510.108.03-0ubuntu0.22.04.1
sudo apt install nvidia-utils-515         # version 515.105.01-0ubuntu0.22.04.1
sudo apt install nvidia-utils-515-server  # version 515.105.01-0ubuntu0.22.04.1
sudo apt install nvidia-utils-530         # version 530.41.03-0ubuntu0.22.04.2
sudo apt install nvidia-utils-535         # version 535.54.03-0ubuntu0.22.04.1

I tried to install sudo apt install nvidia-utils-470. It got installed but it removed my CUDA, if I run nvcc --version something like "nvcc command not found". This is a deathloop that I got stuck in.

  1. Now when I try to check Additional Drivers everything is grayed out except this --> additional drivers

I found this post, but I'm not sure if it will work + it is kinda unclear to me (Ubuntu 22.04 cannot install nvidia-utils-515 and nvidia-cuda-toolkit)

Edit:

ed1) I don't have cuda folder in /usr/local/ but nvcc works

ed2) I tried installing driver version 535 yesterday. Ended up re-installing ubuntu.

ed3) Kernel version 5.19.0-46-generic

I found this post, but I'm not sure if it will work + it is kinda unclear to me (Ubuntu 22.04 cannot install nvidia-utils-515 and nvidia-cuda-toolkit)

ed4) Tried the link above, did not help!

ed5) I tried to install ubuntu 20.04 with 5.15.0-76-generic. I followed same steps, nothing works. Right now I suspect that it might be because I have 2 GPUs on my laptop (Asus ROG strix g15 G15RC).

  • First. AMD ATI 06:00.0 Device 1681
  • Second. NVIDIA 01:00.0 NVIDIA Corporation Device 25a2 (Interesting that in Ubuntu 20.04 system does not see what NVIDIA GPU model I have)
us flag
Are you using kernel 5.15.0 or 6.1.0 to which Ubuntu 22.04.2 LTS just was upgraded to? It seems that many have problems with the 6.x kernel and Nvidia drivers.
raksa avatar
gi flag
@w-sky 5.19.0-46-generic
Score:1
gi flag

Problem was solved!

Note that I installed Ubuntu 20.04 because of the kernel problem in Ubuntu 22.04!

In my laptop I have 2 GPUs (hybrid GPU)

I noticed that NVIDIA X Server Setting was not displaying any of my GPUs. So, I started solving that problem, and it happened that found of my hybrid GPU

  1. sudo apt install nvidia-driver-470
  2. sudo reboot
  3. sudo apt install nvidia-cuda-toolkit
  4. then I disable "Secure Boot" in BIOS settings

Done!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.