[mythtv] Raspberry Pi 2 and OpenGL

Peter Bennett pgbennett at comcast.net
Tue Mar 15 14:38:08 UTC 2016

MythTV on the Raspberry Pi 2 can run in two QT QPA PLATFORM modes: xcb
which runs under X, eglfs which runs from the command line without X

AFAIK OpenGL is not supported in xcb mode, and is supported in eglfs mode.

In xcb mode the only way of displaying the OSD is using "softmerge".
This was causing slowdown of playback and audio interruptions. I have
made a few optimizations, now it plays smoothly most of the time when
OSD is displayed. If the OSD takes up 50% or more of the display area
(e.g. The Info OSD in the MythCenter theme), there are occasional brief
cutouts of audio.

In xcb mode if you build with opengl and enable opengl for OSD, you get
a blank screen, no playback of video occurs.

If eglfs mode the OSD does not have any affect on the playback if OpenGL
OSD is selected. Playback continues uninterrupted.

Using the mythbuild.sh cross-compile script from LVR (3300 lines) it is
possible to build a package with mythtv executables and a private custom
built version of QT5, that can be deployed in a directory and works in
eglfs mode. I believe that he had created the private QT5 build because
Raspbian wheezy only had QT 4.

I have tried enabling opengl and building on raspberry pi 2 using Ubuntu
mate wily, which comes with QT 5.4.2. Running this from command line
with the QT_QPA_PLATFORM=eglfs setting results in an abort with the
following message
EGL Error : Could not create the egl surface: error = 0x300b

I have tried to replicate the configure settings used by LVR in his
script, but I have been unable to get past that error. Google searches
have failed to provide a solution.

I am not comfortable using the 3300 line script provided by LVR. It does
undesirable things like downloading files from LVR's web site and
applying patches. It only supports wheezy and jessie. The package
created cannot be deployed in standard fashion, into standard
directories, because of the private QT5 build involved. Maybe somebody
can figure out the magic thing it does that enables eglfs to work. Or
perhaps eglfs just does not work with ubuntu mate.

I will concentrate on the xcb version with opengl disabled. The way the
OSD works seems good enough.


More information about the mythtv-dev mailing list