RetroELEC Kodi+Wayland+Emulationstation+RetroArch (x86/XU4/RPi)

  • Seems to be because I've been playing with different upstream releases of Kodi in my tree. I've dropped that commit and rebased my tree. Do a "git fetch origin && git reset --hard origin/emu" and then rebuild. If you don't wanna rebuild everything do a "touch build*/.stamps/*/* before building. I'll put up new images soon.

    EDIT: New images uploaded for both Generic/RPi, tested working.

    EDIT2: I've added the dosbox fork from http://github.com/duganchen to the latest builds. It has SDL2 and mt32 support among other things. Included in RPi2/Generic image, run like this: "systemctl stop kodi && SDL_AUDIODRIVER=alsa dosbox -fullscreen && systemctl stop kodi"

    Edited once, last by escalade (June 30, 2016 at 8:42 PM).

  • Hi Escalade,

    First of all let me congratulate you on this build, and indeed everyone at Libreelec, I've just made the switch from OpenElec and loving it.

    However, I get absolutely no audio via HDMI out from within Emulation Station or RetroArch, I get an @alsa error. Can anyone point me in the right direction for getting HDMI (digital) audio out? my AVR says "Analog" with no output. Audio is fine within Kodi itself.

    Thanks in advance :)

  • As the Pi automatically chooses HDMI audio with ALSA, I can only assume you are using the Generic build? In that case you need a /storage/.config/asound.conf. I've provided an asound.conf.sample (also in /storage/.config) for you that you can use as a template.

  • I was setting up a LibreElec HTPC just a few days ago and was using the Millhouse builds until now.
    I updated to your build and the links to RetroArch and EmuStation appeared on the main menu. Emu station is able to start and show me its menu, with a few games I added choseable, but the games "start" with only a black screen and return to the UI just seconds after. If I try to launch RetroArch the same happened. Blackscreen and back to Kodi Interface.
    Using the Generic build and the \\HTPC\Configfiles\retroarch\cores folder is empty.
    Am I missing some additional setup?


  • As the Pi automatically chooses HDMI audio with ALSA, I can only assume you are using the Generic build? In that case you need a /storage/.config/asound.conf. I've provided an asound.conf.sample (also in /storage/.config) for you that you can use as a template.

    Awesome, I will give this a try later. BRILLIANT work by the way.


  • The cores are under /usr/lib/libretro, not in /storage. Check /tmp/retroarch.log (as mentioned on first page) for hints on what went wrong.

    I tried to launch RetroArch from the mainmenu to the blackscreen and back to the mainmenu:
    # pastebinit /tmp/retroarch.log
    SQgE

    I started ES, loaded all thread titles to the blackscreens and closed it:
    # pastebinit /tmp/emulationstation.log
    BUJI

    Both messages doesn't seem to give me much info. But I just started with linux, so someone with more knowledge probably can help or ask for more info.

    Edit:I decided to completely reinstall LE and use your build as a base, since LE Beta -> Millhouse -> your build could create problems. Still same result.
    So I decided to create a debug log and poste it here:
    HJQB

    I also checked the Configfiles\emulationstation\es_log.txt
    es_log.txt - Pastebin.com

    Edited once, last by MasterPhW (July 6, 2016 at 11:23 PM).

  • Looks like RetroArch crashes for some reason. Although I don't have an AMD GPU to test on I can't think of a reason why it wouldn't work. What you can do is use SSH and try to start it manually with verbose logging like this:

    Code
    # systemctl stop kodi
    
    
    # retroarch -v

    From your emulationstation log it seems like you haven't configured ALSA either, look at my comment above about asound.conf. You should use "hdmi:CARD=HDMI,DEV=0". I'd be surprised if that is the cause of the crash, but you might as well configure it if you want sound in ALSA applications.

  • Ok, I see what the problem is. If you do a "chvt 2" before running the retroarch command through SSH it should work. Retroarch tries KMS context first, and crashes if the VT is occupied by X. My script does this automatically for Intel, but the logic doesn't apply to AMD or other GPU's. I'll think about how to solve this to work in most cases.

  • Sorry, as I told you, still a linux noob.I closed kodi (just to be sure) and tried to launch retroarch with

    Code
    [s]# chvt 2 retroarch[/s]


    and got the following message:

    Code
    [s]BusyBox v1.24.2 (2016-06-29 22:38:07 CEST) multi-call binary.
    
    
    Usage: chvt N
    
    
    Change the foreground virtual terminal to /dev/ttyN[/s]

    Sometimes I really wonder, how I finished university with a master degree!
    I totally misread it. If I first use chvt 2 and then retroarch it of course works! Sorry for the confusion. So it seems, you were right. Retroarch is starting now.
    Also games are starting.
    Still without sound, even though I moved the asound.conf.sample to asound.conf, renamed it and changed it to default "hdmi:CARD=HDMI,DEV=0" like aplay -L also showed me.

    Edited once, last by MasterPhW (July 7, 2016 at 6:34 PM).

  • Haha, well I fully understand it's confusing if you're new to the Linux CLI :)

    Not sure what's up with the sound, it should work. Are there any other hdmi devices in aplay -L? On my NUC there is DEV=0 and DEV=1.

  • Congratulations on your work!

    I'm trying your RPi's image.
    Is "transmission" installed in this image? (As daemon, or addon)
    If there is transmission in it, how i can to set up?

    (Sorry for my awful english)

    Enviado desde mi MX_Base mediante Tapatalk


  • Haha, well I fully understand it's confusing if you're new to the Linux CLI

    Not sure what's up with the sound, it should work. Are there any other hdmi devices in aplay -L? On my NUC there is DEV=0 and DEV=1.

    It shows way more, but with my limited knowledge, it should be the right one:


    I should probably just deactivate the onboard Sound card via UEFI.

    Found a way to let me start retroarch within Kodi without putty?

    I also have a problem with

    Quote


    Notes on Emulationstation setup:
    Gamelists are disabled, if you want to use scraping run this command in CLI: "touch /storage/.config/emulation/es_gamelist". Out of the box it will look for roms in /storage/roms/(amiga|c64|mame|fba|gba|dreamcast|n64|psx|psp|saturn|snes|nes|nds). BIOS files under /storage/roms/bios. Configured input controllers are DS3/DS4 (bluetooth) and keyboard.


    First: I don't have .config/emulation/ I just have .config/emulationstation and if I enter

    Code
    touch /storage/.config/emulationstation/es_gamelist


    Nothing happens. I even created two files myself. one es_gamelist.cfg and one without the cfg. Both empty. Nothing happens.

    Sorry for all these probably dumb questions.

  • HI Escalade

    i have followed you from OE,,, looks like LE is a much friendlier place ;)

    i dont want to hi jack your thread for your new build but have you got a docker image with chrome for the rpi2/3 ?

    Cheers
    again fantastic build !!!!

  • gark81

    Not currently, I might include it later. Docker is included though, which enables you to run it in a container.

    MasterPhW

    Yeah, the audio device is correct then. Should be no need to disable the onboard, but can't hurt to try. I'll be making a new build soon that will fix your retroarch issue.

    I've changed the method to enable scraping but apparently forgot to update the text. Edit /storage/.config/emulationstation/emulationstation.conf and remove --ignore-gamelist.


  • MasterPhW

    Yeah, the audio device is correct then. Should be no need to disable the onboard, but can't hurt to try. I'll be making a new build soon that will fix your retroarch issue.

    I've changed the method to enable scraping but apparently forgot to update the text. Edit /storage/.config/emulationstation/emulationstation.conf and remove --ignore-gamelist.

    Thanks for the quick answer again! /storage/.config/emulationstation/emulationstation.conf is now looking like

    Code
    EMULATIONSTATION_OPTS=""


    and still, the scraping will not be saved.
    It works and will be shown after scraping, but after a restart, it's gone again.

    Any way to let me fix my problem into the skin files myself till you release a new build?
    I need to start my other PC everytime to just test a few things to get into putty. ^^

    Btw: I found a thing related to my missing sound in retroarch: in its Sound settings my soundcard is still empty.
    Also when I start it via putty the following message appears:

    Code
    ALSA lib /home/trondah/LibreELEC.tv/build.LibreELEC-Generic.x86_64-8.0-devel/alsa-lib-1.1.1/src/pcm/pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM ALSA
    ALSA lib /home/trondah/LibreELEC.tv/build.LibreELEC-Generic.x86_64-8.0-devel/alsa-lib-1.1.1/src/pcm/pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM ALSA


    Is it related to my missing sound?

    Edited once, last by MasterPhW (July 10, 2016 at 11:48 AM).

  • Scrapes and saves correctly here. Are you quitting through the menu?

    New builds have been uploaded, should fix the RetroArch issue. As for your ALSA issue, the "audio device" box in RetroArch is empty for me as well, it's normal. Perhaps you messed up asound.conf somehow? You did rename asound.conf.sample to asound.conf right? When done correctly, the command "speaker-test" should output some static noise (stop kodi first).