Now that Mesa 9.2 stable is a out, is there a way to upgrade to it in Ubuntu 13.04 without using unstable ppas?

I have a notebook with an AMD graphics card and I use it for games occasionally. The performance in Ubuntu 13.04 using open-source drivers is only OK, but I understand that mesa 9.2, combined with a new kernel (I have 3.11rc7 already installed) should improve performance a lot.

I had bad experiences using unstable PPAs in the past (like x-edgers) so I decided to wait for a stable version of Mesa. Now that it is out, will it be uploaded to standard Ubuntu repositories? If not, is there a stable Mesa PPA or something similar?


Solution 1:

This instructions are meant to read twice before doing anything.

You can build mesa yourself, of course this will require lots of wits and brace yourself in case something goes wrong.

For this just download the mesa sources (you must make sure that the deb-src entries in your sources.list are enabled):

wget https://launchpad.net/ubuntu/+archive/primary/+files/mesa_9.2.orig.tar.gz https://launchpad.net/ubuntu/+archive/primary/+files/mesa_9.2-1ubuntu1.diff.gz https://launchpad.net/ubuntu/+archive/primary/+files/mesa_9.2-1ubuntu1.dsc

Now we will need the building dependencies:

sudo apt-get build-dep mesa

Since the package is already debianized, it will give you a scapegoat to revert back any change made by the installation. Now we should extract our sources:

dpkg-source -x mesa_9.2-1ubuntu1.dsc
cd mesa-9.2/
dpkg-buildpackage 

Now, we can build with dpkg-buildpackage. The process will leave you with a bunch of .deb files in the parent directory. You should install the ones that you need. Done.

If in any case you hit:

dpkg-checkbuilddeps: Unmet build dependencies: llvm-3.3-dev (>= 1:3.3-4) libelf-dev dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting

This means that your libraries are too old to build the package. You can download the file and install it from saucy at your own risk.

TL;dr: having the bleeding edge on software is nice, but it has it risk. I would wait until they get released in Saucy. (I'm using Debian and the package is already on experimental, so I just have to chill out for a bit)

Solution 2:

For Mesa specifically you could try this PPA out. It's supposed to be more stable than Xorg-edgers. From the PPA description:

This PPA provides updated X (2D) and mesa (3D) free graphics drivers for radeon, intel and nvidia hardware. It is somewhat inspired by the xorg-edgers PPA but it only provides graphics drivers to lower the risk of package breakage and other problems.

You can find more information on the Phoronix thread.

Solution 3:

First you need to download Mesa 9.2. From the primary Mesa download site

Once downloaded need to unpack the files. To unpack .tar.gz files:

tar zxf MesaLib-x.y.z.tar.gz

Prerequisites for building

lex / yacc - for building the GLSL compiler. On Linux systems, flex and bison are used. Versions 2.5.35 and 2.4.1, respectively, (or later) should work.

python - Python is needed for building the Gallium components. Version 2.6.4 or later should work.

Building with autoconf (Linux/Unix/X11)

The primary method to build Mesa on Unix systems is with autoconf. The general approach is the standard:

./configure
make
sudo make install

But please read the detailed autoconf instructions for more details.

For more detailed info, see the Mesa website

For uninstalling/reverting see below:

Check the makefile for a make uninstall. If that doesn't work or doesn't exist, the best to do is carefully read the make install and manually undo what it did.

Another way is:

Download the source again. Run the configure script that comes with the source. This will rebuild the Makefile. Don't run make. To uninstall, most Makefiles define an uninstall command which you would run like this:

sudo make uninstall

Source:The Mesa 3D Graphics Library