QT5.4 eglfs(hellogl_es2) Segmentation fault

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

QT5.4 eglfs(hellogl_es2) Segmentation fault

ソリューションへジャンプ
3,873件の閲覧回数
sanjeevsharma
Contributor IV

Hello All,

 

We are building QT 5.4  support with wayland-egl plugin platform to our mx6q based custom board  . QT widget examples inside /usr/share/qt5/examples/widgets works fine. but opengl examples gives segmentation fault.

 

After running GDB on hellogl2 example,following crash point has been identified which goes to EGL Libraries.Detail log are attached in the thread.

 

wl_egl_window_destroy (window=0x2a0c44) at gc_egl_platform.c:779

779     gc_egl_platform.c: No such file or directory.

Current kernel version is 3.14.28

graphics driver version   imx-gpu-viv_5.0.11.p4.5

 

I have come across many threads, where many people are facing similar issues. I would really appreciate if someone look into it and provide some pointer.

 

Regards

Sanjeev Sharma

Original Attachment has been moved to: opengl-crash.zip

ラベル(5)
0 件の賞賛
1 解決策
2,093件の閲覧回数
sanjeevsharma
Contributor IV

Hello All,

I have root cause the problem.There was mismatch of Kernel gpu driver version and graphics driver version used in user-land,which was causing the issue.Now all the opengl examples works fine.

Environment causing segfault:

1: GPU driver In Kernel based on v5.0.11p4.4.

2: User Mode Libraries imx-gpu-viv_5.0.11.p4.5-hfp & imx-gpu-viv_5.0.11.p4.5-sfp

Now I am using correct version meta-fsl-bsp-release.git - Freescale i.MX Yocto BSP Release Layer

Regards

Sanjeev Sharma

元の投稿で解決策を見る

0 件の賞賛
12 返答(返信)
2,093件の閲覧回数
jamesbone
NXP TechSupport
NXP TechSupport

Hello Sanjeev,

In the case of Linux only environment, the plugin that draws to the screen is called EGLFS. This plugin has the restriction that it only supports one single widget at a time on the screen surface. Then demos such as hellogl_es2 are *not intended* to work along with this plugin, and it will never work.


Have a great day,
Jaime

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
2,093件の閲覧回数
sanjeevsharma
Contributor IV

Hello Jaime,

I have explored further around this topic and found a nice document QT5 Demo Errors on EGLFS which states the same issue you had pointed out above. But same post also claim that,it should work OK in a windowed environment such as Wayland or X11. please find below excerpt from the post.

Some of the demos on the release such as  /examples/opengl/hellogl_es2,  consist of a group of multiple widgets appearing on the screen. Normally these demos should work OK in a windowed environment such as Wayland or X11.

My QT environment has been configured for platform support wayland-egl and If above statement is correct then It should work on Wayland-egl.

If i go with your explanation then it should behave exactly, what exactly explained below, but in my case it gives segfault, which is totally different behavior. All other examples like hello window,cube also leads to segfault issue which seems different issue then what we are discussing here.

These issues can be seen in the Qt OpenGL examples.  "hellogl_es2" and "2dpaint" seem to display one rendered frame and then break --  "hellogl_es2" shows the QT word and bubbles, and the GUI is hidden, while  "2dpaint" just shows the openGL version without label.

Regards

Sanjeev Sharma

0 件の賞賛
2,093件の閲覧回数
rans
Senior Contributor I

Hello sanjeev,

Is the gpu driver is named galcore.ko ? I mean , if I update it it should fix the problem ?

Thank you

Ran

0 件の賞賛
2,094件の閲覧回数
sanjeevsharma
Contributor IV

Hello All,

I have root cause the problem.There was mismatch of Kernel gpu driver version and graphics driver version used in user-land,which was causing the issue.Now all the opengl examples works fine.

Environment causing segfault:

1: GPU driver In Kernel based on v5.0.11p4.4.

2: User Mode Libraries imx-gpu-viv_5.0.11.p4.5-hfp & imx-gpu-viv_5.0.11.p4.5-sfp

Now I am using correct version meta-fsl-bsp-release.git - Freescale i.MX Yocto BSP Release Layer

Regards

Sanjeev Sharma

0 件の賞賛
1,123件の閲覧回数
rakesh3
Contributor V

Hi Sanjeev, 

 

Could you please tell me , how did you check the Kernel gpu driver version and graphics driver version used in user-land. 

Since i am also facing the same problem since very long time.

 

Regards,

Rk

0 件の賞賛
1,124件の閲覧回数
rakesh3
Contributor V

Hi Sanjeev, 

 

Could you please tell me , how did you check Kernel gpu driver version and graphics driver version used in user-land,

 

Regards,

Rk

0 件の賞賛
2,093件の閲覧回数
vikaspatil
Senior Contributor I

Hi Sanjeev,

Thanks for sharing the solution. I am also facing the same issue. Now will try with this.

However using v5.0.11p4.4, we can't take the bug fixes gone in v5.0.11p4.5 i.e. (meta-fsl-arm - Layer containing Freescale ARM hardware support metadata )

Do you know if kernel gpu driver could be updated instead?

Regards,

Vikash

0 件の賞賛
2,093件の閲覧回数
sanjeevsharma
Contributor IV

Hello Vikash,

yes that also can be done.You need to make sure that kernel side and User-land side should have same version.

Regards

Sanjeev Sharma

0 件の賞賛
2,093件の閲覧回数
rans
Senior Contributor I

Hi,

I have the same issue,

I had to mix kernel :

lec-imx6 4.1.31-1.2.0+g77f6154 (which is from jethro yocto)

my GPU version:

root@imx6qsabresd:~# dmesg | grep 5.0.1
[ 3.554771] Galcore version 5.0.11.41671

with root filesystem :

NXP i.MX Release Distro 4.9.11-1.0.0 (morty yocto!)

Now, my question is if this issue will happens only with examples, and not with my developed qt project.

If yes - I am happy :smileyhappy: , If not - how can I fix this ? I tried to build kernel  4.9.11 version, but the uImage does not start on board :smileysad: , not sure why (I use same defconfig from  4.1.31, and same dts/dtb )

I also noticed the following recipes in the newer version:

./meta-freescale/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p8.6+fslc.bb
./meta-freescale/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p8.6.bb

while in the older kernel:

kernel-module-imx-gpu-viv_5.0.11.p7.4+fslc.bb

Do you think I should try replace the older with the newer recipes , and re-compile kernel module (it is just a module, the kernel probably need no change) ?

Thank you very much,

Ran

0 件の賞賛
2,093件の閲覧回数
vikaspatil
Senior Contributor I

Hi Jaime,

I am hitting the same segmentation fault with wayland-egl platform plugin. see: vivante driver segmentation fault with qt 5.4.2 + qtwayland 5.4.2 + weston 1.6.0

Could you give some inputs there?

Thanks & Regards,

Vikash

0 件の賞賛
2,093件の閲覧回数
sanjeevsharma
Contributor IV

Thanks Jaime,

I didn't understand you completely. I would really appreciate, if you explain in little detail. In Qt 4.X version it works fine. is there any difference between QT 4.X and QT 5.X with respect to EGLFS .

Regards

Sanjeev Sharma

0 件の賞賛
2,093件の閲覧回数
sanjeevsharma
Contributor IV

OtavioSalvador​ : I would really appreciate if you let me know the root cause.Lot's of people has been facing similar problem and I think that we should discuss this problem.

Sanjeev Sharma

0 件の賞賛