Updating the display (graphics) driver on Ubuntu depends on the particular graphics card in your system (NVIDIA, AMD, or Intel). Here, I'll walk you through the general steps for checking and updating your graphics driver.
1. Identifying Your Graphics Card
First, identify your graphics card:
lspci | grep -E "VGA|3D"
This command lists the graphics hardware in your system.
2. Checking Current Driver
For NVIDIA:
Check the current driver version:
nvidia-smi
This command shows the driver version if an NVIDIA driver is installed.
For AMD:
Check the installed AMD driver version:
dpkg -l | grep amdgpu
For Intel:
Intel drivers are typically included in the kernel, so you'll generally already have the latest version with system updates. You can check for related packages:
dpkg -l | grep xserver-xorg-video-intel
3. Updating Your Graphics Driver
For NVIDIA:
-
Add NVIDIA PPA (Personal Package Archive):
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
-
Check available drivers:
ubuntu-drivers devices
-
Install the recommended driver:
sudo ubuntu-drivers autoinstall
-
Reboot your system:
sudo reboot
For AMD:
AMD drivers can be updated through the official AMD website or using the provided packages from the PPA if available.
-
Add the PPA (if exists):
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update
-
Install the driver:
sudo apt-get upgrade
-
Reboot your system:
sudo reboot
Alternatively, download the driver package directly from the AMD website, extract it, and run the installation script:
wget --referer=https://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-<version>.tar.xz
tar -Jxvf amdgpu-pro-<version>.tar.xz
cd amdgpu-pro-<version>
./amdgpu-pro-install -y
For Intel:
Intel graphics drivers are generally updated along with system updates. Ensure your system is fully updated:
sudo apt-get update
sudo apt-get upgrade
To use the oibaf PPA for newer open-source drivers:
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update
sudo apt-get upgrade
Then reboot:
sudo reboot
Verification
After updating and rebooting your system, verify that the new driver is in use.
For NVIDIA:
nvidia-smi
For AMD:
glxinfo | grep "OpenGL version"
For Intel:
glxinfo | grep "OpenGL version"
Summary
Updating your graphics driver on Ubuntu involves identifying your current hardware and driver, adding any relevant PPAs, and using the package manager to update the driver. By following these steps, you'll ensure your system is running the latest graphics drivers available for your hardware.