runcommand.sh slow on RPi 1
-
Pi Model: Raspberry Pi Model B Rev 2
Power Supply used: USB wall charger
RetroPie Version Used: 4.7.1
Built From: retropie-buster-4.7.1-rpi1_zero.img.gz
USB Devices connected: wifi dongle, keyboard
Controller used: keyboard
Guide used: official installation guide
Emulator: fuse (ZX Spectrum)
How to replicate the problem: launch any ZX Spectrum gameHi, and thanks for RetroPie before anything else! I use mine for ZX Spectrum gaming. It was trivial to install (kudos!).
My question is: It takes about 15 seconds to launch a game, from the moment I press "A" to launch it until I can see the runcommand launch menu. I was wondering if this can be improved (I am aware that the launch menu itself can be customized).
I made a copy of
/opt/retropie/supplementary/runcommand/runcommand.sh
and added some debug messages. I discovered two things, both related to video mode switching:- Running
/opt/retropie/supplementary/mesa-drm/modetest -r
takes about 5 seconds. I ran this manually and got the output below. I can get rid of this delay by deleting the mesa-drm package from RetroPie setup -> Manage packages -> dependencies, but this feels wrong (at the very least, the system warns me that mesa-drm could be reinstalled when I perform a system update).
pi@retropie:~ $ time /opt/retropie/supplementary/mesa-drm/modetest -r trying to open device 'vc4'...failed trying to open device 'i915'...failed trying to open device 'amdgpu'...failed trying to open device 'radeon'...failed trying to open device 'nouveau'...failed trying to open device 'vmwgfx'...failed trying to open device 'omapdrm'...failed trying to open device 'exynos'...failed trying to open device 'tilcdc'...failed trying to open device 'msm'...failed trying to open device 'sti'...failed trying to open device 'tegra'...failed trying to open device 'imx-drm'...failed trying to open device 'rockchip'...failed trying to open device 'atmel-hlcdc'...failed trying to open device 'fsl-dcu-drm'...failed trying to open device 'virtio_gpu'...failed trying to open device 'mediatek'...failed trying to open device 'meson'...failed trying to open device 'pl111'...failed trying to open device 'stm'...failed trying to open device 'sun4i-drm'...failed trying to open device 'armada-drm'...failed no device found real 0m3.690s user 0m0.107s sys 0m1.875s
- Running
/opt/vc/bin/tvservice -m CEA
and-m DMT
takes another 5 seconds total. The commands themselves run instantly, butruncommand.sh
line 224 breaks the output into lines and passes each line togrep
in the line below. That causes the slowdown.
local id="$(echo "$line" | grep -oE "mode [0-9]*" | cut -d" " -f2)"
Can runcommand just take my word for the video mode? I tried to set
hdmi_group
andhdmi_mode
in/boot/config.txt
, and I also tried to set the default video mode for fuse-48k in the runcommand launcher. Neither had any effect and runcommand keeps considering every video mode.Obviously the RPi 1 isn't stellar hardware, so this is a minor nag. But if it saves a few seconds now and then to many people... it might add up!
Cheers,
Catalin - Running
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.