Setting up nvidia server drivers on Ubuntu 24.04
Normal installation:
Normally, nvidia drivers can installed simply by installing the corresponding metapackage for your GPU(s). These can be found using something like:
apt-cache search ^nvidia server metapackage
This should give you a list of potential packages to install. You probably want
to have DKMS and the open kernel version, so assuming you want version 550
,
you’d install nvidia-driver-550-server-open
.
Remember to also installed the corresponding version of nvidia-utils
(ie.
nvidia-utils-550-server
) and also nvidia-cuda-toolkit
.
P2P installation:
It stands to reason that you may benefit from installing tinygrad’s
P2P-enabled driver.
At time of writing, this kernel driver patch only exists for two driver versions.
However, applying the patch to a newer driver version should be relatively
straightforward (in fact, easier than convincing apt
to install an old version
of the nvidia driver, which is required to ensure the your userspace will work).
Here are some existing patch versions (not necessarily up to date):
Follow the README at these links for installation instructions. If you installed
a DKMS driver, don’t forget to remove that driver with dkms remove
.
P2P Verification
The installation and loading of the P2P driver can be checked using p2pBandwidthLatencyTest
from NVIDIA/cuda-samples
.