Okay, I need to open a secure shell session to my remote machine.
And in the remote machine, which is the name gpu, we are going to start with LSPCI
K, which is showing the PCI bus, including the kernel modules that are currently in use.
So where is it?
Here it is the 3D controller. It is an Nvidia L4 GPU.
That's an expensive GPU, that is, that is created to do AI calculations at
a small scale and as you can see it is using the Nouveau driver.
That is problematic because in order to perform AI operations on an Nvidia GPU you need
a specific feature called cuda and CUDA is not available for the open source source driver.
So what do we need to do? Well, we need to add some repositories to start it.
So we are on a Fedora distribution and on fedora you need RPM fusion for additional
RPMs and the most important one that I'm loading here is a second repository and the
second repository is for non free packages and that happens to include the Nvidia driver.
So yes, I want to make these changes, then I can start
using them. So what are we going to do? Well, I need
to install Akmod Nvidia as well as Xorg X11 DRV, Nvidia CUDA.
Now in case you are wondering, how do you know? Well, if it is about proprietary drivers, there
is one solution only and that is to do some research. And it really depends on the driver
that you are trying to install and the Linux distribution where you are trying to install it.
But this is the procedure for my current version of Fedora and as you can see it
is going to download half a gig and after installation it will have added much more.
That is because this is not only the Nvidia driver, it also goes with the CUDA framework.
As it's a new repository, it's prompting for the GPG key for the repository. So
yes is the appropriate answer and then you'll need to wait a little bit.
You might see there are some deprecation messages here.
Deprecation messages is that it is better not to use this anymore.
But it still works and as you can see it is complete.
Now depending on the Fedora release that you are using, you
might need AK mod force, but on modern Fedora that is
no longer required. What this required is Dracut minus minus force.
That is because we just installed a new driver and this new driver should be in the INIT RAMFS
of this Fedora system so that you can use it right from the moment that the system is booting.
That might take a little bit because it needs to generate a new init ramfs and it
needs to detect all hardware and make sure that it is reflected in the inner ramfs.
Now that we are done reboot is unavoidable.
Let me open root shell because it's more convenient for this hardware related stuff and
then LSPCI K and what is it showing us here? Kernel modules Nvidia DRM in
Nvidia so that means that the Nvidia driver was installed successfully and to test if
this is really the Nvidia has this utility Nvidia SMI Nvidia SMI is giving information
about the current hardware that it has found. Here you can see that the Nvidia
L4 GPU was perfectly found and here's a bonus DNF install Y NV top that's
a cool utility as well if you are into Nvidia hardware.
So NV Top is showing activity on the GPU right now it isn't doing anything
but if GPU performance is important for you this is the go to utility.