Mailing List Archive

Rasberry Pi 4 - New FE
Hi list,

I've just got a new Rasberry Pi 4 as a Frontend only. The wiki has been a
useful source of information and I've had mixed success.

Im currently running an up to date Rasberry Pi OS lite with the Myth TV
Light packages.

I'm getting lots of segfaults. Running myth frontend with -v all doesn't
yield anything that useful. It seems to be just after EDID exchange. It
segfaults loading mythfrontend 9 times out of 10. No idea why sometimes it
works and sometimes it doesn't. Any suggestions welcome on how to resolve
this?

I was thinking about running Ubuntu (as thats what all my other x86
frontends run) - the wiki says to use the mythbuntu PPA - but Im pretty
sure they only build for amd64 which wont work on the ARM Rasberry Pi?

Lastly , Myth Music isn't showing up. Im wondering if this is either
because its not included in the MythTV Light plugins or Im perhaps missing
something as I used Rasberry Pi OS lite?

Thanks in advance.
Re: Rasberry Pi 4 - New FE [ In reply to ]
On Tue, 8 Jun 2021 22:14:38 +0100, you wrote:

>Hi list,
>
>I've just got a new Rasberry Pi 4 as a Frontend only. The wiki has been a
>useful source of information and I've had mixed success.
>
>Im currently running an up to date Rasberry Pi OS lite with the Myth TV
>Light packages.
>
>I'm getting lots of segfaults. Running myth frontend with -v all doesn't
>yield anything that useful. It seems to be just after EDID exchange. It
>segfaults loading mythfrontend 9 times out of 10. No idea why sometimes it
>works and sometimes it doesn't. Any suggestions welcome on how to resolve
>this?
>
>I was thinking about running Ubuntu (as thats what all my other x86
>frontends run) - the wiki says to use the mythbuntu PPA - but Im pretty
>sure they only build for amd64 which wont work on the ARM Rasberry Pi?
>
>Lastly , Myth Music isn't showing up. Im wondering if this is either
>because its not included in the MythTV Light plugins or Im perhaps missing
>something as I used Rasberry Pi OS lite?
>
>Thanks in advance.

I am also experimenting with a Raspberry Pi 4B with 8 Gibytes of RAM.
I tried installing MythTV myself built from source, and I am not
having any segfaults with mythfrontend. I am running a regular RPi OS
on a hard drive, to make it faster than my SD card. If you have to
compile MythTV, on a Pi 4 it is OK, but it does take a while.

The problem with using Ubuntu on a Pi is that it does not have the
tweaked video drivers that RPi OS has, so is unlikely to work well
with MythTV. But I was going to give it a try anyway, just to see for
myself, once I find the time.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Rasberry Pi 4 - New FE [ In reply to ]
Hi Adam!


> I've just got a new Rasberry Pi 4 as a Frontend only. The wiki has been a
> useful source of information and I've had mixed success.
>
> Im currently running an up to date Rasberry Pi OS lite with the Myth TV
> Light packages.
>
> I'm getting lots of segfaults. Running myth frontend with -v all doesn't
> yield anything that useful. It seems to be just after EDID exchange. It
> segfaults loading mythfrontend 9 times out of 10. No idea why sometimes it
> works and sometimes it doesn't. Any suggestions welcome on how to resolve
> this?

I am using a Raspberry Pi 400 with 4 GB as a Frontend and have a few
things to suggest. The current Raspbian and MythTV Lite work fine.


As for the segfault try decreaing your GPU memory (gpu_mem) – to me
sounds counter-intuitive but the ARM CPU and GPU apparently share 1GB of
memory – check /vcgencmd get_mem gpu/ and /vcgencmd get_mem arm/ –
increasing one will decrease the other. Off-hand I don’t recall what I
have my RPi400 configured but a different one with Motion (surveillance
utility) with two cameras works fine with gpu_mem set at 128 MB and
starts choking at 256.


What probably won’t matter but I’ll toss in for free advice:


Use a 5 GHz channel connection as 2.4 GHz is noisy and crowded. (I have
used an RPi3 as a Frontend but only connected via Ethernet as the 2.4
GHz WiFi had poor results.)


Power supply. This includes the wall wart itself and the cable between.
You should be seeing the low voltage indicator at the upper right-hand
corner but I had an issue a while back on a different Pi4 which was
resolved by swapping a Pi-approved wall wart (5.1v @ 3,000 mA) for a
Pi-branded wall wart (5.1v @ 3.0A) and the problems went away. (Maybe it
thought three amps was more than three thousand milliamps. <joke>)



And not sure on this one but have heard some of the microSD cards are
slow, so using an upper-tier name-brand card over a two-for-a-dollar
off-brand may help. Also use Class 10’s. As for capacity, I have been
using 16- and 32 GB units. (Storage to USB or NAS.) Tom’s Hardware had a
test article (I neglected to keep the link in my notes) which for my
preferences rated the SanDisk Extreme Pro as “all-around great
performance”, the Kingston Canvas React as “mediocre 4K read/writes” and
the Samsung Evo Plus as “good price” and “fast application open and boot
time”. (So what did I do at the time? Re-ordered more SanDisk Ultra Plus.)


Barry
Re: Rasberry Pi 4 - New FE [ In reply to ]
>
>
>
> > I've just got a new Rasberry Pi 4 as a Frontend only. The wiki has been
> a
> > useful source of information and I've had mixed success.
> >
> > Im currently running an up to date Rasberry Pi OS lite with the Myth TV
> > Light packages.
> >
> > I'm getting lots of segfaults. Running myth frontend with -v all doesn't
> > yield anything that useful. It seems to be just after EDID exchange. It
> > segfaults loading mythfrontend 9 times out of 10. No idea why sometimes
> it
> > works and sometimes it doesn't. Any suggestions welcome on how to
> resolve
> > this?
>
> I am using a Raspberry Pi 400 with 4 GB as a Frontend and have a few
> things to suggest. The current Raspbian and MythTV Lite work fine.
>
>
> As for the segfault try decreaing your GPU memory (gpu_mem) ? to me
> sounds counter-intuitive but the ARM CPU and GPU apparently share 1GB of
> memory ? check /vcgencmd get_mem gpu/ and /vcgencmd get_mem arm/ ?
> increasing one will decrease the other. Off-hand I don?t recall what I
> have my RPi400 configured but a different one with Motion (surveillance
> utility) with two cameras works fine with gpu_mem set at 128 MB and
> starts choking at 256.
>
>
> What probably won?t matter but I?ll toss in for free advice:
>
>
> Use a 5 GHz channel connection as 2.4 GHz is noisy and crowded. (I have
> used an RPi3 as a Frontend but only connected via Ethernet as the 2.4
> GHz WiFi had poor results.)
>
>
> Power supply. This includes the wall wart itself and the cable between.
> You should be seeing the low voltage indicator at the upper right-hand
> corner but I had an issue a while back on a different Pi4 which was
> resolved by swapping a Pi-approved wall wart (5.1v @ 3,000 mA) for a
> Pi-branded wall wart (5.1v @ 3.0A) and the problems went away. (Maybe it
> thought three amps was more than three thousand milliamps. <joke>)
>
>
>
> And not sure on this one but have heard some of the microSD cards are
> slow, so using an upper-tier name-brand card over a two-for-a-dollar
> off-brand may help. Also use Class 10?s. As for capacity, I have been
> using 16- and 32 GB units. (Storage to USB or NAS.) Tom?s Hardware had a
> test article (I neglected to keep the link in my notes) which for my
> preferences rated the SanDisk Extreme Pro as ?all-around great
> performance?, the Kingston Canvas React as ?mediocre 4K read/writes? and
> the Samsung Evo Plus as ?good price? and ?fast application open and boot
> time?. (So what did I do at the time? Re-ordered more SanDisk Ultra Plus.)
>
>
> Barry
>



Hi Barry and Stephen,

Thanks for your replies. Your advice with the GPU memory does seem to have
some effect , I had tried 256M with lots of segfaults - but at 64M it seems
far less frequent.

Regarding my problems with MythMusic as part of the MythTV Light Plugins -
this time I installed the standard Rasberry Pi OS rather than the lite
version. MythMusic now shows and works fine.
It must have been some missing dependency that apt didn't pick up.

On the subject of Music - I'm planning to get an amp for the Pi
https://www.hifiberry.com/shop/boards/hifiberry-amp2/
And buy a strong PSU to go with it.

I've just got to figure out how to get Myth TV to work with some of the
buttons on my basic usb fake keyboard/mouse remote control.

As the Pi runs without X , these buttons are not recognised by Myth - but
the same remotes all work fine and the buttons are seen in Myths edit keys
when X runs on x86.

I can see the button presses using showkey and evtest ( KEY_VOLUMEDOWN
KEY_VOLUMEUP KEY_HOMEPAGE) but trying to set them inside Myth Frontends
Settings->Edit Keys have the error: Pressed Key Not Recognised

Does anyone have any ideas?
Re: Rasberry Pi 4 - New FE [ In reply to ]
Hi Adam!

> I've just got to figure out how to get Myth TV to work with some of the
> buttons on my basic usb fake keyboard/mouse remote control.
>
> As the Pi runs without X , these buttons are not recognised by Myth - but
> the same remotes all work fine and the buttons are seen in Myths edit keys
> when X runs on x86.
>
> I can see the button presses using showkey and evtest ( KEY_VOLUMEDOWN
> KEY_VOLUMEUP KEY_HOMEPAGE) but trying to set them inside Myth Frontends
> Settings->Edit Keys have the error: Pressed Key Not Recognised
>
> Does anyone have any ideas?

Not sure if this is a worthwhile idea but some of MythTV’s Key Mappings
are used in multiple menus, so possibly a conflict?


Another possibility is a programming error – no idea why it would work
with showkey and not MythTV. Anyway, temporarily test a known working
function: maybe “T” (Closed Captioning on/off), so now your VolumeDown
key would toggle CC mode. Verifies your remote key table is built correctly.


You might also look to see if your table is overring or ignoring the
entries you put in. I tend to add my stuff at the top or bottom so I can
find it easier. One table had ‘my’ function repeated, so the computer
took the last entry. Use of upper- and lower case might make a
difference. Watch punctuation: there are multiple quotation marks: a
double is not a single, and a straight up-and-down quote is not the same
as am angled one. And some utilities are picky about indents, so three
spaces is not the same as four, much less a tab! I also had played with
a utility recently here everything below a command line was a comment –
so much for my find-it-at-the-bottom trick!


Hopefully my hints are semi-helpful.

Barry
Re: Rasberry Pi 4 - New FE [ In reply to ]
On Fri, Jun 11, 2021 at 09:40:47AM +0100, Adam Skinner wrote:
> I've just got to figure out how to get Myth TV to work with some of the
> buttons on my basic usb fake keyboard/mouse remote control.
>
> As the Pi runs without X , these buttons are not recognised by Myth - but
> the same remotes all work fine and the buttons are seen in Myths edit keys
> when X runs on x86.
>
> I can see the button presses using showkey and evtest ( KEY_VOLUMEDOWN
> KEY_VOLUMEUP KEY_HOMEPAGE) but trying to set them inside Myth Frontends
> Settings->Edit Keys have the error: Pressed Key Not Recognised
>
> Does anyone have any ideas?

Since mythfrontend is reacting and giving the error message, it is clearly
receiving the keypress event. So, I think that is good. If the keypress
was getting swallowed up by something else, I think it would be harder to
track down.

The message "Pressed key not recognized" is generated in
mythtv/programs/mythfrontend/keygrabber.cpp and is triggered when
QKeySequence(keycode).toString() returns an empty string. QKeySequence
is from the QT library.

If this produces a valid keypress on a different system (showkey reports
the same keycode for the keypress), then I would suspect that perhaps the
locale is set differently or the keyboard type? These things could affect
how QT interprets the keycode.

marcus hall
marcus@tuells.org
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Rasberry Pi 4 - New FE [ In reply to ]
On Fri, 11 Jun 2021 09:40:47 +0100, you wrote:

>I've just got to figure out how to get Myth TV to work with some of the
>buttons on my basic usb fake keyboard/mouse remote control.
>
>As the Pi runs without X , these buttons are not recognised by Myth - but
>the same remotes all work fine and the buttons are seen in Myths edit keys
>when X runs on x86.
>
>I can see the button presses using showkey and evtest ( KEY_VOLUMEDOWN
>KEY_VOLUMEUP KEY_HOMEPAGE) but trying to set them inside Myth Frontends
>Settings->Edit Keys have the error: Pressed Key Not Recognised
>
>Does anyone have any ideas?

I have a feeling that MythTV only works with real character
keystrokes. It simply does not handle anything else like the
KEY_VOLUME* keys. When you are using lirc with an IR remote, you have
to get those sorts of keystrokes translated by lirc to something that
MythTV recognises, so KEY_VOLUMEUP gets translated to ] and
KEY_VOLUMEDOWN gets translated to [. The system somewhere (in X?)
does recognise those keystrokes and in Ubuntu will change the system
volume when it sees them. But if you try to use them with MythTV
programs without lirc translating them, they do not work. So I expect
that the same happens when they come from a keyboard instead of an IR
remote.

If that is what is happening, then the only way to use those keys with
MythTV will be to translate them. There is a way to redefine the
character generated from each key, but the effect will be system wide,
not just for MythTV, so if the Pi is recognising KEY_VOLUME* and
changing the system volume outside MythTV, if you redefine the key
value that is generated, that will stop working.

It may be possible to write a wrapper program that is run first and
then runs mythfrontend. It would get the keystrokes and translate
them and pass them on to mythfrontend, in a similar way to what lirc
does. But it would be a fair bit of work to find out how to do that
and write such a program. It may be worth doing an Internet search to
see if such a thing already exists.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Rasberry Pi 4 - New FE [ In reply to ]
On 2021-06-11 4:40 a.m., Adam Skinner wrote:
>
>
> > I've just got a new Rasberry Pi 4 as a Frontend only.  The wiki
> has been a
> > useful source of information and I've had mixed success.

>
> I've just got to figure out how to get Myth TV to work with some of the
> buttons on my basic usb fake keyboard/mouse remote control.
>
> As the Pi runs without X , these buttons are not recognised by Myth -
> but the same remotes all work fine and the buttons are seen in Myths
> edit keys when X runs on x86.
>
> I can see the button presses using showkey and evtest  ( KEY_VOLUMEDOWN
> KEY_VOLUMEUP  KEY_HOMEPAGE) but trying to set them inside Myth Frontends
> Settings->Edit Keys have the error: Pressed Key Not Recognised
>
> Does anyone have any ideas?
>

It's back to the wiki at https://www.mythtv.org/wiki/HID_Remotes

I've been using the ir_keytable method set out on that page, with
success and dispensed with lirc. You re-map the keys *before* they are
passed to your program (or X if you are running X). Basically turns your
remote into a keyboard so KEY_VOLUMEDOWN is interpreted as ].

Geoff



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Rasberry Pi 4 - New FE [ In reply to ]
>
> I've been using the ir_keytable method set out on that page, with
> success and dispensed with lirc. You re-map the keys *before* they are
> passed to your program (or X if you are running X). Basically turns your
> remote into a keyboard so KEY_VOLUMEDOWN is interpreted as ].
>

I don't have a Raspberry Pi but I swapped LIRC for ir_keytable a few years
ago and it's a lot better.

>
Re: Rasberry Pi 4 - New FE [ In reply to ]
On Fri, 11 Jun 2021 22:16:41 -0400, you wrote:

>On 2021-06-11 4:40 a.m., Adam Skinner wrote:
>>
>>
>> > I've just got a new Rasberry Pi 4 as a Frontend only.? The wiki
>> has been a
>> > useful source of information and I've had mixed success.
>
>>
>> I've just got to figure out how to get Myth TV to work with some of the
>> buttons on my basic usb fake keyboard/mouse remote control.
>>
>> As the Pi runs without X , these buttons are not recognised by Myth -
>> but the same remotes all work fine and the buttons are seen in Myths
>> edit keys when X runs on x86.
>>
>> I can see the button presses using showkey and evtest? ( KEY_VOLUMEDOWN
>> KEY_VOLUMEUP? KEY_HOMEPAGE) but trying to set them inside Myth Frontends
>> Settings->Edit Keys have the error: Pressed Key Not Recognised
>>
>> Does anyone have any ideas?
>>
>
>It's back to the wiki at https://www.mythtv.org/wiki/HID_Remotes
>
>I've been using the ir_keytable method set out on that page, with
>success and dispensed with lirc. You re-map the keys *before* they are
>passed to your program (or X if you are running X). Basically turns your
>remote into a keyboard so KEY_VOLUMEDOWN is interpreted as ].
>
>Geoff

That is for IR remotes though. Lirc and ir-keytable do not work for
keyboards, so if the OP's fake keyboard type remote is interfaced as a
keyboard instead of an IR remote, neither lirc or ir-keytable will
work.

And, while ir-keytable mapping does work for IR remotes, it has some
limitations. In my case, I use mplayer as an auxiliary video player
in mythfrontend, to play video files that do not work in
mythfrontend's builtin player (such as old .wmv files). So I need to
have two different IR setups, one for mythfrontend and one for
mplayer, which you simply can not do with ir-keytable mapping. So
lirc is the only way to do that.

Getting lirc to work is not as difficult as people make it out to be,
and it does work very well once it is configured. The worst problems
are that old lirc configurations stopped working when the new version
started doing things a different way, and that on Ubuntu, the lirc
package as installed is broken in several different ways. For Ubuntu
(on x86), I have a script that fixes the broken package problem:

http://www.jsw.gen.nz/mythtv/lirc-ubuntu-18.04-install.sh
http://www.jsw.gen.nz/mythtv/lirc-ubuntu-20.04-install.sh

After that, you can use the new setup tools to configure it, and I am
happy to help. There are also various threads on this list where lirc
configuration for the new version has been discussed.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org