You are not logged in.

#1 2015-02-11 18:34:05

ost
Member
Registered: 2014-09-19
Posts: 3

Start SDL2 programs from console (emulationstation for Arcade Cabinet)

Hello,
I'm trying to start EmulationStation from the console without using X11.
Retroarch works great without X but i need a frontend for my arcade cabinet powered by Arch.

I've removed the regular sdl2 package and installed the sdl2-opengles package from AUR.
This package has in fact the following configure flags:

../SDL2-$pkgver/configure --prefix=/usr \
    --enable-sdl-dlopen \
    --disable-arts --disable-esd --disable-nas \
    --enable-alsa \
    --disable-pulseaudio \
    --disable-video-wayland \
    --without-x --disable-video-x11 --disable-x11-shared \
    --disable-video-x11-xcursor --disable-video-x11-xinerama \
    --disable-video-x11-xinput --disable-video-x11-xrandr \
    --disable-video-x11-scrnsaver --disable-video-x11-xshape \
    --disable-video-x11-vm --disable-video-opengl \
    --disable-video-directfb --enable-video-opengles \
    --disable-rpath

So it should compile for using the opengles driver and doesn't need Xorg. I've also removed from PKGBUILD the dependency of 'raspberrypi-firmware' because there isn't in AUR.

But when i try to start emulationstation it gives the error:

lvl0: 	Error initializing SDL!
	No available video device
lvl0: 	Renderer failed to initialize!
lvl0: 	Window failed to initialize!

How can i resolve the issue? Can anyone execute a sdl2 program from the console?

Thank you very much.

EDIT:
I want to make it work on x86 architecture, not ARM like Raspberry Pi where it works fine with SDL2 compiled ad-hoc.

Last edited by ost (2015-05-05 07:29:42)

Offline

#2 2015-04-27 01:12:41

branchred
Member
Registered: 2015-04-27
Posts: 1

Re: Start SDL2 programs from console (emulationstation for Arcade Cabinet)

Were you able to find a solution to this issue?

I've been successful in having emulationstation run on a raspberry PI using Arch Linux ARM, but have not been able to get emulationstation to start on an Arch x86_64 box.

I've tried to use the the default sdl2 package, the AUR sdl2-opengles package, a variety of custom packages with various sdl2 configure options but am still getting the same error as you. Retroarch works perfectly as you mentioned but I have not been able to get emulationstation working from terminal.

Offline

#3 2015-04-27 08:55:47

ost
Member
Registered: 2014-09-19
Posts: 3

Re: Start SDL2 programs from console (emulationstation for Arcade Cabinet)

Unfortunately no, I haven't found a solution.
I've tried some alternatives to emulationstation like Cabrio, but it runs on sdl 1.2 and so it will never run on kms as far as i know.

I was also thinking about write a very simple ultra-minimal graphic command launcher by myself to run in KMS, but i don't even know where to start.
Or i can learn how to write a menu gui for Retroarch, like the lakka menu. But again, i haven't found a tutorial or something on how to get started with (i'm not capable of figuring out from the source code of lakka or similars)

So.. i re-bump this thread. Has somebody found a solution or a valid alternative for the described situation?

Offline

#4 2015-05-04 21:51:32

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: Start SDL2 programs from console (emulationstation for Arcade Cabinet)

You have to use SDL2 with OpenGL ES support from AUR, and add the option "--host=arm-raspberry-linux-gnueabihf" to the "./configure" command in the PKGBUILD. When sdl2-opengles-2.0.3-1-armv7h.pkg.tar.xz is built and installed, EmulationStation will launch just fine.

See this article for more info.

Kudos to erwan35 for finding the solution.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#5 2015-05-05 07:46:59

ost
Member
Registered: 2014-09-19
Posts: 3

Re: Start SDL2 programs from console (emulationstation for Arcade Cabinet)

Hi, thanks for the reply,
unfortunately, i haven't specified that i need to make it work on x86 architecture, not the Raspberry Pi.

In fact it works like a charm on RPI and there's the great distro RetroPie for projects like mine.

I've edited the original post to make i clear.


I've tried to recompile SDL2 with directfb support and disabling x support, and then changed the sdl2 video driver with:

export SDL_VIDEODRIVER=directfb && emulationstation

but it hangs up without output.
It not freezes, because if i turn off the system there's the output of logging out and stopping the services.

So, questions:
as in the article, if i compile SDL2 with those parameters on configure disabling everything except "enable-video-opengles", do I have to specify a SDL_VIDEODRIVER on what value?
I presume i must avoid the "--host=arm-raspberry-linux-gnueabihf".

I've recently started playing with lakka.tv and it works great but i don't like the ps3-style menu. It's also binded on execute libretro-cores, which is a bit limitative. Also is still young on configuration, but you can switch to rgui menu for setting everything up.

Offline

#6 2015-05-30 20:54:44

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: Start SDL2 programs from console (emulationstation for Arcade Cabinet)

Simply compiling SDL with GLES is not enough to be free of X. You still need a windowing system. On the RPi, dispmanx will provide the windowing system. However, dismpanx is specific to the RPi VideoCore GPU.

On x86 architectures, the non-X windowing systems are Wayland, directfb, or drawing things directly to the framebuffer through fbdev. The SDL directfb backend hasn't seen work in a long time, it might still work with SDL1, but it definitely won't with SDL2. I don't know what the state of the SDL fbdev backend is, but even if it works, in might not cover the needs of a specific application - windowing systems don't handle just graphics but also input.

BTW, why exactly are you trying to do without X? It's still the de-facto Linux windowing system, it's the most supported and optimized one and will therefore provide the best performance (on x86 at least, the RPi is different). Wayland should change this at some point, however Wayland is still very fresh, not yet mature enough.

Last edited by Gusar (2015-05-30 20:56:20)

Offline

Board footer

Powered by FluxBB