RetroPie EmulationStation: Games won't launch when started via systemd service - TTY/Terminal access required
-
Hey guys,
I'm encountering an issue with EmulationStation running through a systemd service on my Raspberry Pi 5. on bookworm. I understand this is not yet supported, but just thought maybe someone was doing the same thing and had a solution.
WHAT WORKS:
- EmulationStation launches and displays properly when started manually via SSH
- Games launch correctly when started manually
- Running runcommand.sh directly from terminal works fine
WHAT DOESN'T WORK:
- Games won't launch when EmulationStation is started via systemd service
- runcommand.sh seems to require TTY access which isn't available
TECHNICAL DETAILS:
- Running EmulationStation through a systemd service
- Environment variables are set correctly (DISPLAY, XAUTHORITY, XDG_RUNTIME_DIR)
- EmulationStation logs show it's starting properly
- When attempting to launch a game, runcommand.sh fails silently
I've confirmed this is a terminal/TTY access issue as the same setup works perfectly when run manually with TTY access. The core problem seems to be that runcommand.sh requires an interactive terminal, but when launched through a systemd service, this isn't available.
Has anyone encountered this before or found a way to launch games properly when EmulationStation is started via a service? Any suggestions for handling TTY access in this context would be appreciated.
- EmulationStation v2.11.2rp
-
I understand this is not yet supported, ...
I'd say that launching via
systemd
is also not a supported configuration, as you have already discovered. -
Has anyone encountered this before or found a way to launch games properly when EmulationStation is started via a service? Any suggestions for handling TTY access in this context would be appreciated.
I had the same issue. No systemd option...
My solution was to write a script to launch via Desktop's Autostart; open a terminal at full screen, force 720p (I need that to prevent crashing), and launch emulationstation.
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.