0
RagnerBG

Solved Lamobo r1 hardware accelerated driver

Recommended Posts

Hello and thanks for the good work and support with these images. First, excuse my bad english, it's not my native. And i am a little rookie and a little noob, so sorry if i write crap and don't understand basics some time.

Recently i've try to install desktop on this board and hardware accelerated driver with partial result. I had Armbian_4.5_Lamobo-r1_Debian_wheezy_3.4.109 with installed Gnome. I install Gnome following this site:

https://www.namhuy.net/1085/install-gui-on-debian-7-wheezy.html

Then i started to install and configure stuff based on sunxi site. First libUMP tnen this:

http://linux-sunxi.org/Mali_binary_driver

"make test" didn't do anything - can't create a test or something. Then i do this:
in log i had the same:
...(II) Module fbturbo: vendor="X.Org Foundation"   compiled for 1.12.4, module version = 0.4.0   Module class: X.Org Video Driver   ABI class: X.Org Video Driver, version 12.1(II) FBTURBO: driver for framebuffer: fbturbo(--) using VT number 7...

but i also notice the following in Xorg.0.log:

 

[  3266.851] (II) FBTURBO(0): please set fb0_framebuffer_num >= 3 in the fex file
[  3266.851] (II) FBTURBO(0): and sunxi_fb_mem_reserve >= 24 in the kernel cmdline

Aaaand my odyssey begin. I notice the second parameter is defined in boot.scr file. There where other parameters too, preventing 2Dand 3D acceleration - "sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16". I notice the following lines are not present in version - Armbian_4.5_Lamobo-r1_Ubuntu_trusty_3.4.109_desktop (why i am not using this version - long story), so i follow this description:

http://linux-sunxi.org/Display#boot.scr

edit boot.cmd file and create new boot.scr without these lines and reboot then try to install Gnome (i do this on fresh installation). The problem is - i don't know if i am cursed or this @#%^&%* board is cursed, but from the site maintenance yesterday i am unable to install Gnome anymore, no mater content of boot.scr file. At first i thought this is the problem but it appears to be something with apt-get because once i received the following error - apt-get error (100) or something similar. Tasksel freeze at around 55%, i try "apt-get install gnome" it freeze at some point too. I don't know what log to loot at, i couldn't find anything related to apt-get or aptitude in /var/log/ . I even try older images where i used to install the same desktop before and the result is the same. This is my major problem right now, because instead of going forward i am way beyond the start line at the moment.

 

About the first thing about FBTURBO(0) in Xorg0.log i understand this parameter is in script.bin which is not so easy to edit, but i am defiant... I install libusb-1.0-0-dev and use this guide to modify the file:

http://docs.cubieboard.org/tutorials/common/edit_the_system_configuration

But i notice script.bin in this board is a simlink to /bin/lamobo-r1.bin so i edited this file and change parameter - fb0_framebuffer_num, from 2 to 3. And by the way i am using nano instead of vi because me and vi are old enemies and every time i risk and using it result in disastrous results - in this case - boot loop or various problems before boot. The problem is, after i change parameter from 2 to 3 (with nano) and reboot system is unable to load desktop anymore if i do this after i installed one. If i try to install desktop with this parameter enabled i can't startx later (and it can't autoload too). I have to make fresh install again.

 

Sorry for the long post. What am i doing wrong so i can't install desktop environment? And why setting framebuffer to 3 causing troubles when it's recommended value in sunxi site:

http://linux-sunxi.org/Display#boot.scr

Share this post


Link to post
Share on other sites

Hm, i really have to open this topic to find solution to my first question a minutes later. I don't know why but i have to reboot halted system during install and run - "dpkg --configure -a" . The process resumes and finish with the following errors:

 

Errors were encountered while processing:
 speech-dispatcher
 gnome-orca
 gnome
 

but Gnome loads successfully after reboot. Of course i have to add another user instead of root to be able to login and the old problem - "the screen goes off and will not restart until reboot" remain, but it something for now.

 

So only the thing with "fb0_framebuffer_num=3" bother me for now.

Share this post


Link to post
Share on other sites

Eeeee, sorry but nothing is solved yet. I still got troubles with - "tear-free zero-copy double buffering needs more video memory". I don't know how important is this but i try to set this parameters noted in Xorg0.log and i failed every time with "fb0_framebuffer_num=3" . In the meantime i check various sources in internet and make some more modifications in script.bin. I added the following section:

 

[g2d_para]
g2d_used = 1
g2d_size = 0x1000000

 

maybe i should increase memory to 32Mb? And i added some extra parameters in [MALI_PARA] section i saw in some sources concerning opangepi with the same A20 and Mali400Mp2, so it look like that now:

 

[mali_para]

mali_used = 1
mali_clkdiv = 1
mali_extreme_freq = 600
mali_extreme_vol = 1400

I was a little worried about last two, but the system is stable. Also looking here an there, i added extra line in [disp_init] - "sunxi_fb_mem_reserve = 32". I am no sure this is the place for this parameter but i saw it in one fex. Every of this cause no problem (and no noticeable change by the way) but every time i set - "fb0_framebuffer_num=3" system begin to boot-loop after loading kernel message, with installed graphic environment, or is booting but unable to install one. So i give up of this double buffering for now. It should work with value of 2 also, so i don't know why is this massage in log.

 

Except of that i am at the point of learning how to install and set-up CedarX or sunxi vdpau. I don't know what is what's, but the second is the only one in Ubuntu_trusty_3.4.109_desktop that actually accelerate h.264 (with some issues). Any suggestions? Sunxi site is completely unclear about this.

And i have Mali driver and Xorg/fbturbo but i can't run a test. I can make test now although i cloned repo twice and a little mess happened, but after test/test i got message - cannot access X server or something.

Share this post


Link to post
Share on other sites

Just for the record, i think i find out some info about this:

 

[  3266.851] (II) FBTURBO(0): tear-free zero-copy double buffering needs more video memory
[  3266.851] (II) FBTURBO(0): please set fb0_framebuffer_num >= 3 in the fex file
[  3266.851] (II) FBTURBO(0): and sunxi_fb_mem_reserve >= 24 in the kernel cmdline

I am not sure, but it's seems to be more important for 3D, than hw accelerated video. As for the fix, maybe there is something common with this - https://github.com/hehopmajieh/linux-sunxi/commit/c42070b5aaf87a87b644f6d6d93ddf6eba7fbc04 , and the mentioned problem with UMP. But this is beyond my knowledge and i don't know what to do with this patch.

About hw acceleration, i haven't got much time lately, but for me, it works only in your legacy Trusty desktop image. No video memory reservation there, old libvdpau version, no UMP, no special codecs, but it works some how. I've tried so many instructions and i couldn't get it to work from clean image with no desktop. mplayer is unable to load x264 library with vdpau (installed libx264 many times, many sources), mpv - high CPU load, frame drops = no hw acceleration. I failed with CedarX also. Only software XV with 2 cores set for encoding give me some acceptable framerate and smooth image. I guess this is above my possibilities. Generally i would be happy enough with pre built Ubuntu Desktop, but it have some problems in my device. It is very slow - slow boot, slow work, every other image i've tried was at least 5-th time faster than this. I don't know why is this and whether the problem is in me (my device, my sdcard) or with the image in general.

 

For the last time in this topic, because i am getting to feel a little schizophrenic with so much attention. Now i am quite sure despite my general ignorance in Linux, the problem is not in me. Something is broken in the latest sources. I don't know what, perhaps latest libvdpau-sunxi have some problems with A20, or R1 in specifically. But HWA work in images before and = 4.2. I just install some player and there is hwa through vdpau. As soon as i do apt-get update && upgrade or install latest image, there is no hwa anymore. I even try to built image from github - same thing. I already suffer from inadequate support for this board, but never expected something that has worked to be just broken lately.

So, ahem - problem solved...

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
0