[mythtv-users] intermittent error starting mythfrontend on Raspberry PI OS 64 bit

James Abernathy jfabernathy at gmail.com
Tue Dec 14 16:36:07 UTC 2021


I run mythfrontend from the console on my Raspberry Pi 4 under Bullseye
aarch64. When it starts up it's great, but about 50% of the time it fails
due to:
drmModeGetResources failed (Operation not supported)

I have to reboot until it starts up correctly.  This is on a UHD 4K TV. It
seems to happen more than on a FHD TV. I'll attach the script (modified
from MikeB2013's pi-utils) I run to start it and 2 log files: one a capture
of the console and one the mythfrontend log file.
-------------------------------------------------
#!/bin/bash

# script to run mythfrontend from version 31 on Raspberry Pi under Raspian
Buster using EGLFS
# can be added to .bashrc to allow autostart of mythfrontend on boot

# Last Modified 24 July 2020

# Author Mike Bibbings

#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

echo "Starting MythTV Frontend -- this may take a few seconds -- Please
wait"

echo performance | sudo tee
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

#get first 2 characters
CURRENT_REFRESH=60

CURRENT_RES="1920x1080"

RESOLUTION="$CURRENT_RES@$CURRENT_REFRESH"

echo "Setting screen to $RESOLUTION"

# we need override file to force correct resolution.
# QT defaults to using EDID from connected hdmi device
# pi2/3 use /dev/dri/card0,  pi4 /dev/dri/card1
# find out which model of Pi we have


CARD="card1"

#file created everytime this script is run,avoids checking previous and
current resolution everytime
bash -c "cat >/home/pi/pi_mythfrontend.json" <<ENDOFSCRIPTINPUT
{
    "device": "/dev/dri/${CARD}",
    "outputs": [
        { "name": "HDMI1", "mode": "${RESOLUTION}" }
    ]
}
ENDOFSCRIPTINPUT

#for QT debug add to command line QT_QPA_EGLFS_DEBUG=1
QT_LOGGING_RULES=qt.qpa.*=true
QT_QPA_EGLFS_ALWAYS_SET_MODE="1" QT_QPA_PLATFORM=eglfs QT_QPA_EGLFS_DEBUG=1
QT_LOGGING_RULES=qt.qpa.*=true
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
-----------------------------
Starting MythTV Frontend -- this may take a few seconds -- Please wait
performance
Setting screen to 1920x1080 at 60
qt.qpa.egldeviceintegration: EGL device integration plugin keys:
("eglfs_emu", "eglfs_kms_egldevice", "eglfs_kms", "eglfs_x11")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted):
("eglfs_kms", "eglfs_emu", "eglfs_kms_egldevice", "eglfs_x11")
qt.qpa.egldeviceintegration: Trying to load device EGL integration
"eglfs_kms"
qt.qpa.eglfs.kms: Loading KMS setup from "/home/pi/pi_mythfrontend.json"
qt.qpa.eglfs.kms: Requested configuration (some settings may be ignored):
  headless: false
  hwcursor: true
  pbuffers: false
  separateScreens: false
  virtualDesktopLayout: 0
  outputs: QMap(("HDMI1", QMap(("mode", QVariant(QString,
"1920x1080 at 60"))("name",
QVariant(QString, "HDMI1")))))
qt.qpa.eglfs.kms: New DRM/KMS via GBM integration created
qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_kms"
qt.qpa.eglfs.kms: platformInit: Opening DRM device
qt.qpa.eglfs.kms: GBM: Using DRM device "/dev/dri/card1" specified in
config file
qt.qpa.eglfs.kms: Using backend-provided DRM device /dev/dri/card1
qt.qpa.eglfs.kms: Creating GBM device for file descriptor 4 obtained from
"/dev/dri/card1"
qt.qpa.eglfs.kms: Initalizing event reader for device 0x55c92a68f0 fd 4
qt.qpa.eglfs.kms: Querying EGLDisplay
qt.qpa.eglfs.kms: Event reader thread: entering event loop
drmModeGetResources failed (Operation not supported)
qt.qpa.input: libinput: event0  - Wireless Keyboard/Mouse: is tagged by
udev as: Keyboard
qt.qpa.input: libinput: event0  - Wireless Keyboard/Mouse: device is a
keyboard
qt.qpa.input: libinput: event1  - Wireless Keyboard/Mouse: is tagged by
udev as: Mouse
qt.qpa.input: libinput: event1  - Wireless Keyboard/Mouse: device is a
pointer
qt.qpa.input: libinput: event2  - Wireless Keyboard/Mouse Consumer Control:
is tagged by udev as: Keyboard
qt.qpa.input: libinput: event2  - Wireless Keyboard/Mouse Consumer Control:
device is a keyboard
qt.qpa.input: libinput: event5  - Harmony Keyboard Mouse: is tagged by udev
as: Mouse
qt.qpa.input: libinput: event5  - Harmony Keyboard Mouse: device is a
pointer
qt.qpa.input: libinput: event6  - Harmony Keyboard: is tagged by udev as:
Keyboard
qt.qpa.input: libinput: event6  - Harmony Keyboard: device is a keyboard
qt.qpa.input: libinput: event7  - Harmony Keyboard Consumer Control: is
tagged by udev as: Keyboard
qt.qpa.input: libinput: event7  - Harmony Keyboard Consumer Control: device
is a keyboard
qt.qpa.input: libinput: event8  - Harmony Keyboard System Control: is
tagged by udev as: Keyboard
qt.qpa.input: libinput: event8  - Harmony Keyboard System Control: device
is a keyboard
qt.qpa.input: libinput: event3  - vc4: is tagged by udev as: Keyboard
Pointingstick
qt.qpa.input: libinput: event3  - vc4: device is a pointer
qt.qpa.input: libinput: event3  - vc4: device is a keyboard
qt.qpa.input: libinput: event4  - vc4: is tagged by udev as: Keyboard
Pointingstick
qt.qpa.input: libinput: event4  - vc4: device is a pointer
qt.qpa.input: libinput: event4  - vc4: device is a keyboard
qt.qpa.input: Using xkbcommon for key mapping
no screens available, assuming 24-bit color
2021-12-14 11:14:15.102024 I  Setup Interrupt handler
2021-12-14 11:14:15.102048 I  Setup Terminated handler
2021-12-14 11:14:15.102057 I  Setup Segmentation fault handler
2021-12-14 11:14:15.102065 I  Setup Aborted handler
2021-12-14 11:14:15.102071 I  Setup Bus error handler
2021-12-14 11:14:15.102079 I  Setup Floating point exception handler
2021-12-14 11:14:15.102087 I  Setup Illegal instruction handler
2021-12-14 11:14:15.102101 I  Setup Real-time signal 0 handler
2021-12-14 11:14:15.102112 I  Setup User defined signal 1 handler
2021-12-14 11:14:15.102119 I  Setup User defined signal 2 handler
2021-12-14 11:14:15.102125 I  Setup Hangup handler
2021-12-14 11:14:15.102548 C  mythfrontend version: master
[v32-Pre-3144-g8d60da4ac4] www.mythtv.org
2021-12-14 11:14:15.102554 C  Qt version: compile: 5.15.2, runtime: 5.15.2
2021-12-14 11:14:15.102643 I  Debian GNU/Linux 11 (bullseye) (arm64)
2021-12-14 11:14:15.102647 N  Enabled verbose msgs:  general
2021-12-14 11:14:15.102832 N  Setting Log Level to LOG_INFO
2021-12-14 11:14:15.113288 I  Added logging to the console
2021-12-14 11:14:15.113323 N  Using runtime prefix = /usr
2021-12-14 11:14:15.113328 N  Using configuration directory =
/home/pi/.mythtv
2021-12-14 11:14:15.113388 I  Assumed character encoding: en_US.UTF-8
2021-12-14 11:14:15.113438 N  Setting 'PowerOffTVOnExit' being forced to '0'
2021-12-14 11:14:15.114043 I  Added logging to
/tmp/mythfrontend.20211214161415.1360.log
2021-12-14 11:14:15.114390 I  Loading en_us translation for module
mythfrontend
2021-12-14 11:14:15.115077 I  Empty LocalHostName. This is typical.
2021-12-14 11:14:15.115090 I  Using a profile name of: 'rpi4-mythtv'
(Usually the same as this host's name.)
2021-12-14 11:14:15.115232 I  Start up testing connections. DB localhost,
BE , attempt 0, status dbAwake, Delay: 2000
2021-12-14 11:14:16.638604 N  Setting QT default locale to en_US
2021-12-14 11:14:16.638616 I  Current locale en_US
2021-12-14 11:14:16.638714 N  Reading locale defaults from
/usr/share/mythtv//locales/en_us.xml
2021-12-14 11:14:16.676535 E  PowerDBus: No UPower interface. Unable to
monitor battery state
2021-12-14 11:14:16.698512 I  Power: On AC power
2021-12-14 11:14:16.698543 I  Power: Supported actions: Restart,Shutdown
2021-12-14 11:14:16.698572 N  Setting 'PowerOffTVOnExit' being forced to '0'
2021-12-14 11:14:16.706057 I  Listening on TCP 0.0.0.0:6547
2021-12-14 11:14:16.707395 I  Listening on TCP [::]:6547
2021-12-14 11:14:16.822177 I  Loading en_us translation for module
mythfrontend
2021-12-14 11:14:16.842117 I  VRR: No variable refresh rate support detected
2021-12-14 11:14:16.842128 E  Display: Qt has no screens!
2021-12-14 11:14:16.842166 N  Display: Desktop video mode: 1920x1080
60.000Hz
2021-12-14 11:14:16.854076 I  InputHandler: Starting
2021-12-14 11:14:16.854916 E  LIRC: Failed to connect to Unix socket
'/var/run/lirc/lircd'
eno: No such file or directory (2)
2021-12-14 11:14:16.854994 I  No joystick configuration found, not enabling
joystick control
2021-12-14 11:14:16.855438 I  UDPListener: Enabling
2021-12-14 11:14:16.857565 I  Binding to UDP 0.0.0.0:6948
2021-12-14 11:14:16.857710 I  Binding to UDP [::]:6948
2021-12-14 11:14:16.891795 I  Using Frameless Window
2021-12-14 11:14:16.891800 I  Using Full Screen Window
2021-12-14 11:14:16.891864 I  Qt: Cannot create window: no screens available
Handling Aborted
./run_mythfrontend.sh: line 51:  1360 Aborted
QT_QPA_EGLFS_ALWAYS_SET_MODE="1" QT_QPA_PLATFORM=eglfs QT_QPA_EGLFS_DEBUG=1
QT_LOGGING_RULES=qt.qpa.*=true
QT_QPA_EGLFS_KMS_CONFIG=/home/pi/pi_mythfrontend.json mythfrontend
$ARGUMENTS
The keyboard is in some unknown mode
Changing to the requested mode may make your keyboard unusable, please use
-f to force the change.
---------------------------------------
2021-12-14 11:14:15.102024 I [1360/1360] thread_unknown
signalhandling.cpp:179 (SetHandlerPrivate) - Setup Interrupt handler
2021-12-14 11:14:15.102048 I [1360/1360] thread_unknown
signalhandling.cpp:179 (SetHandlerPrivate) - Setup Terminated handler
2021-12-14 11:14:15.102057 I [1360/1360] thread_unknown
signalhandling.cpp:179 (SetHandlerPrivate) - Setup Segmentation fault
handler
2021-12-14 11:14:15.102065 I [1360/1360] thread_unknown
signalhandling.cpp:179 (SetHandlerPrivate) - Setup Aborted handler
2021-12-14 11:14:15.102071 I [1360/1360] thread_unknown
signalhandling.cpp:179 (SetHandlerPrivate) - Setup Bus error handler
2021-12-14 11:14:15.102079 I [1360/1360] thread_unknown
signalhandling.cpp:179 (SetHandlerPrivate) - Setup Floating point exception
handler
2021-12-14 11:14:15.102087 I [1360/1360] thread_unknown
signalhandling.cpp:179 (SetHandlerPrivate) - Setup Illegal instruction
handler
2021-12-14 11:14:15.102101 I [1360/1360] thread_unknown
signalhandling.cpp:179 (SetHandlerPrivate) - Setup Real-time signal 0
handler
2021-12-14 11:14:15.102112 I [1360/1360] thread_unknown
signalhandling.cpp:179 (SetHandlerPrivate) - Setup User defined signal 1
handler
2021-12-14 11:14:15.102119 I [1360/1360] thread_unknown
signalhandling.cpp:179 (SetHandlerPrivate) - Setup User defined signal 2
handler
2021-12-14 11:14:15.102125 I [1360/1360] thread_unknown
signalhandling.cpp:179 (SetHandlerPrivate) - Setup Hangup handler
2021-12-14 11:14:15.102548 C [1360/1360] thread_unknown
mythcommandlineparser.cpp:2797 (ConfigureLogging) - mythfrontend version:
master [v32-Pre-3144-g8d60da4ac4] www.mythtv.org
2021-12-14 11:14:15.102554 C [1360/1360] thread_unknown
mythcommandlineparser.cpp:2801 (ConfigureLogging) - Qt version: compile:
5.15.2, runtime: 5.15.2
2021-12-14 11:14:15.102643 I [1360/1360] thread_unknown
mythcommandlineparser.cpp:2803 (ConfigureLogging) - Debian GNU/Linux 11
(bullseye) (arm64)
2021-12-14 11:14:15.102647 N [1360/1360] thread_unknown
mythcommandlineparser.cpp:2805 (ConfigureLogging) - Enabled verbose msgs:
 general
2021-12-14 11:14:15.102832 N [1360/1360] thread_unknown logging.cpp:686
(logStart) - Setting Log Level to LOG_INFO
2021-12-14 11:14:15.113288 I [1360/1363] Logger logging.cpp:274 (run) -
Added logging to the console
2021-12-14 11:14:15.113323 N [1360/1360] thread_unknown mythdirs.cpp:203
(InitializeMythDirs) - Using runtime prefix = /usr
2021-12-14 11:14:15.113328 N [1360/1360] thread_unknown mythdirs.cpp:204
(InitializeMythDirs) - Using configuration directory = /home/pi/.mythtv
2021-12-14 11:14:15.113388 I [1360/1360] CoreContext
mythcorecontext.cpp:287 (Init) - Assumed character encoding: en_US.UTF-8
2021-12-14 11:14:15.113438 N [1360/1360] CoreContext
mythcommandlineparser.cpp:2836 (ApplySettingsOverride) - Setting
'PowerOffTVOnExit' being forced to '0'
2021-12-14 11:14:15.114043 I [1360/1362] LogForward loggingserver.cpp:110
(FileLogger) - Added logging to /tmp/mythfrontend.20211214161415.1360.log
2021-12-14 11:14:15.114390 I [1360/1360] CoreContext mythtranslation.cpp:62
(load) - Loading en_us translation for module mythfrontend
2021-12-14 11:14:15.115077 I [1360/1360] CoreContext mythcontext.cpp:628
(LoadDatabaseSettings) - Empty LocalHostName. This is typical.
2021-12-14 11:14:15.115090 I [1360/1360] CoreContext mythcontext.cpp:635
(LoadDatabaseSettings) - Using a profile name of: 'rpi4-mythtv' (Usually
the same as this host's name.)
2021-12-14 11:14:15.115232 I [1360/1360] CoreContext mythcontext.cpp:884
(TestDBconnection) - Start up testing connections. DB localhost, BE ,
attempt 0, status dbAwake, Delay: 2000
2021-12-14 11:14:16.638604 N [1360/1360] CoreContext
mythcorecontext.cpp:1852 (InitLocale) - Setting QT default locale to en_US
2021-12-14 11:14:16.638616 I [1360/1360] CoreContext
mythcorecontext.cpp:1885 (SaveLocaleDefaults) - Current locale en_US
2021-12-14 11:14:16.638714 N [1360/1360] CoreContext mythlocale.cpp:120
(LoadDefaultsFromXML) - Reading locale defaults from
/usr/share/mythtv//locales/en_us.xml
2021-12-14 11:14:16.676535 E [1360/1360] CoreContext
platforms/mythpowerdbus.cpp:102 (Init) - PowerDBus: No UPower interface.
Unable to monitor battery state
2021-12-14 11:14:16.698512 I [1360/1360] CoreContext mythpower.cpp:353
(PowerLevelChanged) - Power: On AC power
2021-12-14 11:14:16.698543 I [1360/1360] CoreContext mythpower.cpp:135
(Init) - Power: Supported actions: Restart,Shutdown
2021-12-14 11:14:16.698572 N [1360/1360] CoreContext
mythcommandlineparser.cpp:2836 (ApplySettingsOverride) - Setting
'PowerOffTVOnExit' being forced to '0'
2021-12-14 11:14:16.706057 I [1360/1360] CoreContext serverpool.cpp:415
(listen) - Listening on TCP 0.0.0.0:6547
2021-12-14 11:14:16.707395 I [1360/1360] CoreContext serverpool.cpp:415
(listen) - Listening on TCP [::]:6547
2021-12-14 11:14:16.822177 I [1360/1360] CoreContext mythtranslation.cpp:62
(load) - Loading en_us translation for module mythfrontend
2021-12-14 11:14:16.842117 I [1360/1360] CoreContext mythvrr.cpp:93
(Create) - VRR: No variable refresh rate support detected
2021-12-14 11:14:16.842128 E [1360/1360] CoreContext mythdisplay.cpp:624
(InitScreenBounds) - Display: Qt has no screens!
2021-12-14 11:14:16.842166 N [1360/1360] CoreContext mythdisplay.cpp:545
(Initialise) - Display: Desktop video mode: 1920x1080 60.000Hz
2021-12-14 11:14:16.854076 I [1360/1360] CoreContext
devices/mythinputdevicehandler.cpp:53 (Start) - InputHandler: Starting
2021-12-14 11:14:16.854916 E [1360/1360] CoreContext devices/lirc.cpp:198
(Init) - LIRC: Failed to connect to Unix socket '/var/run/lirc/lircd'
eno: No such file or directory (2)
2021-12-14 11:14:16.854994 I [1360/1360] CoreContext devices/jsmenu.cpp:140
(ReadConfig) - No joystick configuration found, not enabling joystick
control
2021-12-14 11:14:16.855438 I [1360/1372] UDP mythudplistener.cpp:34
(DoEnable) - UDPListener: Enabling
2021-12-14 11:14:16.857565 I [1360/1372] UDP serverpool.cpp:556 (bind) -
Binding to UDP 0.0.0.0:6948
2021-12-14 11:14:16.857710 I [1360/1372] UDP serverpool.cpp:556 (bind) -
Binding to UDP [::]:6948
2021-12-14 11:14:16.891795 I [1360/1360] CoreContext mythmainwindow.cpp:659
(Init) - Using Frameless Window
2021-12-14 11:14:16.891800 I [1360/1360] CoreContext mythmainwindow.cpp:675
(Init) - Using Full Screen Window
2021-12-14 11:14:16.891864 I [1360/1360] CoreContext
mythcommandlineparser.cpp:2816 (operator()) - Qt: Cannot create window: no
screens available
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20211214/e84cd4d2/attachment-0001.htm>


More information about the mythtv-users mailing list