I restarted my Raspberry Pi recently and lost my HifiBerry sound output.
I checked system settings and observed that the output device was not available, instead only Analog, HDMI, analog + HDMI were available.
I edited /usr/bin/mediacenter to start kodi as root instead of as osmc. This fixed the problem as the hifiberry output device is now available and working.
The exact change is:
sudo -u osmc $KODI --standalone -fs --lircdev /var/run/lirc/lircd; CODE="$?"
altered to
sudo -u root $KODI --standalone -fs --lircdev /var/run/lirc/lircd; CODE="$?"
I am sure a better solution is possible since what I’ve done is merely a workaround.
I hope you can help me fix the issue and possibly help others with the same problem.
Standard /usr/bin/mediacenter which runs kodi as osmc
1.1) I deleted /home/osmc/.kodi folder
1.2) I started kodi with “sudo service mediacenter start”
1.3) I enabled logging
1.4) I stopped kodi with “sudo service mediacenter start”
1.5) I deleted temp logs by “rm -R /home/osmc/.kodi/temp”
1.6) I started kodi with “sudo service mediacenter start”
1.7) I navigated to system audio settings and could not find my hifiberry card
1.8) I uploaded logs with OSMC app, https://paste.osmc.tv/roqikopupe
Non-standard /usr/bin/mediacenter which runs kodi as root
2.1) I deleted /root/.kodi folder
2.2) I started kodi with “sudo service mediacenter start”
2.3) I enabled logging
2.4) I stopped kodi with “sudo service mediacenter start”
2.5) I deleted temp logs by “rm -R /root/.kodi/temp”
2.6) I started kodi with “sudo service mediacenter start”
2.7) I navigated to system audio settings and did find my hifiberry card
2.8) I uploaded logs with OSMC app, https://paste.osmc.tv/axicunureb
Not sure what this is about. But under OSMC the Hifiberry works out of the box after it is configured in MyOSMC. And that also has not changed after the change to Stretch.
HifiBerry certainly works. I can use it for Kodi just fine - the only problem is that I have to run Kodi as root. Hence the HifiBerry device is functioning correctly.
I do not know why Kodi would not list HifiBerry as an audio output device when Kodi is run as osmc user. That’s what I am trying to figure out and resolve in this thread :-). I have presented logs but it doesn’t seem that these are useful?
I am not sure how I can help move this issue further.