adontz
Posts: 14
Joined: Sun Jun 15, 2014 4:11 pm

ArchLinux Qt eglfs

Tue Jun 17, 2014 3:16 pm

Hello,

here is what I did.

I updated everything to latest, than I installed Qt5 and some related packages

Code: Select all

pacman -S gcc make qt5-base qt5-declarative qt5-imageformats qt5-multimedia qt5-quickcontrols qt5-script qt5-svg qt5-tools qt5-webkit qt5-xmlpatterns python python-pyqt5
than I downloaded https://github.com/Topguy/mlbrowser source code (downloaded to desktop, copied by scp) and ran

Code: Select all

qmake DEFINES+=_BROWSER_ DEFINES+=_MOUSE_ DEFINES+=_PROPERTYCHANGER_ ../src/mlbrowser.pro
make
just as I was instructed in readme.md

Everything compiles just fine, and even runs if executed like this

Code: Select all

./mlbrowser -platform linuxfb http://www.raspberry.org
but if I run mlbrowser like this

Code: Select all

./mlbrowser -platform eglfs http://www.raspberry.org
I get the following error

Code: Select all

This application failed to start because it could not find or load the Qt platform plugin "eglfs".

Available platform plugins are: eglfs, kms, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.
Aborted (core dumped)
which is nonsense, because eglfs is listed as available. Also the following command

Code: Select all

ls -l /usr/lib/qt/plugins/platforms/
gives me the following list

Code: Select all

total 1452
-rwxr-xr-x 1 root root 249820 May 27 22:01 libqeglfs.so
-rwxr-xr-x 1 root root 216844 May 27 22:01 libqkms.so
-rwxr-xr-x 1 root root 154872 May 27 22:01 libqlinuxfb.so
-rwxr-xr-x 1 root root  30520 May 27 22:01 libqminimal.so
-rwxr-xr-x 1 root root 134188 May 27 22:01 libqminimalegl.so
-rwxr-xr-x 1 root root 100920 May 27 22:01 libqoffscreen.so
-rwxr-xr-x 1 root root 593160 May 27 22:01 libqxcb.so
so libqeglfs.so actually exists and is executable.

How can I debug this error? What tools should I use in this case? Or maybe this is a known issue with known solution I just was not able to find?

P.S. I've just found out that
1) with minimalegl platform application terminates with the following error

Code: Select all

Opened display 0xcdf6a0

libEGL warning: DRI2: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
Could not initialize egl display

EGL error
Aborted (core dumped)
2) with linuxfb platform keybord input is completely ignored.

Not sure if this is relevant, since I need eglfs.

moritzmhmk
Posts: 7
Joined: Mon Feb 17, 2014 7:37 pm

Re: ArchLinux Qt eglfs

Tue Jul 15, 2014 8:21 am

I have the very same problem - did you solve it by now?

adontz
Posts: 14
Joined: Sun Jun 15, 2014 4:11 pm

Re: ArchLinux Qt eglfs

Tue Jul 15, 2014 10:25 am

No, I was not able to solve it.

As far as I understand, Qt5 in repositories is just a generic ARM version with some generic OpenGL drivers, which does not work on Raspberry. For now I was able to crosscompile latest Qt5 under Debian, and I'm going to try to crosscompile under Arch too.

sheim
Posts: 1
Joined: Tue Aug 12, 2014 2:09 pm

Re: ArchLinux Qt eglfs

Tue Aug 12, 2014 2:27 pm

In order to get eglfs platform support for Qt on the Raspberry Pi, make sure the dependencies of the eglfs platform plugin are installed:

Code: Select all

ldd /usr/lib/qt/plugins/platforms/libqeglfs.so
Look for lines stating 'not found' and install the respective libraries. In my case libmtdev was not found, which was easily fixed by a

Code: Select all

pacman -S mtdev
You will also have to preload the Broadcom Videocore GPU EGL / GL ES libraries from /opt/vc/lib and manually specify the eglfs platform. If you Qt program is named myQtProgram, run it like this:

Code: Select all

LD_PRELOAD="/opt/vc/lib/libGLESv2.so /opt/vc/lib/libEGL.so" myQtProgram -platform eglfs
This way I got working hardware accelerated OpenGL support in Qt and was able to run Qt aplications employing QtQuick2 (which requires OpenGL support).

MPikkemaat
Posts: 2
Joined: Wed May 22, 2013 9:19 pm

Re: ArchLinux Qt eglfs

Sun Sep 21, 2014 5:08 pm

Hi guys,

hate to hijack a post for a different distribution, but I felt this post was nearest to being on the right track...

I am using raspbian jessie, which (at the time of writing) includes qt5.3.1. For me personally, it feels good to have (presumably expertly) precompiled libraries to work with, as i've tried to cross compile/natively compile without much success. Unfortunately, all platform drivers included don't work. The output of starting a qtquick example project with different -platform xxx options, on a non-X terminal, gives:

eglfs Could not create egl surface, error 300b
kms Cannot create window, no screens available
linuxfb total lockup, powerdown required
minimal this plugin does not support createPlatformOpenGLContext
minimalegl Could not create egl surface, error 300b
offscreen this plugin does not support createPlatformOpenGLContext
xcb could not connect to display :0

Now for my question: is it possible to not cross compile qt5 fully, but instead just (re-)compile a rpi platform driver? If so, any thoughts/links on how to do this?

Thanks in advance,
best regards,
Marnix

adontz
Posts: 14
Joined: Sun Jun 15, 2014 4:11 pm

SOLUTION

Sun Sep 21, 2014 5:10 pm

Solution was to install mtdev which is not package level dependency but is required.

Code: Select all

pacman -S mtdev
yes, just that simple :shock:

adontz
Posts: 14
Joined: Sun Jun 15, 2014 4:11 pm

Re: ArchLinux Qt eglfs

Sun Sep 21, 2014 5:12 pm

Also, it seems that archlinux is already build for raspberry pi, not for generic armv6h, because raspberry pi is the only supported armv6h platform.

boghison
Posts: 2
Joined: Sun Dec 07, 2014 3:48 pm

Re: ArchLinux Qt eglfs

Sun Dec 07, 2014 3:50 pm

Hi! I just want to say that I am having problems with this:
1. The screen resolution is wrong
2. Mouse isn't working
Does anyone know a solution for this? Thanks.

wurfkeks
Posts: 3
Joined: Mon Dec 15, 2014 1:34 pm

Re: ArchLinux Qt eglfs

Mon Dec 15, 2014 1:46 pm

Hi there,

I did have the same problem with Qt/Qml on my Raspberry with ArchLinux.
But I solved it some weeks ago and since then started my application like sheim suggested (with preload and eglfs). So far everything worked fine, except some Qml Bugs.

Yesterday I updated to Qt5.4, which hopefully would fix some of these Bugs, but unfortunately my application won't start any more but crashes with
EGL Error : Could not create the egl surface: error = 0x300b
Any ideas/suggestions what can be done about that?

EDIT: I think, it's a regression bug due to some changes to the PKGBUILD. See https://github.com/archlinuxarm/PKGBUIL ... 68f18e874a
I'm going to try to discuss and solve this problem with the guys on github and will post the feedback here.

adontz
Posts: 14
Joined: Sun Jun 15, 2014 4:11 pm

Re: ArchLinux Qt eglfs

Tue Dec 23, 2014 5:44 pm

OMG,

Thanks I accidentally read your post and did not update my Raspberry.

wurfkeks
Posts: 3
Joined: Mon Dec 15, 2014 1:34 pm

Re: ArchLinux Qt eglfs

Thu Jan 08, 2015 3:33 pm

I created a pull request, which hasn't been accepted, because of reasons (if interested, see discussion here https://github.com/archlinuxarm/PKGBUILDs/pull/1035)
I had too little time to rework it, so it may take some time until the official repo is patched.

But the first solution was to build a dedicated eglfs platform plugin for Qt on Raspi. You can find the needed files to build it here: https://github.com/wurfkeks/PKGBUILDs/t ... -eglfs-rpi

Then you can start your applications with the -platform eglfs-rpi switch!

adontz
Posts: 14
Joined: Sun Jun 15, 2014 4:11 pm

Re: ArchLinux Qt eglfs

Thu Jan 08, 2015 3:38 pm

wurfkeks,

Can you please share your build instructions? When I try to build Qt5 on raspberry (even with distcc) I get out of memory on linking stage (which is not remote, so distcc can't help it). Is there any trick? I've searched all the docs I've found, but did not succeeded.

wurfkeks
Posts: 3
Joined: Mon Dec 15, 2014 1:34 pm

Re: ArchLinux Qt eglfs

Thu Jan 08, 2015 3:43 pm

Hi adontz,

you don't need to rebuild the full Qt framework. Just install it via pacman as usual. The provided package will build only one plugin, which isn't a problem, even with the limited power and memory of the Raspi.

For building a package manually from PKGBUILD, see https://wiki.archlinux.org/index.php/Makepkg#Usage

moritzmhmk
Posts: 7
Joined: Mon Feb 17, 2014 7:37 pm

Re: ArchLinux Qt eglfs

Wed Jan 14, 2015 8:55 pm

Hi

I did install the path but using

Code: Select all

--platform eglfs-rpi
I still get

Code: Select all

libEGL warning: DRI2: xcb_connect failed
:(

Edit:

Code: Select all

LD_PRELOAD="/opt/vc/lib/libGLESv2.so /opt/vc/lib/libEGL.so" mlbrowser --platform eglfs-rpi http://google.de
gives me a white screen for a few seconds than quits -.-

Return to “Arch”

Who is online

Users browsing this forum: No registered users and 3 guests