launching mythfrontend on Bullseye

For discussion of topics specific to MythTV on Raspberry Pi devices
Post Reply
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

launching mythfrontend on Bullseye

Post by jfabernathy »

EDITED - Note this scripted was changed to solve a random start up problem. Note change to .json file for "device="

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
Key changes were the fact tvservice doesn't work in Bullseye and the mode had to leave off the @60 pr @50.
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: launching mythfrontend on Bullseye

Post by jfabernathy »

Please note the discussion at viewtopic.php?f=46&t=4741#p23382

I've modified part of the script for run_mythfrontend.sh based on what I learned in that discussion.
Post Reply