Nvidia-smi command not found, but nVidia drivers installed and GPU working

Hi there,

I am running Fedora Kinoite 40 and I have no issues with nVidia graphic drivers, which run my discrete GPU.

However, I tried to use the command nvidia-smi to no avail:

$ nvidia-smi
bash: nvidia-smi: command not found

Tried to also run dnf whatprovides nvidia-smi from inside a Fedora distrobox container, but it says target not found.

Why is this going on and how can I fix it?

Nvidia-smi is part of the Nvidia cuda driver: xorg-x11-drv-nvidia-cuda. Once that is installed you will have Nvidia-smi.

2 Likes

You can find missing things like that with:

dnf provides \*/nvidia-smi

If all you know is a file exists somewhere by that name,

If you have the exact path, this is more efficient:

dnf provides /usr/bin/nvidia-smi
2 Likes

Added kinoite, nvidia

And also if you know the path your can dnf install /usr/bin/nvidia-smi.

1 Like

Added atomic-desktops, cuda, dnf, f40

Thanks for the help team.

Weirdly enough, using dnf provides \*/nvidia-smi prints:

[user@fedora-toolbox-40 user]$ dnf provides \*/nvidia-smi
Last metadata expiration check: 0:00:34 ago on sat, 02 nov 2024 15:53:02.
podman-compose-1.2.0-1.fc40.noarch : Run docker-compose.yml using podman
Repo        : updates
Matched from:
Filename    : /usr/share/doc/podman-compose/examples/nvidia-smi

Why does it print podman-compose and not xorg-x11-drv-nvidia-cuda?

Also (from within Distrobox container):

[user@fedora-toolbox-40 user]$ sudo dnf install xorg-x11-drv-nvidia-cuda
Last metadata expiration check: 0:23:03 ago on sat, 02 nov 2024 15:33:45.
No match for argument: xorg-x11-drv-nvidia-cuda
Error: Unable to find a match: xorg-x11-drv-nvidia-cuda

For clarity, I am looking into installing these drivers in both a Fedora distrobox container and on the system with rpm-ostree, if possible.

The repo must be available to the app performing the install. If dnf cannot read the rpmfusion-nonfree-updates or the rpmfusion-nonfree (or the rpmfusion-nonfree-nvidia-driver) repo files then it cannot locate the information needed to install that package.

In other words, the repo file must be readable inside the toolbox.

On the system the same applies. The repo must be enabled before rpm-ostree can perform that install.