How to Install Mesa 18.1.1 via PPA in Ubuntu 18.04

The latest Mesa 3D graphics library 18.1.1 now can be easily installed in Ubuntu 18.04 LTS via PPA.

For those sticking to the open-source drivers and need graphics performance improvements (e.g. for playing games), Canonical’s Timo Aaltonen has pushed Mesa 18.1.1 in the x-updates PPA.

1. Open terminal either via Ctrl+Alt+T or by searching for ‘Terminal’ from software launcher. When it opens, run command:

sudo add-apt-repository ppa:ubuntu-x-swat/updates

Type your password (no asterisks while typing due to security reason) when it prompts and hit Enter to continue.

2. After adding the PPA, do system update via command:

sudo apt-get dist-upgrade

apt-get update is not required any more in Ubuntu 18.04 since adding PPA automatically refreshes system repositories.

3. Finally check your driver version via command:

glxinfo | grep "OpenGL version"

Uninstall:

To restore changes and downgrade to the default drives shipped in Ubuntu 18.04, run command:

sudo apt-get install ppa-purge && sudo ppa-purge ppa:ubuntu-x-swat/updates