Run Redream PCSX2 and other stuff without having an x server
-
Hello there,
I've been using Retropie on a Raspberry PI 4 for something like 3 years now, and I'm loving it, actually that much that I bought some mini PC hardware based on Intel x64 to run more demanding emulators, like Saturn, PS2 and GameCube.
Eveything's going nice until now, I installed Ubuntu 23.04 server and then Retropie right after this, I had some tweaking to do to make it work all together and now it's pretty solid on Retroarch, I think I just miss one feature to run standalone emulators like Reicanst or PCSX2 without an x server (I'd like not to have a desktop installed on this device, that boots straight up to emulationstation just like the RPI4 image).
When I try to launch Redream or PCSX2 (did not try other standalone amulators yet), I get back immediatly to the emulationstation screen. Here are the logs I could grab from runccommand...
Redream :
[INFO] SDL redream v1.5.0-1051-g4ba6a39e7 appdir=/opt/retropie/emulators/redream [INFO] read /opt/retropie/emulators/redream/redream.cfg [WARN] failed to open /opt/retropie/emulators/redream/redream.cfg [ERROR] SDL [/builds/inolen/redream-private/src/host/host_sdl.c:2280] Check failed: res >= 0 [/builds/inolen/redream-private/src/host/host_sdl.c:2280] host_init sdl initialization failed: No available video device
Obviously the config file warning is normal, because Redream did never launch and did not have to opportunity to initiate it.
PCSX2 :
Parameters: Executing: pcsx2-qt -fullscreen -nogui "/home/speedy/RetroPie/roms/ps2/Tekken 5 (USA).iso" qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: vkkhrdisplay, xcb, offscreen, linuxfb, vnc, eglfs, minimal, minimalegl. /opt/retropie/supplementary/runcommand/runcommand.sh: line 1314: 24323 Aborted (core dumped) pcsx2-qt -fullscreen -nogui "/home/speedy/RetroPie/roms/ps2/Tekken 5 (USA).iso"
Without really knowing why, I tried to install DirectFB but the error messages were the same, maybe I'm missing some configuration for it, importing /etc/fb.modes from the RPI4 (that should moslty support the same modes) did not help.
-
The reason I'm asking here is because in the Retropie RPI4 pre-built image, there is no xorg server, but Redream does work out of the box.
So the basic question would be, what library/tool did you use to make it work ?
Maybe if I know what techno made it possible, I could make it work by myself.Cheers
-
@Gérard said in Run Redream PCSX2 and other stuff without having an x server:
So the basic question would be, what library/tool did you use to make it work ?
None, there's no 'secret sauce' involved. Programs that support running without a desktop environment (using pure DRM/KMS) will run without
xorg
/wayland
, others will explicitly need a windowing system to function.
Some application use SDL underneath to create their wnidow/rendering context. SDL, in turn, can include support for KMS/DRM as video/display driver or it may not have that support compiled. RetroPie's SDL includes support for KMS/DRM and emulators which use pure SDL can work without a desktop/windowing server - this includes EmulationStation, (Adv)MAME, openMSX, etc.-
Redream (not Reicast) comes pre-packages by the developer (@inolen) and we just download it and unpack-it. It seems to be using SDL on the RPI, but I'm not sure if it's statically linked or it's using the host (i.e. RetroPie's) SDL. Based on your error, the PC version of Redream may either include it's own SDL without KMS/DRM support of your system's SDL doesn't have the KMS/DRM video driver built in.
-
PCSX2 uses QT for it's display and even if QT applications can run without a windowing server (i.e. Pegasus, Duckstation), they might need explicit support in the program in order to do so. I'm not familiar with the PS2 emulator to know if it supports running like this, my guess is that it doesn't.
-
-
Thank you for this usefull information, well that's the kind of answer I was afraid of, I might try to see if my SDL does support KMS/DRM, or even rebuild it just to understand if I can make Redream to run, but in the end if I want everything to work (PCSX2 for instance), I would need a window server.
I might need to give up on my full emulationstation driven setup that felt elegant at first...Sorry for having mixed up Reicast and Redream...
-
@Gérard said in Run Redream PCSX2 and other stuff without having an x server:
I might need to give up on my full emulationstation driven setup that felt elegant at first...
You can still have that, even when using
xorg
or a desktop environment.- install a simple windows manager like
openbox
. - install a login manager (
lightdm
) and configure it to automatically login to your user with theopenbox
session. - use the RetroPie-Setup and configure EmulationStation to auto-start in the desktop session.
- install a simple windows manager like
-
Thanks for that advice, yeah I did install openbox, but not lightdm, I did already set up an autologon pre-x, so I just use xinit to start openbox, this works nice.
Now I just need to configure some things in openbox, for instance runcommand and retropie-setup scripts run in a very small window in the center of the screen (I have a 4K screen), I guess I need to force fullscreen for everything, set larger font un xterm and/or set higher dpi at the openbox level.
But Redream and PCSX2 run full screen so I'm almost done, I'll try to add more stuff like xemu, kodi and whatever I can now that there is an x server, this actually makes everything a lot easier... My mistake.
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.