Could not open egl display

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Could not open egl display

跳至解决方案
476,757 次查看
强王
Contributor IV

Qt5_CinematicExperience -platform eglfs

result:

QEglFSImx6Hooks will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.

If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1

Could not open egl display

then i set FB_MULTI_BUFFER=2 or QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1

result:

root@imx6qsabresd:~# Qt5_CinematicExperience -platform eglfs

Could not open egl display

/usr/bin/Qt5_CinematicExperience: line 4:   432 Aborted                 /usr/share/cinematicexperience-1.0/Qt5_CinematicExperience $*

root@imx6qsabresd:~#

kernel:3.14.28

标签 (4)
0 项奖励
回复
1 解答
469,349 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Qiang

Did you try export DISPLAY ?

Regards

在原帖中查看解决方案

0 项奖励
回复
21 回复数
467,337 次查看
refiktuzaklı
Contributor III

I have also this problem. I exported Display and applied Andrey's recommendation. it still gives same error could not open display

0 项奖励
回复
467,337 次查看
andreykononov
Contributor III

can you show full error log?

i make some changes to unify my scripts

#!/bin/sh
fb=/dev/fb$1
export QT_QPA_FONTDIR=/usr/share/fonts/
export QT_QPA_EGLFS_FORCEVSYNC=1
export QT_QPA_EGLFS_HIDECURSOR=1
export QT_QPA_EGLFS_FB=$fb
export FB_FRAMEBUFFER_0=$fb
export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
export QT_QPA_PLATFORM=eglfs
export LANG=ru_RU.UTF-8
/path/to/program

now to start program on some display you can set framebuffer number

script.sh 2 &

0 项奖励
回复
467,337 次查看
refiktuzaklı
Contributor III

before your script

QEglFSVivIntegration will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
Could not open egl display
Aborted

after yourscript 

Could not open egl display
Aborted
0 项奖励
回复
467,337 次查看
andreykononov
Contributor III

which framebuffer you using?

0 项奖励
回复
467,337 次查看
refiktuzaklı
Contributor III

I have check my frame buffer. I have just fb0. I changed fb=/dev/fb$1  with fb=/dev/fb$0 and error :

EGLFS: Failed to open /dev/fb-sh
EGLFS: Can't continue without a display
Aborted

0 项奖励
回复
467,337 次查看
andreykononov
Contributor III

for you my script whill be

#!/bin/sh
fb=/dev/fb0
export QT_QPA_FONTDIR=/usr/share/fonts/
export QT_QPA_EGLFS_FORCEVSYNC=1
export QT_QPA_EGLFS_HIDECURSOR=1
export QT_QPA_EGLFS_FB=$fb
export FB_FRAMEBUFFER_0=$fb
export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
export QT_QPA_PLATFORM=eglfs
export LANG=ru_RU.UTF-8
/path/to/program

show output of this command

cat /sys/class/graphics/fb0/mode

0 项奖励
回复
467,337 次查看
refiktuzaklı
Contributor III

same error

Could not open egl display
Aborted

mode file is empty

0 项奖励
回复
467,337 次查看
andreykononov
Contributor III

its look like something wrong with your framebuffer driver. What board are you using and what linux on it?

0 项奖励
回复
467,337 次查看
refiktuzaklı
Contributor III

linux 4.11.4

board karo tx6u 8033

0 项奖励
回复
467,337 次查看
refiktuzaklı
Contributor III

can you show tree under /usr/lib/qt/plugins/egldeviceintegrations

mine is 

# cd /usr/lib/qt/plugins/egldeviceintegrations
# tree
.
|-- libqeglfs-kms-egldevice-integration.so
`-- libqeglfs-kms-integration.so

0 directories, 2 files

must there be a libqeglfs_viv something like that? do I have missing file here?

0 项奖励
回复
467,337 次查看
andreykononov
Contributor III

root@MMC:~# tree /usr/lib/qt5/plugins/egldeviceintegrations/
/usr/lib/qt5/plugins/egldeviceintegrations/
`-- libqeglfs-viv-integration.so

0 directories, 1 file
root@MMC:~#

0 项奖励
回复
467,337 次查看
refiktuzaklı
Contributor III

I am using buildroot, I select imx-gpu-viv and qt5 egl support. however egl vivante integration is missing. I gues there is bug on integration of vivante for buildroot.

 

thank you Andrey

0 项奖励
回复
467,337 次查看
andreykononov
Contributor III

i'm using yocto, you can try it

0 项奖励
回复
467,318 次查看
refiktuzaklı
Contributor III

which board do you use? mine is karo

0 项奖励
回复
467,315 次查看
andreykononov
Contributor III
0 项奖励
回复
467,335 次查看
refiktuzaklı
Contributor III

yes I want to switch to yocto too, because imx does not support buildroot also buildroot community is not so wide as yocto. do you have any suggestion where to start?

0 项奖励
回复
467,337 次查看
andreykononov
Contributor III

i think better way to start from here, but take pyro branch, not dora like on this link, other the same

0 项奖励
回复
467,337 次查看
aveselinov
Contributor III

OP, could u please explain ur solution? Exporting DISPLAY doesn't work for me.

0 项奖励
回复
467,337 次查看
andreykononov
Contributor III

#!/bin/sh
export QT_QPA_EGLFS_FB=/dev/fb0
export FB_FRAMEBUFFER_0=/dev/fb0
export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
export QT_QPA_EGLFS_FORCEVSYNC=1
export QT_QPA_PLATFORM=eglfs
/home/root/program &

work for me now

0 项奖励
回复
467,337 次查看
andreykononov
Contributor III

i have the same error, build yocto image jethro + Qt make start script

root@imx6qsabreauto:~# cat /bin/start.sh

#!/bin/sh

export LD_LIBRARY_PATH=/usr/lib

export QML_IMPORT_PATH=/usr/lib/qt5/qml

export QML2_IMPORT_PATH=/usr/lib/qt5/qml

export QT_QPA_PLATFORM_PLUGIN_PATH=/lib/qt5/plugins/platforms

export QT_QPA_EGLFS_PHYSICAL_WIDTH=1920

export QT_QPA_EGLFS_PHYSICAL_HEIGTH=1080

export QT_QPA_PLATFORM=eglfs

#export QT_QPA_EGLFS_FB=/dev/fb2

#export FB_FRAMEBUFFER_0=/dev/fb2

export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1

export DISPLAY=:0.0

Qt5_CinematicExperience

and still have same error

root@imx6qsabreauto:~# start.sh

Could not open egl display

/bin/start.sh: line 12:   458 Aborted                Qt5_CinematicExperience

0 项奖励
回复