No OSD

Merlin83b
Newcomer
Posts: 11
Joined: Fri Feb 07, 2014 3:37 pm
Great Britain

No OSD

Post by Merlin83b » Wed Feb 28, 2018 1:05 pm

I'm setting up an Raspberry Pi 3 as a new frontend using Raspbian stretch and MythTV Light (excellent work, thanks for those packages!). I bought an MPG2 license key (source is UK Freesat) and playback is fine for SD shows. There are some hints in other threads about options that might improve playback and have HD working too, so I'm going to try those before asking for help there.

However, the OSD won't display. I've fiddled with some of the settings for this but it just won't display. I'm using the OpenMAX High Quality playback profile and it looks from the wiki like I should be using the opengl OSD renderer. It did show up using softblend but that made the video jerky. Does anyone have any ideas on how to get the OSD to display?

User avatar
pgbennett
Developer
Posts: 232
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: No OSD

Post by pgbennett » Wed Feb 28, 2018 2:11 pm

The most likely cause is insufficient GPU memory (https://www.mythtv.org/wiki/Raspberry_Pi#GPU_Memory). Other than than, go through the recommendations under System Performance (https://www.mythtv.org/wiki/Raspberry_P ... erformance).

You did not mention which version of MythTV you are using. If 0.27 then it is pre-release and may be buggy.

Merlin83b
Newcomer
Posts: 11
Joined: Fri Feb 07, 2014 3:37 pm
Great Britain

Re: No OSD

Post by Merlin83b » Wed Feb 28, 2018 2:37 pm

I have GPU memory set to 320, and am running MythTV 29. The audio change I will try tonight, as posted by you on another thread:
pgbennett wrote: For audio over HDMI, either of the following will work
1. Use raspi-config to force audio over HDMI and in MythTV frontend audio setup select ALSA default.
2. In front end audio setup select OpenMAX HDMI, uncheck the digital options (Dolby etc.), make sure to select Stereo for speakers, and in the next page select Openmax for mixer. When starting playback press volume up (right square bracket]) until the volume goes up enough. Sometimes OpenMax HDMI starts up with volume set to zero and you hear nothing.
That sounds like it would have an effect on the HD stuttering, but perhaps not the OSD Lack of display?

User avatar
pgbennett
Developer
Posts: 232
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: No OSD

Post by pgbennett » Wed Feb 28, 2018 10:41 pm

I suggest look at the log and see if there are any messages about OpenGL errors.

You should not need more than 256 for GPU memory. Check by running top. You should see "KiB Mem : 766884 total," if you have 256MB set. If you see something in the 900000 range, your setting of GPU memory did not take effect.

I suggest go through all the steps on the page https://www.mythtv.org/wiki/Raspberry_Pi and make sure you have not missed something, for example did you set up the scaling_governor?

ALSA audio is preferable and works better than OpenMAX audio.

For the stuttering, also check that your MPEG2 license is correctly installed. To check that run

Code: Select all

vcgencmd codec_enabled MPG2

Merlin83b
Newcomer
Posts: 11
Joined: Fri Feb 07, 2014 3:37 pm
Great Britain

Re: No OSD

Post by Merlin83b » Thu Mar 01, 2018 8:00 pm

I knocked the GPU memory back to 256M and do have the codec enabled:

Code: Select all

pi@raspberrypi:~ $ vcgencmd get_mem gpu
gpu=256M
pi@raspberrypi:~ $ vcgencmd codec_enabled MPG2
MPG2=enabled
The "performance" scaling_governor is set and I have run through all the steps on the wiki page. Happily, we now have stutter-free HD playback :).

Unfortunately, there's still no OSD. There are a lot of entries saying "glGetError 0x502" on the console (not in the log) which is apparently the OpenGL error code for "invalid operation". There are also a lot of lines there and in the log that say:

Code: Select all

2018-03-01 19:54:52.692560 E [954/954] CoreContext mythrender_opengl2.cpp:15 (__glCheck__) - OpenGL2: : 1282 @ mythrender_opengl2.cpp, 471
In general, there are a number of the log lines, then the same number of the 0x502 lines.

User avatar
pgbennett
Developer
Posts: 232
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: No OSD

Post by pgbennett » Thu Mar 01, 2018 8:29 pm

There are different versions of OpenGL libraries on the raspberry pi and you have to use the correct one.

Did you install from "mythtv-light"?

Did you activate the "Experimental OpenGL" on the raspberry pi. (You must NOT activate it as it is not compatible with this version of MythTV frontend).

Did you install anything else on the raspberry pi?

Are you using the correct build? Check /etc/apt/sources.list, make sure that all the lines say the same version (stretch or jessie) that you are not mixing versions.

Merlin83b
Newcomer
Posts: 11
Joined: Fri Feb 07, 2014 3:37 pm
Great Britain

Re: No OSD

Post by Merlin83b » Thu Mar 01, 2018 9:29 pm

I did install from mythtv-light. I did not knowingly activate "Experimental OpenGL" - where might I check this? Nothing else installed, this was a fresh Raspbian Stretch install and then your packages.

Code: Select all

pi@raspberrypi:~ $ cat /etc/debian_version 
9.3
pi@raspberrypi:~ $ grep myth /etc/apt/sources.list
#deb http://dl.bintray.com/bennettpeter/deb/ stretch myth28
deb http://dl.bintray.com/bennettpeter/deb/ stretch myth29
#deb http://dl.bintray.com/bennettpeter/deb/ stretch myth30
Maybe this is it, perhaps i did do something with the OpenGL ES packages in trying to sort things out:

Code: Select all

pi@raspberrypi:~ $ dpkg --list |grep gles
ii  libgles1-mesa:armhf                   13.0.6-1+rpi2                        armhf        free implementation of the OpenGL|ES 1.x API -- runtime
ii  libgles2-mesa:armhf                   13.0.6-1+rpi2                        armhf        free implementation of the OpenGL|ES 2.x API -- runtime
ii  libgles2-mesa-dev:armhf               13.0.6-1+rpi2                        armhf        free implementation of the OpenGL|ES 2.x API -- development files
Should 1.x and 2.x both be there?

User avatar
pgbennett
Developer
Posts: 232
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: No OSD

Post by pgbennett » Thu Mar 01, 2018 10:36 pm

I did not knowingly activate "Experimental OpenGL" - where might I check this?
Set it this way
sudo raspi-config -> 7 Advanced Options -> A7 GL Driver
You should leave it as original driver.
I am not sure how to check if it was changed, but you can just set it back to original and try again.

That OpenGLES mesa is the wrong OpenGLES version. It is a simulated OpenGLES under X11. The OpenGLES library we use is preinstalled in /opt/vc/lib/ When they moved from jessie to stretch they renamed some of the OpenGLES libraries in /opt/vc/lib, which caused MythTV a problem. The build has been changed to accommodate that, and we add links in /usr/share/mythtv/lib that point to the correct libraries to use. You could check those links and make sure they all point to valid libraries. If those links are broken it may cause your problem.

It is possible something changed in recent raspbian that is causing a problem. Check your raspbian version this way
cat /etc/rpi-issue
I am using 2017-08-16. If you have a newer version you could try installing 2017-08-16 version of raspbian. You can download older versions from http://downloads.raspberrypi.org/raspbian/images/
If you find that a newer version of raspbian is causing the failure let me know the issue date so that I can look into it.

Merlin83b
Newcomer
Posts: 11
Joined: Fri Feb 07, 2014 3:37 pm
Great Britain

Re: No OSD

Post by Merlin83b » Fri Mar 02, 2018 9:18 pm

I'm on Raspbian 2017-11-29, confusingly from the http://downloads.raspberrypi.org/raspbi ... 017-12-01/ folder.

The options I have for GL in raspi-config are:

G1 GL (Full KMS) OpenGL desktop driver with full KMS
G2 GL (Fake KMS) OpenGL desktop driver with fake KMS
G3 Legacy Original non-GL desktop driver

With G1 or G2, the frontend starts up, I choose a recording to play and then the frontend crashes and quits. The log shows this:

Code: Select all

2018-03-02 21:07:27.564668 I [664/664] CoreContext tv_play.cpp:1094 (TV) - TV::TV(): Creating TV object
2018-03-02 21:07:27.792771 I [664/664] CoreContext tv_play.cpp:1316 (Init) - TV::Init(): Created TvPlayWindow.
2018-03-02 21:07:27.980787 I [664/664] CoreContext tv_play.cpp:2277 (HandleStateChange) - TV::HandleStateChange(): Attempting to change from None to WatchingPreRecorded
2018-03-02 21:07:28.412361 N [664/664] CoreContext audioplayer.cpp:167 (ReinitAudio) - AudioPlayer: Enabling Audio
2018-03-02 21:07:31.322471 I [664/664] CoreContext avformatdecoder.cpp:2081 (ScanStreams) - AFD: codec MP2 has 2 channels
2018-03-02 21:07:31.322812 I [664/664] CoreContext avformatdecoder.cpp:2590 (OpenAVCodec) - AFD: Opened codec 0x3c10910, id(MP2) type(Audio)
2018-03-02 21:07:31.329014 I [664/664] CoreContext avformatdecoder.cpp:2590 (OpenAVCodec) - AFD: Opened codec 0x3c11690, id(DVB_SUBTITLE) type(Subtitle)
2018-03-02 21:07:31.329265 I [664/664] CoreContext avformatdecoder.cpp:2081 (ScanStreams) - AFD: codec AC3 has 2 channels
2018-03-02 21:07:31.330283 I [664/664] CoreContext avformatdecoder.cpp:2590 (OpenAVCodec) - AFD: Opened codec 0x3cad6e0, id(AC3) type(Audio)
2018-03-02 21:07:31.495761 I [664/664] CoreContext avformatdecoder.cpp:2590 (OpenAVCodec) - AFD: Opened codec 0x3c61ab0, id(H264) type(Video)
2018-03-02 21:07:31.548202 I [664/664] CoreContext audio/audiooutputbase.cpp:823 (Reconfigure) - AOBase: Opening audio device 'default:CARD=ALSA' ch 2(2) sr 48000 sf signed 16 bit reenc 0
with this additionally on the console:

Code: Select all

h 2(2) sr 48000 sf signed 16 bit reenc 0
* failed to add service - already in use?
QWaitCondition: cv destroy failure: Device or resource busy
QWaitCondition: mutex destroy failure: Device or resource busy
G3 doesn't work when choosing a recording to play, with a dialog that says "Failed to initialise video output" and giving this in the log:

Code: Select all

2018-03-02 20:52:10.081470 E [696/696] CoreContext videoout_omx.cpp:1509 (MythRenderEGL) - eglMakeCurrent failed
2018-03-02 20:52:10.081551 E [696/696] CoreContext videoout_omx.cpp:446 (Init) - VideoOutputOMX: Init: failed to create MythRenderEGL
2018-03-02 20:52:10.097881 I [696/696] CoreContext mythrender_opengl2.cpp:909 (DeleteOpenGLResources) - OpenGL2: Deleting OpenGL Resources
2018-03-02 20:52:10.097932 I [696/696] CoreContext mythrender_opengl.cpp:1236 (DeleteOpenGLResources) - OpenGL: Deleting OpenGL Resources
2018-03-02 20:52:10.098029 I [696/696] CoreContext videoout_omx.cpp:466 (Init) - VideoOutputOMX: Init: OSD display uses softblend
2018-03-02 20:52:10.133607 E [696/985] thread_unknown omxcontext.cpp:729 (Event) - OMX:8 EventError: OMX_ErrorInsufficientResources
2018-03-02 20:52:10.143108 E [696/696] CoreContext videooutbase.cpp:323 (Create) - VideoOutput: Not compiled with any useable video output method.
2018-03-02 20:52:10.143213 E [696/696] CoreContext mythplayer.cpp:505 (InitVideo) - Player(2): Couldn't create VideoOutput instance. Exiting..
2018-03-02 20:52:10.143268 E [696/696] CoreContext mythplayer.cpp:2930 (StartPlaying) - Player(2): Unable to initialize video.
2018-03-02 20:52:10.157067 E [696/696] CoreContext playercontext.cpp:460 (StartPlaying) - playCtx: StartPlaying() Failed to start player
2018-03-02 20:52:10.157221 C [696/696] CoreContext tv_play.cpp:5868 (StartPlayer) - TV::StartPlayer(): Failed to create player.
2018-03-02 20:52:10.159006 I [696/696] CoreContext tv_play.cpp:2640 (HandleStateChange) - TV::HandleStateChange(): Main UI disabled.
2018-03-02 20:52:10.159168 I [696/696] CoreContext tv_play.cpp:426 (StartTV) - TV::StartTV(): Entering main playback loop.
2018-03-02 20:52:10.188013 I [696/696] CoreContext tv_play.cpp:428 (StartTV) - TV::StartTV(): Exiting main playback loop.
As for the libs:

Code: Select all

pi@raspberrypi:~ $ ls -l /usr/share/mythtv/lib/
total 0
lrwxrwxrwx 1 root root 25 Feb  8 18:40 libEGL.so.1 -> /opt/vc/lib/libbrcmEGL.so
lrwxrwxrwx 1 root root 25 Feb  8 18:40 libEGL.so.1.0.0 -> /opt/vc/lib/libbrcmEGL.so
lrwxrwxrwx 1 root root 28 Feb  8 18:40 libGLESv2.so.2 -> /opt/vc/lib/libbrcmGLESv2.so
lrwxrwxrwx 1 root root 28 Feb  8 18:40 libGLESv2.so.2.0.0 -> /opt/vc/lib/libbrcmGLESv2.so
Those two target files exist.

Having tried all three options from raspi-config, we're now more broken than before and I can't play recordings at all :(

I'm now into a "help by providing output" kind of debugging mode so am very happy to try whatever you like. If that's "shut up, drop to 2017-08-16, enjoy MythTV" then I'll do that :)

Merlin83b
Newcomer
Posts: 11
Joined: Fri Feb 07, 2014 3:37 pm
Great Britain

Re: No OSD

Post by Merlin83b » Mon Mar 05, 2018 9:47 pm

G1 and G2 seem to add the vc4-kms-v3d and vc4-fkms-v3d overlays in config.txt. The first of those has this to say in the README: "Running startx or booting to GUI while this overlay is in use will cause interesting lockups."

Something else got messed up; taking those out of config.txt (ie. returning to G3) and GPU memory of 256M has us back to the no OSD displaying and the GL errors from my post above:
Merlin83b wrote:
Thu Mar 01, 2018 8:00 pm

Code: Select all

2018-03-01 19:54:52.692560 E [954/954] CoreContext mythrender_opengl2.cpp:15 (__glCheck__) - OpenGL2: : 1282 @ mythrender_opengl2.cpp, 471

User avatar
stuarta
Developer
Posts: 192
Joined: Wed Feb 05, 2014 5:13 pm
Great Britain

Re: No OSD

Post by stuarta » Tue Mar 13, 2018 11:02 am

What have you set your painter to? Try `auto`.

Merlin83b
Newcomer
Posts: 11
Joined: Fri Feb 07, 2014 3:37 pm
Great Britain

Re: No OSD

Post by Merlin83b » Sun Mar 18, 2018 5:04 pm

Under Setup > Appearance > Theme / Screen Settings, Paint engine was set to Qt. Setting it to Auto hasn't made any difference; those are the only two options for that setting.

stringer26
Newcomer
Posts: 2
Joined: Thu Apr 19, 2018 3:36 pm
United States of America

Re: No OSD

Post by stringer26 » Thu Apr 19, 2018 3:52 pm

I have the same issue. I got a new Raspberry Pi 3 b+ and installed stretch and then mythtv-lite for stretch+myth29, and set the gpu memory to 256M.
I've done nothing else whatsoever.
Running mythfrontend gave:

mythfrontend: error while loading shared libraries: libGLESv2. so: cannot open shared object file: No such file or directory

So I installed libgles2-mesa-dev which resolved this issue.

Mythfrontend runs with "normal" video with an OSD, but stutters badly.
It runs nice and smooth with openmax, but no OSD.

It looks like this is something to do with libGLES?

stringer26
Newcomer
Posts: 2
Joined: Thu Apr 19, 2018 3:36 pm
United States of America

Re: No OSD

Post by stringer26 » Fri Apr 20, 2018 11:27 am

Let me answer my own question. This is how I fixed it:

Uninstall the libgles2-mesa-dev library if you installed it.

Add a soft link from from /opt/vc/lib/libbrcmEGL. so to /usr/share/mythtv/lib/libGLESv2. so

(Remove spaces before .so's in above. This forum won't allow dots within strings.)

Merlin83b
Newcomer
Posts: 11
Joined: Fri Feb 07, 2014 3:37 pm
Great Britain

Re: No OSD

Post by Merlin83b » Sat Apr 21, 2018 1:45 pm

I removed that package as I did have it installed, then ran:

Code: Select all

pi@raspberrypi:~ $ cd /usr/share/mythtv/lib/
pi@raspberrypi:/usr/share/mythtv/lib $ sudo ln -s /opt/vc/lib/libbrcmEGL.so libGLESv2.so
pi@raspberrypi:/usr/share/mythtv/lib $ ls -l
total 0
lrwxrwxrwx 1 root root 25 Feb  8 18:40 libEGL.so.1 -> /opt/vc/lib/libbrcmEGL.so
lrwxrwxrwx 1 root root 25 Feb  8 18:40 libEGL.so.1.0.0 -> /opt/vc/lib/libbrcmEGL.so
lrwxrwxrwx 1 root root 25 Apr 20 16:09 libGLESv2.so -> /opt/vc/lib/libbrcmEGL.so
lrwxrwxrwx 1 root root 28 Feb  8 18:40 libGLESv2.so.2 -> /opt/vc/lib/libbrcmGLESv2.so
lrwxrwxrwx 1 root root 28 Feb  8 18:40 libGLESv2.so.2.0.0 -> /opt/vc/lib/libbrcmGLESv2.so
pi@raspberrypi:/usr/share/mythtv/lib $
The frontend became quite unstable, crashing out whenever I fast forwarded or rewound within a recording. I suspect I've messed with too many things and could do with starting again. Did you use the latest version of stretch, stringer26?

Post Reply