Introduction
For optimal performance from an NVIDIA GPU on Linux, you must use the proprietary drivers. Although the open-source Nouveau driver suffices for basic display tasks, it lacks the optimizations necessary for gaming, GPU acceleration, and AI workloads on your VoxiHost workstation or server.
This guide covers the three main installation methods for NVIDIA drivers on Ubuntu-based systems, starting with the recommended automated tools and ending with a detailed manual installation procedure.
Prerequisites: Ensure your system is up to date and you have a compatible NVIDIA GPU. Always back up your system before making major driver changes.
Step 1: Automatic Installation
The recommended approach is to let the system detect the hardware automatically and install the appropriate driver version:
sudo apt update
sudo ubuntu-drivers install
Reboot your system once the installation completes. This method is ideal for most setups since it manages system updates and DKMS (Dynamic Kernel Module Support) automatically.
Step 2: (Optional) PPA Installation
If your hardware requires a newer driver version than the default repositories provide (such as for recent graphics card architectures), use the official graphics drivers PPA:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
You can then query the available versions and install the required one:
ubuntu-drivers list
sudo apt install nvidia-driver-550 # Replace with the desired version
Step 3: Manual Installation with Secure Boot
If you prefer the official manual .run installer and have UEFI Secure Boot enabled, you must sign the kernel module before the system will load it.
Generate a Signing Key
mkdir ~/mok-keys && cd ~/mok-keys
openssl req -new -newkey rsa:2048 -days 36500 -nodes -keyout MOK.key -out MOK.csr
openssl x509 -req -in MOK.csr -signkey MOK.key -out MOK.crt
openssl x509 -in MOK.crt -outform DER -out MOK.der
Enroll the Key
sudo mokutil --import MOK.der
Set a secure one-time password and reboot. During system boot, the blue MokManager utility will appear: choose "Enroll MOK", confirm, and enter the password.
Run the Installer
After boot, stop your display manager (if active) and launch the installer, passing the key paths as arguments:
sudo ./NVIDIA-Linux-x86_64-xxx.xx.run --module-signing-secret-key=/home/your-user/mok-keys/MOK.key --module-signing-public-key=/home/your-user/mok-keys/MOK.crt
Conclusion
Once the installation completes, verify the GPU status by running:
nvidia-smi
If you see a table with your GPU details, you are ready to go! For those running GPU-accelerated containers, don't forget to check out the NVIDIA Container Toolkit.
Looking for a high-performance environment for your AI projects? Check out VoxiHost Premium VPS plans with dedicated resources.
