cubieplayer / Cubian

Debian for Cubieboard
http://cubian.org
270 stars 49 forks source link

Video Hardware Acceleration mode issue with Cubian X1 #426

Open akopac opened 9 years ago

akopac commented 9 years ago

Hi Cubie Player

First off I'd like to thank you for your tireless effort in bringing us Cubian X. It worked awesome. However, now I must post for our very frustrated group of developers and users who are looking for solid video hardware acceleration for the ARM Opencpn project on the Cubietruck and Cubieboard 2. To get the full picture you need to look at this monumental project and understand YOUR previous release was one of the only distros that fully worked with Opencpn with fully functional hardware video acceleration. We have currently had to revert to the previous Cubian release with the 3.4.79 kernel that was downloaded back in August. The new Cubian X1 release simply does not work.

Please fix the video hardware acceleration for Cubian X1. Check these links out for details: http://opencpn.org/ocpn/about http://www.cruisersforum.com/forums/f134/opencpn-runs-on-embedded-arm-74082-31.html

What is the impact of a ARM based Opencpn navigation system. Ultra low power Navigation systems for cruising boats all over the world. Navigation equipment and refrigeration are the highest power consumers on cruising sailboats. What we are working on promises to cut power consumption under way by up to 80% making most boats solar or close to solar and wind independent.

Thank you so much for your time and effort.


danfos commented 9 years ago

I think it is not reasonable to except non-Opencpn users to install Opencpn to debug this problem, so my questions would be:

Not that I can not help debugging these kind of problems but this would help to get more people involved.

akopac commented 9 years ago

Yes. I think so. For a long time ARM opencpn was being used on everything from raspberry pi's to beagle boards to cubieboards, but now it has mostly settled into cubieboard 2 and Cubietrucks. Opencpn will work withe no acceleration with most distros but it has been a struggle to get hardware acceleration working at a acceptable level for opencpn to work. We were using the August version and acceleration worked out of the box. We thought we had the problem solved with using cubism. Then recent changes in X11 broke hardware acceleration. I'll see what we can do to get a test pool together. Is a list of users and email addresses best way for you?

Andy

On Tuesday, December 16, 2014, danfos notifications@github.com wrote:

I think it is not reasonable to except non-Opencpn users to install Opencpn to debug this problem, so my questions would be:

  • Is anybody else seeing this problem not in combination with Opencpn
  • @akopac https://github.com/akopac : can you work with the Opencpn to make this into a simple test case

Not that I can not help debugging these kind of problems but this would help to get more people involved.

— Reply to this email directly or view it on GitHub https://github.com/cubieplayer/Cubian/issues/426#issuecomment-67137516.

Andy Kopacwww.linkedin.com/in/andykopac http://www.linkedin.com/in/andykopac

mmtsweng commented 9 years ago

I'm a software developer by trade, and long-time OpenCPN user. I have been involved in that crusiser's forum thread too.

I am willing to do the work -- both in testing and researching. But I am a basic Linux user, and don't have the knowledge or experience to deep-dive into the problem.

Basically, the problem comes down to what changed between the Cubian-desktop-r1-a20-ct.7z download and Cubian X1 that prevents this software from running in OpenGL mode (via glshim). Strangely, glxinfo and glxgears do not seem to replicate the problem.

Any advice on how to approach the issue?

akopac commented 9 years ago

I think the first step would be running all the gl tests on both the old and new images and comparing

On Tuesday, December 16, 2014, MM&T Software Engineering < notifications@github.com> wrote:

I'm a software developer by trade, and long-time OpenCPN user. I have been involved in that crusiser's forum thread too.

I am willing to do the work -- both in testing and researching. But I am a basic Linux user, and don't have the knowledge or experience to deep-dive into the problem.

Basically, the problem comes down to what changed between the Cubian-desktop-r1-a20-ct.7z download and Cubian X1 that prevents this software from running in OpenGL mode (via glshim).

Any advice on how to approach the issue?

— Reply to this email directly or view it on GitHub https://github.com/cubieplayer/Cubian/issues/426#issuecomment-67193953.

Andy Kopacwww.linkedin.com/in/andykopac http://www.linkedin.com/in/andykopac

NAHANNIV commented 9 years ago

One more thing to consider is that OpenCPN with glshim works on Aruntu.

akopac commented 9 years ago

Yes it does however I had problems with " out of range" monitor messages with Aruntu. I was able to vnc into the machine but not fix the issue. I'd like to get a fix for that as it would provide multiple OS solutions.

A

On Tuesday, December 16, 2014, NAHANNIV notifications@github.com wrote:

One more thing to consider is that OpenCPN with glshim works on Aruntu.

— Reply to this email directly or view it on GitHub https://github.com/cubieplayer/Cubian/issues/426#issuecomment-67251918.

Andy Kopacwww.linkedin.com/in/andykopac http://www.linkedin.com/in/andykopac

danfos commented 9 years ago

@mmtsweng

On what changed between Cubian-desktop-r1-a20-ct.7z download and Cubian X1 see http://linux-sunxi.org/Linux_Kernel and the linux-sunxi repo. That is not the complete answer, but can maybe help.

NAHANNIV commented 9 years ago

Cubian X1 runs much faster than Aruntu. It seems like Cubian X1 is overclocked, perhaps some other parameters tweaked for speed as well; Could this be causing a problem ?

danfos commented 9 years ago

I do think the standard image does not overclock things but as it is more or less the official image I think more tuning is/can be done.

Reading this thread I notice that there is no detailed information about the problem; a log file showing an error or warning would be a start.

mmtsweng commented 9 years ago

I have not found anything relevant in any of the logs. That's one of the most frustrating aspects of this problem.

I wish I could provide more info. But like I said at the beginning of this thread, while I'm more than willing to do the work and research, I'm limited in my Linux knowledge and need to know where to look.

danfos commented 9 years ago

Apart from log information it is also a good idea to give a good description of the problem.

Based on the link above I think it is that the canvas is corrupt but if so, can somebody add to this thread two images, one good and one bad?

Furthermore I understand openGL is used:

michalliu commented 9 years ago

You could try to build your own image from the nano version, then check if the acceleration is worked or not. http://cubian.org/2013/09/29/install-lxde-with-opengles-accelerated-on-cubian/ You can skip the first step "cubian-update" which is deprecated now. I think the problem is related to https://github.com/ssvb/xf86-video-fbturbo, The kernel is same in X1 and destop-r1.

You can aslo build thelatest xf86-video-fbturbo, Here is a build instruction https://github.com/ssvb/xf86-video-fbturbo/wiki/Installation

and this useful link http://linux-sunxi.org/Mali_binary_driver

mmtsweng commented 9 years ago

Sorry, I'm not getting notifications on this thread, so I need to manually check. I'll do a better job of it, promise. Thanks everyone for the help.

Here are two screenshots showing the problem: 1) CubianX: opengl cubianx

2) CubianR1: opengl CubianR1

I will rebuild with X to help get more information with GLIntercept later this week.

I'll also see if I can build my own xf86-video-fbturbo instance. If that doesn't work I'll try a custome nano version -- this is not something I've attempted before, but I'll research it and make an attempt.

Thanks again

michalliu commented 9 years ago

@mmtsweng Wish you succeed. :+1:

kika123 commented 9 years ago

Did you try the seandepagnier GLshim fork? It works here

kika123 commented 9 years ago

http://we.tl/C06MA5prsL

a tar archive with a precompiled glshim (tested on CubianX, Kurio 7S tablet)

NAHANNIV commented 9 years ago

Yes, the seandepagnier fork is what we are using, and it works on other images but there are problems with Cubian X

kika123 commented 9 years ago

@NAHANNIV It works on my tablet which is using Cubian X... (with a modified 3.4.103 kernel for touchscreen support)

NAHANNIV commented 9 years ago

@kika123 Are you running OpenCPN on your Kurio 7S tablet ?

kika123 commented 9 years ago

yes

NAHANNIV commented 9 years ago

@kika123 OK. so what do you think the difference is ? The Cubian X that I have has 3.4.79-sun7i Kernal. What charts are you using ? Is the hardware identical to the CubieTruck ?

kika123 commented 9 years ago

It uses an Allwinner A20, same SoC. I use mali-r3p2 driver with a custom kernel. Maybe that makes the difference.

NAHANNIV commented 9 years ago

How can I find out what mali driver is being used ?

kika123 commented 9 years ago

sunxi_es2gears -info

The one included in the Cubian X image by default is r3p0

NAHANNIV commented 9 years ago

Thanks, Cubian X1 is "EGL_VERSION = 1.4 Linux -r3p0-04rel0" I expect that is the problem !

How can I change it ?

kika123 commented 9 years ago

recompiling the kernel with r3p2's ssvb tree, recompiling the fbturbo DDX with r3p2 support, and install the newer Mali libs.

NAHANNIV commented 9 years ago

Well, I haven't a clue how to do that, so, next question is why was the later version not included in Cubian X ?

kika123 commented 9 years ago

Because the r3p2 kernel does not have G2D support

kika123 commented 9 years ago

I'm currently building an HDMI-capable kernel...

kika123 commented 9 years ago

Now, even Chromium works with hardware acceleration, with a 3.4.75 kernel with mali-r3p2(VMSPLIT_1G also)

NAHANNIV commented 9 years ago

Cubiez also has r3p0 mali driver and works well, so perhaps that is not the problem.