Jump to content

OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)


dimag0g

Recommended Posts

Disclaimer 1: I ported OpenELEC with Kodi to H3

Disclaimer 2: I don't know how exactly Kodi works under X11, becauce OpenELEC doesn't use it.

 

I see that you are caught in the loop, so few clarifications:

1. Kodi doesn't need glshim, because it knows how to work with OpenGL ES

2. Currently you need legacy image. Vanilla a.k.a. mainline version is not there yet. Desktop version highly recommended.

3. You will have issues with HW acceleration of video decoding. Mali has nothing to do with it. libvdpau-sunxi doesn't work with Kodi, unfortunatelly. You have two choises. First, use SW decoding (can't use H265, because it is too slow, higher SoC temperature, ...) or secondly, use external player (mpv) which knows how to use libvdpau-sunxi, but you'll lose overlays (GUI which is rendered over video -> subtitles, stop, pause, ... buttons, info about video, etc.) and you have to learn mpv keyboard shortcuts. Choice is yours.

Link to comment
Share on other sites

My Banana Pi M1+ is A20, so this might not work.

 

Ah, ok, I missed that. While you can still try SW decoding, imo it is too slow. You can still however use external program, but I'm afraid that mentioned shortcommings still applies.

 

The most feature you will get from mosterta Kodi port (in your link), but I will have to figure how to compile everything. You need patched kernel, patched libvdpau-sunxi, patched Kodi and I think also some additional libraries. Again, you can do this only on legacy image.

Link to comment
Share on other sites

Yes, but it seems complicated now when I tried to go with that tutorial. How do I apply patch to the kernel? The rest is pretty simple, because it is cloning from git, compiling and installing. I think it requires cedarx, but there is no word about how to install it.

Link to comment
Share on other sites

How do I apply patch to the kernel?

 

It was explained many times on this forum. Do a search.

 

 

I think it requires cedarx, but there is no word about how to install it.

 

No, it doesn't. It depends on Cedrus open source project which aims to replace CedarX (libvdpau-sunxi is part of that project)

Link to comment
Share on other sites

It was explained many times on this forum. Do a search.

 

I did. It is not clear enough how to make a patch out of git commit. This - http://stackoverflow.com/questions/6658313/generate-a-git-patch-for-a-specific-commitis supposedly for a different purpose than to create a file that I could later use to patch my current kernel. Also, link that should point to tutorial how to apply patch on Armbian kernel is giving 404 - https://github.com/igorpecovnik/lib/blob/master/documentation/geek-faq.md

Link to comment
Share on other sites

Hello , there's a way to use hardware acelleration instead of mesa driver in Ubuntu Legacy 3.4.113 dekstop? , I try everyting and every time I have mesa driver.

 

I follow the dimag0g method  at the end when I run glxgears or run glmark2 I see that mesa driver is in use.

 

When i follow the linux-sunxi mali binary installation I can run the TEST  and can see the triangle ,  it says that I use malidriver, but when i run another aplication my default driver is mesa.

Link to comment
Share on other sites

Ok, so I started this tutorial again on legacy desktop. I have issues when trying to compile xf86-video-fbturbo. It says:

 

 

./configure: line 18655: syntax error near unexpected token `RANDR,'
./configure: line 18655: `XORG_DRIVER_CHECK_EXT(RANDR, randrproto)'

 

Also, before mali driver did not want to compile before I compiled and installed libdri2 and libump, because it was recognized as its dependencies.

 

Any thoughts?

Link to comment
Share on other sites

I follow the dimag0g method  at the end when I run glxgears or run glmark2 I see that mesa driver is in use.

 

Hard to say why that is happening, since I don't use Ubuntu. My first guess would be that libGL.so.1 is stored elsewhere, or is named slightly differently, so you didn't actually replace it.

Link to comment
Share on other sites

Also, before mali driver did not want to compile before I compiled and installed libdri2 and libump, because it was recognized as its dependencies.

Well, that's what the tutorial tell you to do, right? Anyway, I believe there is a pre-built package for xf86-video-fbturbo in armbian, so it may be worth a try to use that.

Link to comment
Share on other sites

Well, that's what the tutorial tell you to do, right? Anyway, I believe there is a pre-built package for xf86-video-fbturbo in armbian, so it may be worth a try to use that.

 

I have found a potential solution here: http://linux-sunxi.org/Xorg#fbturbo_driver- it says that autoreconf is breaking configure and it should be copied from git after running autoreconf. I will try that and check if it solves the issue.

Link to comment
Share on other sites

Ok, I installed eveything and I am having this things again when running globs:

 

 

libGL error: unable to load driver: mali_drm_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: mali_drm

 

any clues?

Link to comment
Share on other sites

I saw, you try to fight with @mostera XBMC for A10/A20. It use ES 2.0 and vdpau for decoding and don't need GL. Why don't you stick with this project? I give up on it some time ago, but i saw there is some development and more people have it running. This glshim have to work for A20, the same way as on H3 and i think it's originally build for A20. I don't know why you have those errors and don't have access to my A20 device to try myself. Test with es2_info, glxgears, es2gears if you have to move mesa folder, as i wrote before. Now i am 100% sure this tests come with mesa-utils-extra, because i had to use it pretty soon - Xenial , Jessie.

Link to comment
Share on other sites

Kodi? The only suitable way for your device is the @mosterta, XBMC build. I tried Kodi Jarvis installed directly (sudo apt-get install kodi) on Armbian Xenial from official repo, on H3 (4 core A7). It worked, i guess it used GLES for menu, navigation was acceptable, but for video without hw acceleration is useless. You have A20 (2 core A7), don't torture yourself with official build, it will be only worst, even if you make it run.

For mali driver, ES, 3D part, this could be of help for you - Open GLES for linux. I still can't understand what is wrong with your system and you can't run those tests from mesa-utils and mesa-utils-extra, but as you can see there, you can build and install from source too:

git clone --depth 1 git://anongit.freedesktop.org/mesa/demos

- Build it using:

  ./autogen.sh
  make
Link to comment
Share on other sites

Hi,

 

Ok, I installed eveything and I am having this things again when running globs:

libGL error: unable to load driver: mali_drm_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: mali_drm

any clues?

 

I also see this errors, just when using the Armbian Desktop for Cubietruck (Desktop, Xenial, 3.4.113) out of the box.

My concern is mostly about 2D hardware acceleration for some applications - like e.g. Firefox.

 

If I force-eneable hardware acceleration for chromium-browser, and the application is much more responsive, and faster - not showing errors like above.

If you force-enable hardware acceleration for Firefox, you will exactly see above errors - while it will still be slow like hell (e.g. even typing the URL hangs).

The same is true for e.g. gThumb. It also shows above errors, which implies that it falls back to software rendering, and having a very poor 2D performance.

 

When these applications fall back to 2D/fb sw-rendering, this is normally a difference from system load of 2.00-4.50 vs. 0.75 when hw-accelerated.

So it would be really nice if such applications could also use hw-acceleration.

 

Cheers,

  Sebi

 

P.S.: When I say out of the box, that's not really true, off course :)

- I installed lightdm, and lightdm-gtk-greeter

- I modified the video memory settings (sunxi_fb_mem_reserve=64 sunxi_g2d_mem_reserve=64 sunxi_ve_mem_reserve=96)

- I modified settings for fb0 (fb0_framebuffer_num = 4)

Link to comment
Share on other sites

Hello guys , I try to install Gl4ES  (https://github.com/ptitSeb/gl4es)  with success , in armbian Ubuntu Xenial Desktop .  For GL4ES you need to "put libGL.so.1 in your LD_LIBRARY_PATH". LD_LIBRARY_PATH is  "/usr/lib/arm-linux-gnueabihf" in the same path you need find "mesa" folder and rename it to ".mesa", maybe is the same for glshim.
You can run games like foobillard++ , openarena,quake ,etc .
Gl4ES is a wrapper for OpenGL 1.5, but the Hardware accelerated for chromium or firefox doesnt work.

Link to comment
Share on other sites

I followed all the instructions on the first page to build the mali drivers for the Nano Pi Neo Air on nightly Ubuntu 16.04.2 LTS - kernel 4.10.1.

 

Everything built and installed but when I try "modprobe mali" I get the error:

modprobe: FATAL: Module mali not found in directory /lib/modules/4.10.1-sun8i

I've searched everywhere and can't find out how to make the files that ended up in /usr/lib/mali be seen by the kernel. By all accounts this should work, but I'm a bit stuck. Any help would be greatly appreciated!

Link to comment
Share on other sites

Thanks! I've been having trouble on the forum discovering which kernel version people are talking about. I'm going to try using the legacy kernel, even though it sort of feels like a backwards move.

Link to comment
Share on other sites

It's interesting, though the (working) CHIP Mali drivers are running on kernel 4.x. Perhaps I skipped over where it was explained here, but what's blocking it from working here in the nightlies? Just no one's moved those patches over from the CHIP project? If I find some spare time, I'd be glad to help, though that tends to come at a premium these days.

Link to comment
Share on other sites

7 minutes ago, fraveydank said:

Perhaps I skipped over where it was explained here, but what's blocking it from working here in the nightlies?

No DRM display driver for the HDMI or TV out.

AFAIK without using some experimental branches the only way to run Mali on mainline is on A13, A31 or A33 hardware with LCD screen: https://linux-sunxi.org/Linux_mainlining_effort#Status_Matrix

Link to comment
Share on other sites

Ah, that makes sense, the CHIP's HDMI and VGA output adaptors use the LCD output bus and external ICs to drive their respective interfaces.

 

Isn't the A31 a PowerVR SGX GPU, though? Last I checked there wasn't a great Linux driver for that that was reasonably portable among kernels. I never did dig too far on that, though. I have a Banana Pi M2 that I'd love to get some sort of 3D working on, but oh well...

 

I'll check to see if I can find the experimental branches where, I assume, they have attempts at DRM drivers for HDMI.

Link to comment
Share on other sites

Hi everyone, this is my first post!

 

I am using OrangePi zero plus 2 H5 with the latest H5 experimental Armbian image for games.  OpenGL and openGL ES2 acceleration needed.

 

Will this solution work for the H5? 

 

How can I reconfigure the fist post from Dimag0g for the 64bit H5? if someone can send step by step instructions, it will be greatly appreciated by myself and others I am sure.

 

Link to comment
Share on other sites

Hello, I got the following error:

 

MESA-LOADER: failed to retrieve device information
LibGL error: unable to load driver: mali_drm_dri.so
LibGL error: driver pointer missing
LibGL error: failed to load driver: mali_drm

Link to comment
Share on other sites

i have launch ... sudo dpkg --configure libc-bin
Setting up libc-bin (2.23-0ubuntu9) ...
Segmentation fault
/sbin/ldconfig.real: Path `/usr/lib/mali' given more than once
/sbin/ldconfig.real: Path `/lib/aarch64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/aarch64-linux-gnu' given more than once
/usr/lib/mali:
Segmentation fault
dpkg: error processing package libc-bin (--configure):
 subprocess installed post-installation script returned error exit status 139
Errors were encountered while processing:
 libc-bin


if someone could help me i've just installed an ubuntu fresh ..update ..upgrade ..done everything returning well on my bananapi M64-R18 so why sunxi still locked my mmc i just would upgrade 11 packages and install gparted and exagear-desktop for wine using

thx

ps . is aptitude issuesX bugging ?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines