How to Upgrade Mesa Drivers on Linux Mint 21 or 20

For Linux Mint users keen on optimizing graphics performance, upgrading Mesa drivers is crucial. Mesa drivers are open-source graphics drivers compatible with a wide array of hardware, making them a cornerstone for gaming, video editing, and 3D modeling. This guide will focus on how to upgrade Mesa drivers on Linux Mint 21 or its older stable release, Linux Mint 20.

Key Mesa Driver Components

  • Gallium3D Drivers: Cater to AMD GPUs (RadeonSI) and Nvidia GPUs (Nouveau).
  • Classic Drivers: Primarily for older Intel iGPUs, like i965.
  • Additional Components: Mesa state tracker, Clover library for OpenCL support, and Vulkan drivers for AMD and Intel.

Why Upgrade Mesa Drivers?

  • Updated Features: Newer versions often introduce features not available in the standard drivers from Linux Mint repositories.
  • Performance Boost: Upgrades can enhance graphics rendering efficiency.
  • Bug Fixes: Newer versions may resolve existing issues in your current drivers.

Why Use Kisak PPA?

  • Latest Builds: Offers the most recent Mesa drivers.
  • Compatibility: Supports both Linux Mint 21 and Linux Mint 20.

The upcoming guide will provide a step-by-step process to upgrade Mesa drivers on Linux Mint 21 or 20 using the Kisak Launchpad PPA. This repository offers the latest Mesa drivers built for both Linux Mint versions, ensuring you get the most out of your system’s graphics capabilities.

Section 1: Pre-installation Steps

Setting the foundation for a smooth upgrade process involves a few preparatory steps. Carefully following these steps ensures your system is ready for the Mesa driver upgrade.

Step 1: Update Linux Mint Before Mesa Drivers Upgrade on Linux Mint 21 or 20

Before delving into any software installation or upgrade, ensuring your system packages are current is good practice. An up-to-date system minimizes the chance of encountering compatibility issues. Run the following command in your terminal to update your Linux Mint system:

sudo apt update && sudo apt upgrade

This command first updates the package index (sudo apt update) and then upgrades the installed packages to their latest versions (sudo apt upgrade).

Step 2: Install Initial Packages for Mesa Drivers Upgrade on Linux Mint 21 or 20

In order to streamline the process of identifying the correct Mesa drivers for your system, there are specific utility packages that can be installed. Among these, mesa-utils allows you to access tools such as glxinfo that can be used to display information about your current OpenGL implementation. The ppa-purge package allows you to safely remove a PPA and revert to the official distribution packages, which can be crucial if you need to remove the Mesa drivers at a later stage.

Run the following command to install these packages:

sudo apt install mesa-utils ppa-purge-y

While PPA-Purge is a useful tool, it’s worth noting that it might not fully remove all the Mesa drivers. However, it remains a viable starting point for driver removal.

Step 3: Determine the Current Mesa Drivers Version on Linux Mint

Before proceeding with the upgrade, it’s crucial to know the version of the Mesa drivers currently installed on your system. This can help you decide whether an upgrade is necessary and to validate the success of the upgrade once completed.

To check your current Mesa driver version, use the glxinfo tool with a grep command to filter out the OpenGL version, as shown below:

glxinfo | grep "OpenGL version"

Upon executing this command, you should see an output similar to the one below, detailing your current OpenGL version:

Screenshot showing glxinfo command output before upgrading Mesa drivers on Linux Mint 21 or 20Pin
Screenshot depicting the glxinfo command output before upgrading Mesa drivers on Linux Mint 21 or 20.

Please bear in mind that your actual output will vary depending on the specifics of your current Mesa drivers. This step ensures you’re fully aware of your starting point before embarking on the upgrade process.

Section 2: Install or Upgrade Mesa Drivers on Linux Mint 21 or 20

Navigating the upgrade process involves incorporating the Kisak PPA into your system, which hosts the freshest Mesa drivers builds. After this, we’ll carry on with the upgrade, ensuring that we confirm the Mesa driver’s version after completion.

Step 1: Import Kisak PPA for the Latest Mesa Drivers on Linux Mint 21 or 20

The Kisak PPA is a specialized repository for the latest upstream Mesa drivers. It’s constructed to supply users with the most recent driver updates for superior performance and newer functionalities.

The following command will incorporate the Kisak PPA into your system, making the latest Mesa driver versions available for installation:

sudo add-apt-repository ppa:kisak/kisak-mesa -y

After executing this command, the system’s list of software sources now includes the Kisak PPA, expanding the range of Mesa driver versions available to you.

Step 2: Upgrade Linux Mint System Packages Including Mesa Drivers

With the Kisak PPA successfully incorporated into your system, your next step is to refresh the system’s list of available packages. This action ensures that the system is aware of the updated versions of packages, including Mesa drivers, present in the newly added PPA.

Use the following command to update the list of packages:

sudo apt update

During this package index update, you should observe several updates related to Mesa drivers. These updates signify that the system is now prepared to upgrade the Mesa drivers to the versions available in the Kisak PPA.

To begin the upgrade process, execute the following command:

sudo apt upgrade

This command instructs the system to upgrade all packages, including the Mesa drivers, to their latest versions present in the active software sources, which now includes the Kisak PPA.

After the upgrade, confirming that the new driver version is correctly installed and active is crucial. The glxinfo tool is again useful for this verification, similar to the pre-installation verification:

glxinfo | grep "OpenGL version"

This command should return an output reflecting the upgraded Mesa driver version, confirming the successful execution of the upgrade process.

Screenshot showing example of Kisak Mesa drivers successfully upgraded on Linux Mint 21 or 20Pin
Screenshot illustrating a successful upgrade of Kisak Mesa drivers on Linux Mint 21 or 20.

Section 3: Reverting to the Default Mesa Drivers on Linux Mint 21 or 20

In some instances, an upgrade to the Mesa drivers may introduce unexpected behavior or compatibility issues with your system’s software. To rectify this, the system provides the option to downgrade the Mesa drivers to their default version. This process requires the ppa-purge utility, a package designed to downgrade the software from a PPA and revert back to the Ubuntu repositories. If you didn’t install it earlier, now would be the time.

Step 1: Install the PPA-Purge Utility on Linux Mint

The ppa-purge utility allows you to downgrade packages and restore the system’s pre-PPA state. It removes the specified PPA from your software sources and downgrades any packages installed from there back to the versions available in the official Ubuntu repositories.

To install the ppa-purge utility, execute the following command:

sudo apt install ppa-purge

Please note, for those using Ubuntu derivatives, the ppa-purge command requires an additional parameter, -d, followed by the base name of your distribution, to operate safely.

Step 2: Downgrading Mesa Drivers on Linux Mint

After ensuring the ppa-purge utility is installed, we can proceed to downgrade the Mesa drivers. The command to do this will vary depending on the version of Linux Mint you are running.

For Linux Mint 21, use the following command to purge the Kisak PPA and downgrade your Mesa drivers:

sudo ppa-purge -d jammy ppa:kisak/kisak-mesa -y

If you are using Linux Mint 20, the command to execute will be:

sudo ppa-purge -d focal ppa:kisak/kisak-mesa -y

Please note that while these commands should work on most systems, highly customized systems with numerous PPAs may encounter issues. Always remember to back up your system before making these significant changes.

glxinfo | grep "OpenGL version"

Step 3: Confirming the Downgrade on Linux Mint

Having executed the downgrading process, it is crucial to validate that the Mesa drivers were successfully reverted to their default version. This step is a reiteration of a familiar process; we will use the glxinfo utility to check the current version of the Mesa drivers.

glxinfo | grep "OpenGL version"

This command should now yield an output reflecting the default Mesa driver version, confirming the successful downgrade. By carefully following these steps, you can manage your Mesa drivers confidently, knowing you can revert to a previous version if needed.

Concluding Remarks

In the realm of Linux distributions, the ability to manage and optimize graphical drivers is an essential skill for both casual users and system administrators alike. The article has provided an in-depth understanding of how to upgrade and downgrade the Mesa drivers on Linux Mint, as well as the importance of using tools like the Kisak PPA and the ppa-purge utility.

It’s essential to remember that these beneficial operations are not without risks. Therefore, always ensure a recent system backup and perform these actions responsibly. This careful approach, coupled with the knowledge imparted in this article, will help you maintain your system’s graphics performance optimally.

Share to...