RetroPie doesn't load games on manual installation in Raspberry Pi OS bookworm 64 bit
-
Hi everyone,
I'm recently compiled RetroPie 4.8.9 in my raspberry pi zero 2 w for retro gaming in emulators like snes or megadrive. I have Raspberry Pi OS bookworm 64 bit and a HyperPixel 4.0 Square display (with 1:1 aspect ratio and 720x720 resolution) pluged through the headers.
Emulationstation open well and recognize my roms, but UI sometimes freezes up forcing me to hard reset my raspberry pi (unplugging and plugging the power supply again).
When the rom try to load, a few seconds pass and then return to the emulationstation menu.
I've tried to run the rom manually with next command:
/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ snes /home/pi/RetroPie/roms/snes/my-rom.sfc
and enabling debugging mode I can see this errors:
[ERROR] [KMS]: Error when switching mode. [ERROR] [Video]: Cannot open threaded video driver.. Exiting.. [ERROR] Fatal error received in: "video_driver_init_internal()"
What can I do to solve this missbehavior?
This is my
/boot/firmware/config.txt
file:dtparam=i2c_arm=off dtparam=audio=on camera_auto_detect=1 display_auto_detect=1 auto_initramfs=1 dtoverlay=vc4-kms-v3d max_framebuffers=2 disable_fw_kms_setup=1 arm_64bit=1 disable_overscan=1 arm_boost=1 [cm4] otg_mode=1 [cm5] dtoverlay=dwc2,dr_mode=host [all] dtoverlay=vc4-kms-dpi-hyperpixel4sq
Any help is welcome, thank you very much!
-
Please provide the entire verbose log (on pastebin.com) from a failed launch and also the output of
kmsprint -m
.Any reason you're not using the RetroPie pre-image from the downloads section instead of the Bookworm installation ? The product page says Hyperpixel 4.0 Square is not yet fully compatible with recent versions of Raspberry Pi OS,..., so it may be working better with an older RaspiOS version (such as the one on which the RetroPie image is based).
-
Hi @mitu, thank you so much for the fastest response.
The display works well, if I run retroarch manually, games are running ok. So maybe the problem is runcommand instead.
I'm working in a personal project, I need to compile retropie in my own debian installation.
Here are the full log and output text of kmsprint command:
runcommand.log
Parameters: Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-snes9x/snes9x_libretro.so --config /opt/retropie/configs/snes/retroarch.cfg "/home/pi/RetroPie/roms/snes/Super Mario World (USA).sfc" --verbose --appendconfig /dev/shm/retroarch.cfg [WARN] [GameMode]: GameMode cannot be enabled on this system ("dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory.") https://github.com/FeralInteractive/gamemode needs to be installed. [WARN] [Config]: GameMode unsupported - disabling.. [INFO] RetroArch 1.19.1 (Git e948222) [INFO] === Build ======================================= [INFO] Capabilities: ASIMD [INFO] Version: 1.19.1 [INFO] Git: e948222 [INFO] Built: Sep 5 2025 [INFO] ================================================= [INFO] [Input]: Found input driver: "x". [ERROR] Couldn't find any cloud sync driver named "" [INFO] Available cloud sync drivers are: [INFO] webdav [INFO] null [WARN] Going to default to first cloud sync driver... [INFO] [Core]: Loading dynamic libretro core from: "/opt/retropie/libretrocores/lr-snes9x/snes9x_libretro.so" [INFO] [Config]: Loading config: "/opt/retropie/configs/snes/retroarch.cfg". [INFO] [Config]: Appending config: "/dev/shm/retroarch.cfg". [INFO] [Overrides]: Redirecting save file to "/home/pi/RetroPie/roms/snes/Super Mario World (USA).srm". [INFO] [Overrides]: Redirecting save state to "/home/pi/RetroPie/roms/snes/Super Mario World (USA).state". [INFO] [Environ]: GET_CORE_OPTIONS_VERSION. [INFO] [Environ]: GET_LANGUAGE: "30". [INFO] [Environ]: RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL. [INFO] [Environ]: SET_CONTROLLER_INFO. [INFO] [Environ]: GET_LOG_INTERFACE. [INFO] [Environ]: SYSTEM_DIRECTORY: "/home/pi/RetroPie/BIOS". [INFO] [Environ]: SAVE_DIRECTORY: "/home/pi/RetroPie/roms/snes/". [INFO] [Environ]: SET_SUPPORT_ACHIEVEMENTS: yes. [INFO] [Environ]: PERFORMANCE_LEVEL: 12. [INFO] [Content]: Loading content file: "/home/pi/RetroPie/roms/snes/Super Mario World (USA).sfc". [INFO] [Environ]: SET_INPUT_DESCRIPTORS: [libretro INFO] "SUPER MARIOWORLD" (NTSC) version 1.0 ROM+RAM+BAT: LoROM: 4 Mbit, SRAM: 16 Kbit ID: ____, CRC32: b19ed489, Checksum OK [INFO] [Environ]: SET_PIXEL_FORMAT: RGB565. [INFO] [SRAM]: Skipping SRAM load. [INFO] [Core]: Version of libretro API: 1, Compiled against API: 1 [INFO] [Core]: Geometry: 256x224, Aspect: 1.333, FPS: 60.10, Sample rate: 32040.00 Hz. [INFO] [Audio]: Set audio input rate to: 31987.32 Hz. [INFO] [Video]: Set video size to: 720x720. [INFO] [Video]: Starting threaded video driver.. [INFO] [DRM]: Found 2 connectors. [INFO] [DRM]: Connector 0 connected: no [INFO] [DRM]: Connector 0 has 0 modes. [INFO] [DRM]: Connector 1 connected: yes [INFO] [DRM]: Connector 1 has 1 modes. [INFO] [DRM]: Connector 1 assigned to monitor index: #1. [INFO] [DRM]: Mode 0: (720x720) 720 x 720, 60.000000 Hz [INFO] [GL]: Found GL context: "kms". [INFO] [GL]: Detecting screen resolution: 720x720. [INFO] [EGL] Found EGL client version >= 1.5, trying eglGetPlatformDisplay [INFO] [EGL]: EGL version: 1.4 [INFO] [EGL]: Current context: 0x7f68015770. [INFO] [KMS]: New FB: 720x720 (stride: 2944). [ERROR] [KMS]: Error when switching mode. [ERROR] [Video]: Cannot open threaded video driver.. Exiting.. [ERROR] Fatal error received in: "video_driver_init_internal()" [INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds. [INFO] [Core]: Unloading game.. [INFO] [Core]: Unloading core.. [INFO] [Core]: Unloading core symbols.. [INFO] [Core]: Saved core options file to "/opt/retropie/configs/all/retroarch-core-options.cfg". [INFO] Threaded video stats: Frames pushed: 0, Frames dropped: 0. Map_LoROMMap
$ kmsprint -m Connector 1 (42) DPI-1 (connected) 0 720x720@60.00 36.720 720/20/20/40/- 720/15/15/15/+ 60 (60.00) P|D
Can be libgamemode.so the problem?
-
@libredeb said in RetroPie doesn't load games on manual installation in Raspberry Pi OS bookworm 64 bit:
Here are the full log and output text of kmsprint command:
Please use pastebin.com for large text logs, as I asked in my post. Can you also post the contents of the
/dev/shm/retroarch.cfg
file ? -
@mitu yes, sorry for forget to use pastebin. The output of
/dev/shm/retroarch.cfg
is:$ cat /dev/shm/retroarch.cfg video_refresh_rate = "60.00" video_fullscreen = "true" video_fullscreen_x = "720" video_fullscreen_y = "720" libretro_directory = "/opt/retropie/libretrocores/lr-snes9x"
The freez up issues I was able to solve disabling transition effects and compiling retropie-emulationstation manually (without Retropie-Setup script) following the instructions in
README.md
file. -
The error in the logs is from RetroArch (erronously) trying to change the video mode according to
video_fullscreen_x = "720"
andvideo_fullscreen_y = "720"
options in theretroarch.cfg
file.Add a user script to clear the
video_
options from the file in/opt/retropie/configs/all/runcommand-onlaunch.sh
with the contents:#!/usr/bin/env bash sed -i '/fullscreen_[xy]/d;' /dev/shm/retroarch.cfg
Since your display has only 1 video mode, there's no need for specifying the video mode anymore.
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.