[HowTo] RetroPie and OSMC: Retrosmc - Retrogaming on OSMC

Hi Alsamixer is installed, PCM = 100%
00-00: bcm2835 ALSA : bcm2835 ALSA : playback 8 │ 00-01: bcm2835 ALSA : bcm2835 IEC958/HDMI : playback 1
Advanced Linux Sound Architecture Driver Version k4.4.27-2-osmc.
using in OSMC the dual HDMI/analog output optioin.

Try only using hdmi or analog. Not both. Then reboot and try again.

You can also try to use the retropie menue in emulationstation to try different sound options.

HI again
So i did as you suggested, in OSMC i tried all options. Nothing was working

so i added this to the beginning of the ~/RetroPie/scripts/retropie.sh
amixer cset numid=3 2

This forces the audio out to the HDMI, and viola, sound works now.

When I end the emulation station and go back to OSMC, audio is still working via both HDMi and Analog.

Thanks for pointing me in the right direction.

Ok. That’s strange though as something had to be changing the default values.
Good to have a fix for those occasions though :slight_smile:

Hi mcobit, have you maybe implemented etienne’s solution into your script already?

Nope. Sorry. But thanks for the reminder.
I would also accept pull-requests :wink:

Hi.
I have latest OSMC install with the latest retrosmc package. the emu station works with NES and SNES games.
however i cannot hear any audio.
I receive the same pcm buffer underrrun error.
RPI2 is connected through HDMI. Both emustation and osmc are configured to output to HDMI.
i also tried to add the entry in the retropie script as noted above (alsamixer set numid=3 2 )

Not sure if unrelated or not, but I noticed through “top” that while i play a game the retroarch process is at around 100% CPU with pulseaudio at 98%. When only the emustation interface is shown, i have pulseaudio at 75% and emustation at 83%.

Any ideas?
thank you!
Francesco

Really?
This is answered a lot of times: retrosmc and pulseaudio do not work together.
Search this thread for advice.
Buffer underruns are no errors!
CPU will go lower without pa.

yes, you are right. I should have searched better.
I removed pulseaudio and now everything seems fine.
I believe pulseaudio was installed by the experimental package a2dp to try bluetooth audio.

thanks again!

You can keep pulseaudio installed if you want to use the Bluetooth streaming. Then follow this post for stopping pulseaudio during retropie then enable again when exit. Works great.

Brilliant guide, I put a pull request in on git hub with a change to help those behind firewall and proxies with the initial download and install of the emulator.

Out of interest, do you still have the menu item icon? the link leads to a dead page.

Thanks

Merged pr and fixed link to the image in first post. Thanks :slight_smile:

I did it. The emulation station doesn’t start and I get an infinite list of
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred

I’m on RPI3.

The underrun doesn’t really mean anything.

Is there something in the emulationstation logfile?

Thanks for the reply.
This is what I have in the log file:

lvl2: 	EmulationStation - v2.0.1a, built Oct 22 2016 - 21:35:15
lvl2: 	Creating surface...
lvl2: 	Created window successfully.
lvl2: 	Checking available OpenGL extensions...
lvl2: 	 ARB_texture_non_power_of_two: MISSING
lvl2: 	Loading system config file /etc/emulationstation/es_systems.cfg...
lvl1: 	  Unknown platform for system "ags" (platform "ags" from list "ags")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/ags/gamelist.xml"...
lvl1: 	System "ags" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/amiga/gamelist.xml"...
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/amstradcpc/gamelist.xml"...
lvl1: 	System "amstradcpc" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/apple2/gamelist.xml"...
lvl1: 	System "apple2" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/arcade/gamelist.xml"...
lvl1: 	System "arcade" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/atari2600/gamelist.xml"...
lvl1: 	System "atari2600" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/atari5200/gamelist.xml"...
lvl1: 	System "atari5200" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/atari7800/gamelist.xml"...
lvl1: 	System "atari7800" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/atari800/gamelist.xml"...
lvl1: 	System "atari800" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/atarilynx/gamelist.xml"...
lvl1: 	System "atarilynx" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/atarist/gamelist.xml"...
lvl1: 	System "atarist" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/c64/gamelist.xml"...
lvl1: 	System "c64" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "coco" (platform "coco" from list "coco")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/coco/gamelist.xml"...
lvl1: 	System "coco" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/coleco/gamelist.xml"...
lvl1: 	System "coleco" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "daphne" (platform "daphne" from list "daphne")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/daphne/gamelist.xml"...
lvl1: 	System "daphne" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "dragon32" (platform "dragon32" from list "dragon32")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/dragon32/gamelist.xml"...
lvl1: 	System "dragon32" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/dreamcast/gamelist.xml"...
lvl1: 	File ""/home/osmc/RetroPie/roms/dreamcast/systemManager.cdi"" does not exist! Ignoring.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/fba/gamelist.xml"...
lvl1: 	System "fba" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "fds" (platform "fds" from list "fds")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/fds/gamelist.xml"...
lvl1: 	System "fds" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "gameandwatch" (platform "gameandwatch" from list "gameandwatch")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/gameandwatch/gamelist.xml"...
lvl1: 	System "gameandwatch" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/gamegear/gamelist.xml"...
lvl1: 	System "gamegear" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/gb/gamelist.xml"...
lvl1: 	System "gb" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/gba/gamelist.xml"...
lvl1: 	System "gba" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/gbc/gamelist.xml"...
lvl1: 	System "gbc" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/intellivision/gamelist.xml"...
lvl1: 	System "intellivision" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "love" (platform "love" from list "love")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/love/gamelist.xml"...
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/macintosh/gamelist.xml"...
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/mame-advmame/gamelist.xml"...
lvl1: 	System "mame-advmame" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/mame-libretro/gamelist.xml"...
lvl1: 	System "mame-libretro" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/mame-mame4all/gamelist.xml"...
lvl1: 	System "mame-mame4all" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/mastersystem/gamelist.xml"...
lvl1: 	System "mastersystem" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/megadrive/gamelist.xml"...
lvl1: 	System "megadrive" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/msx/gamelist.xml"...
lvl1: 	System "msx" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/n64/gamelist.xml"...
lvl1: 	System "n64" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/neogeo/gamelist.xml"...
lvl1: 	System "neogeo" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/nes/gamelist.xml"...
lvl1: 	System "nes" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/ngp/gamelist.xml"...
lvl1: 	System "ngp" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/ngpc/gamelist.xml"...
lvl1: 	System "ngpc" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/pc/gamelist.xml"...
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/pcengine/gamelist.xml"...
lvl1: 	System "pcengine" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/ports/gamelist.xml"...
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/psp/gamelist.xml"...
lvl1: 	System "psp" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/psx/gamelist.xml"...
lvl1: 	System "psx" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/retropie/gamelist.xml"...
lvl1: 	  Unknown platform for system "samcoupe" (platform "samcoupe" from list "samcoupe")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/samcoupe/gamelist.xml"...
lvl1: 	System "samcoupe" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "scummvm" (platform "scummvm" from list "scummvm")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/scummvm/gamelist.xml"...
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/sega32x/gamelist.xml"...
lvl1: 	System "sega32x" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/segacd/gamelist.xml"...
lvl1: 	System "segacd" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "sg-1000" (platform "sg-1000" from list "sg-1000")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/sg-1000/gamelist.xml"...
lvl1: 	System "sg-1000" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/snes/gamelist.xml"...
lvl1: 	System "snes" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "stratagus" (platform "stratagus" from list "stratagus")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/stratagus/gamelist.xml"...
lvl1: 	System "stratagus" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "vectrex" (platform "vectrex" from list "vectrex")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/vectrex/gamelist.xml"...
lvl1: 	System "vectrex" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "videopac" (platform "videopac" from list "videopac")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/videopac/gamelist.xml"...
lvl1: 	System "videopac" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "virtualboy" (platform "virtualboy" from list "virtualboy")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/virtualboy/gamelist.xml"...
lvl1: 	System "virtualboy" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/wonderswan/gamelist.xml"...
lvl1: 	System "wonderswan" has no games! Ignoring it.
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/wonderswancolor/gamelist.xml"...
lvl1: 	System "wonderswancolor" has no games! Ignoring it.
lvl1: 	  Unknown platform for system "zmachine" (platform "zmachine" from list "zmachine")
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/zmachine/gamelist.xml"...
lvl2: 	Parsing XML file "/home/osmc/.emulationstation/gamelists/zxspectrum/gamelist.xml"...
lvl1: 	System "zxspectrum" has no games! Ignoring it.
lvl2: 	EmulationStation cleanly shutting down.

My problem is that I just have few game and few emulators. All the games are for MSDos and they don’t really start (they just start into the menu). Moreover sound is laggy and the gamepad only works outside the games.
Tell me if you need more info about the conf.

So emulationstation starts, but the games don’t or run sluggish, correct?

In this case I suggest to ask for support at the retropie forums then.
They can help you with emulator optimisation and compatibility.

A lot of dosgames might be really taxing for a pi with dosbox.

Thanks for the suggested fix. That indeed fixed the sound problem I originally had because I also use the bluetooth streaming addon. However I also have a hifiberry dacplus module attached to my pi. When I now start Emulationstation, the sound is still routed through the hifiberry. How do I reroute the sound through the HDMI Port of the pi? When using aplay -l while Emulationstation is running the rpi soundcard is not even displayed. In OSMC everything works as expected. Any suggestions?

I second this. I renamed ~/.kodi/addons/plugin.program.retropie-launcher/addon.py to .../addon.py-bak in order to create the menu item. I then renamed back to .../addon.py after the menu was created.

Good suggestion.

i unfortunately don’t have a hifiberry to test this out.
But from a quick search it seems you need to disable onboard sound for it to work.

Can you describe a little more your issue?
You’ve mentioned that the sound is "now"being routed to the hifiberry in ES. Do you mean that it wasn’t the case before killing PulseAudio? How about before you installed the a2dp addon, how was the sound routed?

Okay maybe that was not enough details.
In OSMC I configured the hifiberry and it is used to play music via bluetooth. However GUI sounds and video is played back via HDMI. So the behaviour using OSMC is just as I would expect. Strangely in OSMC the only ALSA device visible is the hifiberry, but as stated sound trough HDMI works anyway.

Now when I start Retropie all sound including that of Emulationstation itself is via the hifiberry only. It is irrelevant whether PulseAudio is running or not. But with PulseAudio sound during Emulation is bad. Using the Retropie sound config to switch to HDMI does not help as it is not displayed. Hence I have not found a way to enable any sound via HDMI while Retropie is running.

I would be glad to have a workaround, to solve this problem.