How to Install Mesa Drivers on Ubuntu [Latest and Stable]

This quick tutorial shows the steps to get a newer version of Mesa drivers on Ubuntu, be it stable release or cutting-edge development release.

What is Mesa?

Mesa itself is not a graphics card like Nvidia or AMD. Instead, it provides open source software implementation of OpenGL, Vulkan, and some other graphics API specifications for Intel and AMD graphics hardware. With Mesa, you can play high-end games and use applications that require such graphics libraries.

More information on Mesa can be found in this article.

How to install Mesa on Ubuntu?

Mesa drivers on Ubuntu

Mesa comes preinstalled on Ubuntu with the open source graphics drivers of Radeon, Intel and Nvidia (sometimes). Though it probably won’t be the latest Mesa version.

You can check if your system uses Mesa and the installed versions using this command:

glxinfo | grep Mesa

If for some reasons (like playing games), you want to install a newer version of Mesa, this tutorial will help you with that. Since, you’ll be using PPA, I highly recommend reading my in-depth guide on PPA.

Attention!

Installing new Mesa graphics drivers may also need a newer Linux kernel. It will be a good idea to enable HWE kernel on Ubuntu to reduce the chances of conflict with the kernel. HWE Kernel gives you the latest stable kernel used by Ubuntu on an older LTS release.

Install the latest stable version of Mesa driver in Ubuntu [Latest point release]

The Kisak-mesa PPA provides the latest point release of Mesa. You can use it by entering the following commands one by one in the terminal:

sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt update
sudo apt upgrade

It will give you the latest Mesa point release.

Remove it and go back to original Mesa driver

If you are facing issues and do not want to use the newer version of Mesa, you can revert to the original version.

Install PPA Purge tool first:

sudo apt install ppa-purge

And then use it to remove the PPA as well as the Mesa package version installed by this PPA.

sudo ppa-purge ppa:kisak/kisak-mesa

Install the latest Mesa graphics drivers in Ubuntu [Bleeding edge]

If you want the latest Mesa drivers as they are being developed, this is what you need.

There is this awesome PPA that provides open source graphics drivers packages for Radeon, Intel and Nvidia hardware.

The best thing here is that all driver packages are automatically built twice a day, when there is an upstream change.

If you want the absolute latest Mesa drivers on Ubuntu and do not want to take the trouble of installing it from the source code, use this PPA by Oibaf.

The PPA is available for 20.04, 20.10 and 21.04 at the time of writing this article. It is no longer updated for Ubuntu 18.04 LTS.

Open the terminal and use the following commands one by one:

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update
sudo apt upgrade

This will give you the latest Mesa drivers.

Remove it and go back to original Mesa driver

You can remove the PPA and the latest Mesa driver using the ppa-purge tool.

Install it first:

sudo apt-get install ppa-purge

Now use it to disable the PPA you had added and revert the Mesa package to the version provided by Ubuntu officially.

sudo ppa-purge ppa:oibaf/graphics-drivers

I hope this quick tutorial was helpful in getting a newer version of Mesa on Ubuntu. If you have questions or suggestions, please use the comment section.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries πŸ•΅οΈβ€β™‚οΈ

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.