How to Install Mesa 18.0.4 in Ubuntu 18.04 LTS

Last updated: May 27, 2018

For those who want to install the latest Mesa 3D graphics driver 18.0.4, Canonical’s Timo Aaltonen has made it into Ubuntu-X Team PPA for Ubuntu 18.04 LTS.

Mesa 18.0.4 is so far the latest stable release that was announced a few weeks ago:

“r600 driver gets a fix for constant buffer boounds, which fixes rendering bugs in Trine and Witcher 1.

Several fixes for RADV driver: fixes around alpha channel in Pre-Vega, fix in multisample image copies, and fixes around multilayer images in compute path.

For the case of ANV/i965 drivers, also a couple of fixes, all of them around ISP. On top, there are a couple of fixes relative to code emission around 16-bit integers, and a a fix for a leak in blorp for Gen4 and Gen5.

Speaking of leaks, there are also fixes for winsys/radeon/amdgpu and pipe-loader.gets a couple of patches to fix a couple of leaks.

SPIR-V part gets a patch to apply OriginUpperLeft to FragCoord.

Mesa core gets a couple of patches to fix error handling in get_framebuffer_parameteriv, and to add missing support for glFogiv(GL_FOG_DISTANCE_MODE_NV).”

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"


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


I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee:

5 responses to How to Install Mesa 18.0.4 in Ubuntu 18.04 LTS

  1. Thank you very much.

  2. Great thanks and respect!
    Intel hm87 i54200 hd4600 Xubuntu 18.04

  3. Great to find this one! This resolved my Gephi on Ubuntu 18.04 crashing issue.

  4. thanks, this is freaking awesome, much respect

  5. You missed the step where you have to install the Mesa utility?

    sudo apt install mesa-utils