Back in history when I used Buster on my RPI4 on mythtv v31 and newer I used a script that was part of pi-utils called run_mythfrontend.sh. Now that I'm on Bullseye that script does not work for several reasons. Instead of listing all the stuff that needs changing, I'll just put in my script that launch mythfrontend on the RPI4 under Bullseye at the console where it runs best.
Code: Select all
#!/bin/bash
#check for any arguments on command line, if so use for mythfrontend command, so we can use different parameters
#e.g. run_mythfrontend.sh --logpath /home/pi --loglevel debug
# if no arguments set --logpath /tmp
if [ -z "$*" ] ; then
ARGUMENTS="--logpath /tmp -O PowerOffTVOnExit=0"
else
ARGUMENTS="$*"
fi
#ASSUMING RPI4 only
echo "Starting MythTV Frontend -- this may take a few seconds -- Please wait"
#file created every time this script is run,avoids checking previous and current resolution every time
bash -c "cat >/home/pi/pi_mythfrontend.json" <<ENDOFSCRIPTINPUT
{
"device": "/dev/dri/by-path/platform-gpu-card",
"outputs": [
{ "name": "HDMI1", "mode": "1920x1080@60" }
]
}
ENDOFSCRIPTINPUT
QT_QPA_EGLFS_ALWAYS_SET_MODE="1" QT_QPA_PLATFORM=eglfs QT_QPA_EGLFS_KMS_CONFIG=/home/pi/pi_mythfrontend.json mythfrontend $ARGUMENTS
# fixup keyboard after exit from mythfrontend, bug in QT causes segment fault which kills keyboard input
kbd_mode -u
# restore cursor
setterm --cursor on
exit 0