So I read the post link to the Raspberry forum, but do not understand the "compositor" and how to turn it on or off. Can you explain?Rodyland wrote: ↑Fri Jul 24, 2020 3:56 amFWIW I'm seeing the same problem as of doing an update last night. Might have to try the kernel downgrade.
EDIT: Downgrade of kernel as per the link posted above "worked" in that the image was fixed, but audio was lost.
EDIT2: Re-upgraded, enabled the compositor, sound and video now working.
RPi 4 MythTV-light 31 issues
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: RPi 4 MythTV-light 31 issues
Re: RPi 4 MythTV-light 31 issues
If you are using a custom .xsession file, you can start the compositor by doing the following, add /usr/lib/raspi-config/cmstart.sh :
Code: Select all
pi@raspberrypi:~ $ cat /home/pi/.xsession
#!/bin/bash
/usr/lib/raspi-config/cmstart.sh &
sleep 5s
/home/pi/bin/start.mythfrontend
jfabernathy wrote: ↑Fri Jul 24, 2020 8:35 amSo I read the post link to the Raspberry forum, but do not understand the "compositor" and how to turn it on or off. Can you explain?Rodyland wrote: ↑Fri Jul 24, 2020 3:56 amFWIW I'm seeing the same problem as of doing an update last night. Might have to try the kernel downgrade.
EDIT: Downgrade of kernel as per the link posted above "worked" in that the image was fixed, but audio was lost.
EDIT2: Re-upgraded, enabled the compositor, sound and video now working.
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: RPi 4 MythTV-light 31 issues
Well, I'm confused about the need for a compositor. Here's what I did after MikeB updated his scripts yesterday.
1. Fresh install of Raspberry Pi OS and did a fully upgrade. rebooted
2. Clone the latest pi-utils from github.
3. run "pi-utils/pi-setup_mythtv_31.sh and reboot
When the system reboots I have mythfrontend running full screen. All I had to do was configure the backend and then configure the audio and video. It's working as expected.
Jim A
1. Fresh install of Raspberry Pi OS and did a fully upgrade. rebooted
2. Clone the latest pi-utils from github.
Code: Select all
https://github.com/MikeB2013/pi-utils
When the system reboots I have mythfrontend running full screen. All I had to do was configure the backend and then configure the audio and video. It's working as expected.
Jim A
Re: RPi 4 MythTV-light 31 issues
Because of your post, I went looking at the script to see what the script did. I discovered that you can run mythfrontend without the X server. So if you disabled the GUI desktop via raspi-config, then use the following, mythfrontend will launch without the need for X or its compositor... this explains why you didn't see the issue with the newer kernel.
Full details https://www.mythtv.org/wiki/Raspberry_P ... n_Raspbian
Code: Select all
QT_QPA_EGLFS_ALWAYS_SET_MODE="1" QT_QPA_PLATFORM=eglfs mythfrontend -O PowerOffTVOnExit=0 --logpath=/home/pi/logs
Full details https://www.mythtv.org/wiki/Raspberry_P ... n_Raspbian
jfabernathy wrote: ↑Sat Jul 25, 2020 10:58 amWell, I'm confused about the need for a compositor. Here's what I did after MikeB updated his scripts yesterday.
1. Fresh install of Raspberry Pi OS and did a fully upgrade. rebooted
2. Clone the latest pi-utils from github.3. run "pi-utils/pi-setup_mythtv_31.sh and rebootCode: Select all
https://github.com/MikeB2013/pi-utils
When the system reboots I have mythfrontend running full screen. All I had to do was configure the backend and then configure the audio and video. It's working as expected.
Jim A
Re: RPi 4 MythTV-light 31 issues
I've been seeing exactly the same issue with the frontend segment faulting on startup. Tried applying the fix above, which prevents it from crashing but results in the monitor being driven at the highest available resolution which I don't want (2160p30 on content intended for a 50Hz frame rate doesn't work too well....) and no obvious way to change it.bigdarkspot wrote: ↑Wed Jul 22, 2020 10:29 pmOk, I've made some progress, thanks to a QT developer's post to some forum somewhere...
I changed the run_mythfrontend.sh script. I changed the end section to look like this:I got rid of the part referencing the json file:Code: Select all
export QT_QPA_EGLFS_ALWAYS_SET_MODE="1" #for QT debug add to command line QT_QPA_EGLFS_DEBUG=1 QT_LOGGING_RULES=qt.qpa.*=true QT_QPA_PLATFORM=eglfs 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
and added the export:Code: Select all
QT_QPA_EGLFS_KMS_CONFIG=/home/pi/pi_mythfrontend.json
Now it no longer crashes, it shows the user interface. The only problem I have now is that it freezes when you try to play back a recording. I'm about to dig in to that issue...Code: Select all
export QT_QPA_EGLFS_ALWAYS_SET_MODE="1"
After a lot of head scratching it turns out that my Pi 4 with the latest Raspberry Pi OS Buster has the DRM device on /dev/dri/card0, at least most of the time. Fixing run_mythfrontend.sh to force that on a Pi 4 fixes the issue and, having set the desired mode in /boot/config.txt, carries the desired mode across to the frontend.
I'm not entirely sure that behaviour is consistent though. On one occasion since I change it, it went back to crashing on startup but a reboot fixed it.
Re: RPi 4 MythTV-light 31 issues
As I suspected it isn't consistent. The right answer is to modify run_mythfrontend.sh to use /dev/dri/by-path/platform-gpu-card which links to whichever device is the correct one.
Code: Select all
if [ "$PI_MODEL" = 1 ]
then
CARD="by-path/platform-gpu-card"
else
CARD="card0"
fi