WARNING : this tutorial is only for advanced users who want to play with the new opengl driver
THE DRIVER IS NOT STABLE AND FREEZE SOMETIMES !
YOU CAN LOOSE YOUR DATA SO MAKE SOME BACKUP BEFORE TESTING !
The new opengl driver was out yesterday for raspbian, this is a tutorial to activate it in unbuntu mate, lubuntu and xubuntu for raspberry pi 2.
Upgrade kernel version, open a terminal then :
sudo rpi-update
Edit file /boot/config.txt :
sudo pluma /boot/config.txt
Add the line :
dtoverlay=vc4-kms-v3d
Add the line or modify gpu_mem to 128:
gpu_mem=128
Save & quit.
Then we need to erase the xorg.conf, but it is better to rename it, if we want to go back :
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
Now we need to update mesa :
IMPORTANT : if you want to revert mesa in the futur you need to backup mesa libs
mkdir mesabackup
cd mesabackup
apt-get download libdrm-freedreno1 libgl1-mesa-dri libegl1-mesa libglapi-mesa libgl1-mesa-glx libgles1-mesa 1libgles2-mesa libglu1-mesa libwayland-egl1-mesa mesa-utils libgbm1
cd …
END OF BACKUP
Then, install new mesa version
mkdir mesa
cd mesa
wget https://launchpad.net/ubuntu/+source/mesa/11.1.1-1ubuntu2/+build/8881184/+files/libegl1-mesa_11.1.1-1ubuntu2_armhf.deb https://launchpad.net/ubuntu/+source/mesa/11.1.1-1ubuntu2/+build/8881184/+files/libgl1-mesa-dri_11.1.1-1ubuntu2_armhf.deb https://launchpad.net/ubuntu/+source/mesa/11.1.1-1ubuntu2/+build/8881184/+files/libgl1-mesa-glx_11.1.1-1ubuntu2_armhf.deb https://launchpad.net/ubuntu/+source/mesa/11.1.1-1ubuntu2/+build/8881184/+files/libglapi-mesa_11.1.1-1ubuntu2_armhf.deb https://launchpad.net/ubuntu/+source/mesa/11.1.1-1ubuntu2/+build/8881184/+files/libgles1-mesa_11.1.1-1ubuntu2_armhf.deb https://launchpad.net/ubuntu/+source/mesa/11.1.1-1ubuntu2/+build/8881184/+files/libgles2-mesa_11.1.1-1ubuntu2_armhf.deb http://launchpadlibrarian.net/234263009/libdrm-freedreno1_2.4.66-2_armhf.deb http://launchpadlibrarian.net/222366701/libglu1-mesa_9.0.0-2.1_armhf.deb http://launchpadlibrarian.net/222366701/libglu1-mesa_9.0.0-2.1_armhf.deb http://launchpadlibrarian.net/234861434/libwayland-egl1-mesa_11.1.1-1ubuntu2_armhf.deb http://launchpadlibrarian.net/229716045/mesa-utils_8.3.0-1_armhf.deb http://launchpadlibrarian.net/234861425/libgbm1_11.1.1-1ubuntu2_armhf.deb
sudo dpkg -i libdrm-freedreno1_2.4.66-2_armhf.deb
sudo dpkg -i libgl1-mesa-dri_11.1.1-1ubuntu2_armhf.deb
sudo dpkg -i libegl1-mesa_11.1.1-1ubuntu2_armhf.deb
sudo dpkg -i libglapi-mesa_11.1.1-1ubuntu2_armhf.deb
sudo dpkg -i libgl1-mesa-glx_11.1.1-1ubuntu2_armhf.deb
sudo dpkg -i libgles1-mesa_11.1.1-1ubuntu2_armhf.deb
sudo dpkg -i libgles2-mesa_11.1.1-1ubuntu2_armhf.deb
sudo dpkg -i libglu1-mesa_9.0.0-2.1_armhf.deb
sudo dpkg -i libwayland-egl1-mesa_11.1.1-1ubuntu2_armhf.deb
sudo dpkg -i mesa-utils_8.3.0-1_armhf.deb
sudo dpkg -i libgbm1_11.1.1-1ubuntu2_armhf.deb
Reboot, it’s done !
The hardware acceleration works but it is slower than raspbian.
Acceleration works in Chromium too and vlc works with glx video output too !
If I try glxgears ~240 fps and it is ~460 fps in raspbian.
So there is some things I forget maybe we need to update more mesa packages or Xorg ?
Anyone have some ideas about what is missing ?
How to disable the driver :
Edit file /boot/config.txt :
sudo pluma /boot/config.txt
Comment the line with a # at the begining :
#dtoverlay=vc4-kms-v3d
Reverse xorg.conf :
sudo mv /etc/X11/xorg.conf.bak /etc/X11/xorg.conf
Revert mesa librairies :
Go to your mesabackup directory
cd mesabackup
sudo apt-get clean
sudo dpkg -i libdrm-freedreno1_2.4.64-1_armhf.deb
sudo dpkg -i libgl1-mesa-dri_11.0.2-1ubuntu4_armhf.deb
sudo dpkg -i libegl1-mesa_11.0.2-1ubuntu4_armhf.deb
sudo dpkg -i libglapi-mesa_11.0.2-1ubuntu4_armhf.deb
sudo dpkg -i libgl1-mesa-glx_11.0.2-1ubuntu4_armhf.deb
sudo dpkg -i libgles1-mesa_11.0.2-1ubuntu4_armhf.deb
sudo dpkg -i libgles2-mesa_11.0.2-1ubuntu4_armhf.deb
sudo dpkg -i libglu1-mesa_9.0.0-2_armhf.deb
sudo dpkg -i libwayland-egl1-mesa_11.0.2-1ubuntu4_armhf.deb
sudo dpkg -i mesa-utils_8.2.0-1ubuntu1_armhf.deb
sudo dpkg -i libgbm1_11.0.2-1ubuntu4_armhf.deb
sudo apt-get update
sudo apt-get upgrade
Enjoy
EDIT : Added more packages dependancies
EDIT2 : Remove some useless steps.
EDIT3 : Added clean mesa revert
EDIT4 : Added setting of gpu_mem
Aworan