Linux Ubuntu OS install Nvidia Driver Guide
09 Apr 2025
0 comments
1. Check if Graphics Card Drivers Are Installed on Your Computer
Run the following command in the terminal:
nvidia-smi
If the output matches the following, drivers are already installed. No need to proceed with this guide.
If the output differs, follow the installation steps below.
Preparation is critical to avoid issues like black screens after driver installation. These steps will not affect your system but skipping them may cause failures.
2. Disable Secure Boot
- Restart your computer and enter BIOS settings during boot.
- Locate the security settings and disable Secure Boot. Press F10 to save and exit.
Note: BIOS access methods and security settings vary by manufacturer.
3. Switch to Discrete Graphics Mode
Configure this based on your computer's specifications.
4. Update Software List and Install Essential Tools/Dependencies
sudo apt-get update
sudo apt-get install g++
sudo apt-get install gcc
sudo apt-get install make
5. Disable Nouveau
Nouveau is a generic driver. Disable it before installing NVIDIA drivers.
- Edit the configuration file:
sudo gedit /etc/modprobe.d/blacklist.conf
- Add these lines at the end:
blacklist nouveau options nouveau modeset=0
- Execute the following commands:
sudo update-initramfs -u sudo reboot # Restart the computer
- After reboot, verify Nouveau is disabled:
lsmod | grep nouveau # If the output is empty, nouveau is successfully disabled
6. Install LightDM
LightDM is a display manager with better compatibility than gdm3.
sudo apt-get install lightdm
Press Enter to confirm.
Use arrow keys to select lightdm and press Enter.
7. Install NVIDIA CUDA Toolkit
sudo apt-get install nvidia-cuda-toolkit
Check the recommended driver version and note it:
sudo ubuntu-drivers devices
8. Add Driver Repository
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
9. Install the Recommended Driver Version
sudo apt-get install nvidia-driver-570 # Replace "570" with your recommended version
Reboot after installation. Successful installation will show:
Troubleshooting Black Screen
- On the black screen, press
ctrl+alt+f1
to enter the tty command line. - Log in with your credentials, then run:
export LANGUAGE="en_US.UTF-8" # Set locale sudo apt-get --purge remove nvidia* sudo apt autoremove reboot
- If the issue persists, use:
sudo apt-get remove --purge nvidia*
Tags: