How to Install Graphics Drivers on Ubuntu


Properly installed graphics drivers ensure optimal performance for gaming, rendering, and display quality on Ubuntu. This guide will walk you through the process of identifying, installing, and updating the right graphics drivers for your system.


1. Identify Your Graphics Card

Before installing drivers, identify your graphics card model and manufacturer (NVIDIA, AMD, or Intel).

  1. Check via Terminal:
    Open the terminal (Ctrl + Alt + T) and run:
   lspci | grep -E "VGA|3D"

This will display your graphics card information.

  1. Alternative Method:
    You can also use the glxinfo command:
   sudo apt install mesa-utils
   glxinfo | grep "Device"
  1. Learn More:
    For a detailed explanation of these commands, visit LinuxConfig.

2. Check for Existing Drivers

  1. Open Software & Updates:
  • Go to Applications > Software & Updates > Additional Drivers.
  1. Look for Available Drivers:
  • Ubuntu will list proprietary and open-source drivers compatible with your graphics card.
  1. Resource:
    If you’re unsure about choosing between open-source and proprietary drivers, Ubuntu’s Wiki on Graphics Drivers provides a clear explanation.

3. Installing NVIDIA Drivers

  1. Add the NVIDIA PPA:
    To ensure the latest drivers are available:
   sudo add-apt-repository ppa:graphics-drivers/ppa
   sudo apt update
  1. Install the Recommended Driver:
    Run:
   sudo ubuntu-drivers autoinstall
  1. Verify Installation:
    Check the installed driver version:
   nvidia-smi
  1. Helpful Link:
    Refer to NVIDIA’s official guide for Linux for advanced installation instructions.

4. Installing AMD Drivers

  1. Open-Source Drivers:
    AMD GPUs typically use the open-source amdgpu driver, which is installed by default on Ubuntu. Check for updates:
   sudo apt update && sudo apt upgrade
  1. Proprietary Drivers (Optional):
    If you need additional features, such as ROCm for compute tasks, download drivers from AMD’s official website.
  2. Check Compatibility:
    Verify that your GPU model is supported by the proprietary drivers on the AMD website.

5. Installing Intel Graphics Drivers

  1. Default Driver:
    Intel integrated GPUs typically work out-of-the-box with the i915 driver.
  2. Update the Mesa Drivers:
    For improved performance, update to the latest Mesa drivers:
   sudo add-apt-repository ppa:kisak/kisak-mesa
   sudo apt update && sudo apt upgrade
  1. More Info:
    Detailed instructions for Intel GPUs are available on the Intel Open Source Graphics Wiki.

6. Verify Driver Installation

  1. Check the Loaded Driver:
    Run:
   lsmod | grep <driver-name>

Replace <driver-name> with nvidia, amdgpu, or i915.

  1. Check Display Information:
    Use xrandr to see which driver is controlling your display.
  2. Test Performance:
    Run a benchmark tool like glmark2:
   sudo apt install glmark2
   glmark2
  1. Resource:
    Learn how to benchmark your GPU using Phoronix Test Suite.

7. Troubleshooting

  1. Reinstall Drivers:
    If you encounter issues, remove and reinstall drivers:
   sudo apt remove --purge <driver-package>
   sudo apt install <driver-package>
  1. Revert to Open-Source Drivers:
    Switch back to default drivers:
   sudo apt install xserver-xorg-video-nouveau
  1. Helpful Guide:
    Follow this Ask Ubuntu thread for fixing black screen issues after installing drivers.

Leave a Reply

Your email address will not be published. Required fields are marked *