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 ..
Could the hardware acceleration be slower due to the presumably more complicated x server? and not because of non-updated libraries? (or both)
EDIT: This could be a reason. So I held the packages that you upgraded manually, and now when trying to upgrade the system these packages have unmet dependencies. libgbm1 : Depends: libgl1-mesa-dri (= 11.0.2-1ubuntu4) but 11.1.1-1ubuntu2 is installed libwayland-egl1-mesa : Depends: libegl1-mesa (= 11.0.2-1ubuntu4)
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.
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
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
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.
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 :
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
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
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.
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?