[Tutorial] - Activate OpenGL driver

Yes I install for a new fresh install I had the same problem but I fixed it.
I will update the tutorial :

you need extra packages :

wget 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

Then :

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

Thanks a lot!
Chromium is smoother now! If only we had video decoding as well.
Iā€™ll take a look at your vlc tutorial later.

I have one last issue, I still have an outdated libgbm1 and I canā€™t find one compatible with mesa 11.1.1
Iā€™m asking because my display isnā€™t being rendered fully. I have this section of my screen black.
Iā€™ll post a picture soon.

Do you have this issue as well?

EDIT:
Found this one https://packages.debian.org/sid/armhf/libgbm1/download

EDIT2:
I still have the black display issues, any idea whatā€™s causing it?
http://imgur.com/pHl00nH
Left side of the screen.

Yes maybe there is a way recompling chromium-codecs-* packages.
I didn't have time to take a look ont it.
I think it can be easier with firefox, I explain in the lasts builds of firefox if ffmpeg (then libavcodec) is installed firefox use it by default.
So I write a tutorial how to compile ffmpeg/libavcodec with video hardware acceleration but it don't work because it is no possible to choose an hardware acceleration or a specific video codec.
My idea is changing source code of ffmpeg to switch h264 codec code by h264_mmal codec which have hardware video decoding.
I need some time to do it, if you wanna try and know C languages the files are in libavcodec directory h264.c and mmaldec.c.
I will try soon but it needs some time :stuck_out_tongue:
Maybe same trick is possible in chromium rebuilding the packages of chromium-codecs or/and chromium-codecs-extra because I know it is based on ffmpeg too.

Yes, I write some tutorials about it, if you want but hardware decoding only works on fullscreen for now. try the OpenMax-Il version it is stable, MMAL version is buggy (I think we must want a new version for mmal stuff, I think vlc team based his work on old version of firmware).
Could you try some hd video in OPENMAX-IL version with GLX output ?
GLX output works with the opengl driver (I tested it with no hd video) but I don't know if vlc uses openmax decoder in that video output.
Another solution for video decoding in windoded / fullscreen mode with hadware video decoding for playing hd video is mpv.
I will try to write some tutorial about it soon too ! And it work with great GUI like SMplayer or bomi !

I don't know, I try the new driver only on lubuntu (https://ubuntu-pi-flavour-maker.org/) because I have a old sdcard of 4GB for tests and mate need more space for playing with it.
I will try mate this weekend.
I have a bug too in raspbian or lubuntu, I have a old 4/3 screen (1280x1024) and there is space not used too but in the bottom !

I can't put my mouse pointer in it.
I will try with mate this weekend I will tell you, I will try with my hd tv too because I only have an old school monitor with DVI input :wink:

The input of your screen is HDMI ? or DVI ?

I think both but I am not sure, I think the best is to have an alpha version of next ubuntu (xenial) to make better tests because it have the good version of mesa out the box, so we don't need to make dirty updates of the mesa packages !
The build are made with https://ubuntu-pi-flavour-maker.org/ so maybe it's possible to build the alpha version of xenial or ask the team to provide it.

Thank you! If I get some time I will look at it.

Definitely! Once the driver has stabilized a bit Iā€™m going to be trying all sorts of stuff with video decoding on the pi.

Very strange! I was able to put my mouse pointer, and certain things would be drawn, like the lower menu bar.
I have an HDMI screen! So I wonder if you will see the same issue with an HDMI screen.

Interestingly, I was able to play a couple opengl games and they ran beautifully! It froze once and I had to hard reset the Pi, but it was glorious.

One last thing, I disabled the driver by doing your instructions (the screen issue was gone) however, when I try to apt-get upgrade the libraries did not go back to their old versions. Did ubuntu mate update their repos?
I also donā€™t have any of them held.

Cheers! Very exciting stuff for the pi. Iā€™m personally using it as a chromebook style laptop (with the mototora atrix lapdock) and all I am missing is a slightly smoother browsing experience and a way to play videos without going full screen so that I can do work at the same time! Either youtube or vlc.
Itā€™s so close!

No, I am stupid sometimes, mesa libs are newer than in repo so there is no need to hold them, they will never get upgraded.
I correct the tutorial about that, but I donā€™t know how to revert them.
I think the best is before doing the tutorial save mesa libs :

mkdir mesabackup
cd mesabackup
sudo 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

then when you go to go back make some dpkg -i of the packages.

I will test I update tutorial if it works !

Ok you can revert mesa with :

mkdir mesarevert
cd mesarevert
sudo apt-get clean
sudo apt-get update
apt-get download libdrm-freedreno1=2.4.64-1 libgl1-mesa-dri=11.0.2-1ubuntu4 libegl1-mesa=11.0.2-1ubuntu4 libglapi-mesa=11.0.2-1ubuntu4 libgl1-mesa-glx=11.0.2-1ubuntu4 libgles1-mesa=11.0.2-1ubuntu4 libgles2-mesa=11.0.2-1ubuntu4 libglu1-mesa=9.0.0-2 libwayland-egl1-mesa=11.0.2-1ubuntu4 mesa-utils libgbm1=11.0.2-1ubuntu4
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

I update the totorial right now :wink:

How much is you gpu_mem in /boot/config.txt ?
If it is not set you only have 64Mo by default try adding /boot/config.txt :
gpu_mem=256
if it fix the problem you can try lowering value to 128

Awesome!! It is fixed! Strange though, if I give the GPU 256MB of memory the pi wonā€™t boot. I had to lower it to 128, and then it works and the black screen issue is resolved.
Though as you mentioned the driver does crash a bit, however I like being able to more graphic intensive games now!
By the way, are we sure the X server is using the driver? For some reason the menus are not as responsive and thereā€™s delays when drawing the screen even for simple programs like terminal.

Ok I know for now driver is only for raspberry pi 2 because it use a lot of memory so maybe if we give 256Go to GPU there is not enouth ram free for the driver working :slight_smile:

Maybe I donā€™t really know but Iā€™m sure it need something more to work great.
I will try to update Xserver but I think there is a lot of package dependancies ā€¦

Let me start by saying that this is really great stuff. Great work OP and the rest of you guys for the tutorial on getting the driver to work on Mate. That said, I am having some serious problems with the OpenGL driver - which is obviously to be expected. For one, it pretty much breaks the desktop - everything (including windows, drop down menues, docky, etc) just runs much slower than with software rendering. Secondly, the driver crashed very frequently (again, this is to be expected I know). I also have encountered missing icons and appletes when using the driver. Now, what I really would like to know is - has anyone encountered (and perhaps sorted out?) the problems with desktop slowdowns using the driver, or am I the only one. Again, thanks for the great tutorial. cheers !

Hi,
Yes activating the driver is unstable. I donā€™t find a way to fix it. I think it will be works better with next release of Ubuntu mate (16.04) because we donā€™t have to update mesa libs anymore. So I think it would work like in raspbian !
So there is only one month to wait :wink:

Cheers,

Aworan

Hi,

Thanks for responding. So, you think that a functioning version of the driver can find its way into Ubuntu Mate 16.04? That would be great !

Take care!

What is the status of the OpenGL driver in Mate 16.04 for the pi3? Does its activation procedure differ than the procedure listed above?

Hi,
You donā€™t have to update mesa librairies because they are already in the good version with 16.04.
I didnā€™t try yet with pi 3, I read somewhere it donā€™t work with 4.1.x kernel.
I will try next week, I will post here if I found how to do it.

Aworan

Thank you. Iā€™m looking forward to your results.

BobMarso

See my other posting where I describe trying to get OpenGL installed and working with 16.04 on a pi3

Hi,
I manage to activite the driver on Ubuntu 16.04 on rpi2 and rpi3 :slight_smile:
I works very great glxgears is faster than raspbian !
I will post a very easy tutorial soon :slight_smile:
See my teasing here : https://ubuntu-mate.community/t/teasing-aworans-next-tutorial-activate-opengl-driver-for-ubuntu-mate-16-04-for-rpi2-and-rpi3/7076

Stay tune !

Aworan

In 16.04 on a Pi 3 I have no xorg.conf in /etc/X11, just a xorg.conf.d in usr/share/X11.
Can I just skip the renaming step or should I do somrthing different?

Cheers :sunglasses:,
Caleb

You must do something different :wink:
I will post later :slight_smile:

The new tutorial for 16.04 is out :


TuxRacer or Quake 3 work like a charm :slight_smile:
Vlc with glx output too :slight_smile:
Chromium have gl acceleration, youtube 720p videos are smooth with software decoding on rpi3 but you need a fan and heatsink !

1 Like