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

Thanks mcobit. I did a fresh install as I wound up having the same issue with the usb cable connected. Whatever I did put the wired controller in the same situation… able to navigate emulationstation, but became unresponsive after loading a game… even after a reboot. One thing I’m not sure of… if I paired the controller in osmc itself, why does emulationstation want to download a bunch more bluetooth files to be able to pair it in emulationstation? Should I bypass the pairing in osmc and just use emulationstation’s pairing? It even shows my controller as already paired if I select to see paired devices, but still wants to install a bunch more files. I did come across something saying I shouldn’t have done a ‘sudo upgrade’ in osmc, and should just use ‘sudo dist-upgrade’ instead. I’ll start fresh once again. :stuck_out_tongue:

Something I forgot to mention… the controller setup screen said it detected 2 controllers, although I only have the one ps4 controller. I thought at the time that it was detecting my keyboard as the second controller, but that’s not the case… with no ds4rdrv, it doesn’t detect any controllers. Maybe it had something to do with setting up the controller as wired, then going back and trying to set it up as wireless. The ‘not configured’ error I was getting when entering a game, was followed by the “Sony wireless controller on port #…” message. It shouldn’t have made a difference, but that’s the only thing I can think of. I’m about to try this again… this time I’ll bypass the wired setup, and just do a wireless setup.

I opened my own thread on this…

I’ve edited the retropie_watchdog.sh script to kill PS when emulationstation launches and start PS when ES exits.
Works great, no need to open a terminal anymore.

2 Likes

great news etienne, can you post your script what you changed thanks :slight_smile:

for those who have installed bluetooth steaming ([Deprecated] [TESTING] Bluetooth audio streaming (A2DP)).
Here’s a “not very pretty” workaround.
FYI, i’m not using PulseAudio for anything else than Ad2p audio streaming.

First i made sure that PA doesn’t auto spawn once it’s killed

sudo nano $HOME/.config/pulse/client.conf

On my install of OSMC this file did not exist, so i simply added

autospawn = no

Then we want to kill PS when emulationstation is launched and restart PS (so bluetooth streaming works again) when emulationstation exits.
Side note: with this workaround. bluetooth audio does not work in ES, just in kodi.

This can be done many ways. One easy way is to modify the retropie_watchdog.sh script
For my personal pleasure i followed mcobit’s strategy and used a variable PULSEAUDIO=1 to easily enable/disable the fix (this adds complexity but only slightly):

sudo nano $HOME/osmc/RetroPie/scripts/retropie_watchdog.sh

To kill PS,add the following lines right after “. /home/osmc/RetroPie/scripts/retrosmc-config.cfg”:

if [ “$PULSEAUDIO” = 1 ]; then
sudo killall -9 pulseaudio
fi

To start PS when ES exits, right after the commented line “#restart kodi”, add:

if [ “$PULSEAUDIO” = 1 ]; then
sudo pulseaudio -D --system
fi

Save the file

Lastly, edit the retrosmc config file:

sudo nano $HOME/osmc/RetroPie/scripts/retrosmc-config.cfg

and add :

PULSEAUDIO=1

Save the file, That should do it.
To disable the fix, just change the variable PULSEAUDIO=0 in the config file

One little warning: it seems like the watchdog script gets overwritten when you update Retrosmc.
Last note: Since i’m not using PS for anything else, i did not bother changing back autospawn to yes

Hope this helps

1 Like

I’ll add that to my script if it is ok for you.

Of course. I’m happy if this helps others.

Maybe leaving autospawn at “no” can bother other users. In the script, you could create and delete client.conf everytime ES is started and exited.
Just a thought

Thanks

I’m sorry but i install retrosmc a long time ago and now when i go to update they tell me i have an old raspbian wheezy
Can i update normal through retropie-setup ???

You can try to. But it is better to keep updates relatively frequent to not run into incompatibilities.

Wheezy sound like if you have the old chroot version installed.
In this case, uninstall it from the old install-retrosmc.sh script and then update to the new one and install it.

I install a fresh copy of OSMC, and when install retrosmc, install retropie 4.0.6, after install addon launcher, go to kodi and launch retropie and … returns to kodi and i can not start retropie … ¿??

What can i do ¿??

I uninstall and instal a few times and now its working, i don´t understand but… its working again :slight_smile:

It might be a problem with your internet connection. Could be that the installer doesn’t finish properly if the connection gets cut during installation.

Hi, thanks for the great script.
two questions.

  1. for update can i use the “retropie-setup.sh” and hit “Update All Installed Packages” or will this mess up my osmc install? (also in the second option can i say Yes to kernel update?)

  2. for error/debug log is everything in /home/osmc/.emulationstation/es_log.txt or anywhere else more detail log?

thanks

You can update from the retropie-setup script. This should not be a problem.

Do NOT upgrade the kernel via retropie!
The kernel will be updated via osmc’s update functionality.

The es logfile is not the only one.
There should also be a runcommand.out (or similar) file located in /tmp you can refer to with errors with certain emulators.

1 Like

thanks. might want to add the update info to the FAQ.
Also for debug this helped me.
Run: emulationstation -debug
reproduce the issue and see the error in the terminal
for me it was a non ascii char in a ROM name (720?.nes)

Error was:
Font::readUnicodeChar(const string&, std:size_t&): Assertation ‘(c & 0xC0) != 0x80’ failed

see also here. http://blog.petrockblock.com/community/members/dayfather/forums/replies/

That is not really a problem with my scripts :wink:

But good to know.

i am having issue with sound. 0 sound in ES, NO pulseaudio
I uninstalled today, and reinstalled, last commit was 18 hours ago, updated script.
any idea?
I have rpi2, latest update for osmc, sound was working in the past, but seems after latest update, i am having 0 luck.
osmc@osmc:~$ head -4 ~/.emulationstation/es_log.txt
lvl2: EmulationStation - v2.0.1a, built Oct 22 2016 - 21:35:15
lvl2: Creating surface…
lvl2: Created window successfully.
lvl2: Added known joystick Logitech Logitech Cordless RumblePad 2 (instance ID: 0, device index: 0)
osmc@osmc:~$ cat ~/.emulationstation/es_log.txt | grep sound
lvl2: req sound [basic.launch]
osmc@osmc:~$ sudo apt-get remove --purge pulseaudio
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package ‘pulseaudio’ is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
osmc@osmc:~$

Is alsamixer installed and volume turned up?
Are you using analogbor hdmi audio?

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.