Kodi Community Forum

Full Version: Kodibuntu - Force boot into ALSA
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

So this has been my first exposure to building/configuring a linux system and you know what? It's been great. Absolutely hassle free and it's working almost perfectly. I've got Kodi, Syncthing, Plex & FLIRC all running in perfect harmony on Kodibuntu. In searching for my answer I've noticed that the consensus seems to be that Kodibuntu is dated and shouldn't be used. What can I say? It works almost perfectly for my needs. Except for one thing.

I couldn't get S/PDIF passthrough working with pulseaudio, so I uninstalled it and started using ALSA which works perfectly. Unfortunately Kodi in standalone won't boot with the ALSA drivers. I need to log out of the Kodi session, into LXDE then back into Kodi. This seems to initiate the drivers and away it goes.

Surely I can force Kodi to boot with the ALSA drivers. I've come across the maligned AE_SINK=ALSA means of booting Kodi but cannot wrap my head around how to apply this to a standalone setup like Kodibuntu. I'm hoping this is just a simple modification of a config file/script but I'm not sure where to go.

Any help appreciated

- forever noob
*not a linux guru*

can't you create a script that launches Kodi with the Alsa-sink?
General info for a kodi-launch script

Then your standalone boot would call the kodi-launch script and hey presto!
(right?)
Kodibuntu doesn't ship pulseaudio, it only uses ALSA!
There is nothing that needs to be loaded at boot for kodi to work with alsa, so you should pastebin a Debug Log
(2016-09-02, 17:25)wsnipex Wrote: [ -> ]Kodibuntu doesn't ship pulseaudio, it only uses ALSA!
There is nothing that needs to be loaded at boot for kodi to work with alsa, so you should pastebin a Debug Log

That flips everything on its head.

The original issue was that Kodi was not detecting my sound card (Xonar DG). The fix was to uninstall pulseaudio. You've mentioned that it doesn't ship with it but I'm almost certain that a package was uninstalled.
This resulted in Kodi only recognising my onboard (Realtek) sound.

Booting into Kodi, logging out, then into LXDE, out, then back into Kodi results in all outputs being recognised and S/PDIF passthrough working as expected.

I will gather some logs. Appreciate the insight.
So here's what I've gleaned from the logs. My soundcard isn't being detected without first booting into a desktop session.

21:47:06 T:140537640478656 NOTICE: special://profile/ is mapped to: special://masterprofile/
21:47:06 T:140537640478656 NOTICE: -----------------------------------------------------------------------
21:47:06 T:140537640478656 NOTICE: Starting Kodi (14.0 Git:ad747d9). Platform: Linux x86 64-bit
21:47:06 T:140537640478656 NOTICE: Using Release Kodi x64 build
21:47:06 T:140537640478656 NOTICE: Kodi compiled Dec 23 2014 by GCC 4.8.2 for Linux x86 64-bit version 3.13.11 (199947)
21:47:06 T:140537640478656 NOTICE: Running on Ubuntu 14.04.1 LTS, kernel: Linux x86 64-bit version 3.13.0-93-generic
21:47:06 T:140537640478656 NOTICE: FFmpeg statically linked, version: 2.4.4-xbmc-2.4.4-Helix
21:47:06 T:140537640478656 NOTICE: Host CPU: AMD FX™-4100 Quad-Core Processor, 4 cores available
21:47:06 T:140537640478656 NOTICE: special://xbmc/ is mapped to: /usr/share/kodi
21:47:06 T:140537640478656 NOTICE: special://xbmcbin/ is mapped to: /usr/lib/kodi
21:47:06 T:140537640478656 NOTICE: special://masterprofile/ is mapped to: /home/jez/.kodi/userdata
21:47:06 T:140537640478656 NOTICE: special://home/ is mapped to: /home/jez/.kodi
21:47:06 T:140537640478656 NOTICE: special://temp/ is mapped to: /home/jez/.kodi/temp
21:47:06 T:140537640478656 NOTICE: The executable running is: /usr/lib/kodi/kodi.bin
21:47:06 T:140537640478656 NOTICE: Local hostname: htpc
21:47:06 T:140537640478656 NOTICE: Log File is located: /home/jez/.kodi/temp/kodi.log
21:47:06 T:140537640478656 NOTICE: -----------------------------------------------------------------------
21:47:07 T:140537640478656 NOTICE: load settings...
21:47:07 T:140537640478656 ERROR: PulseAudio: Failed to connect context
21:47:07 T:140537640478656 NOTICE: PulseAudio might not be running. Context was not created.
21:47:07 T:140537640478656 NOTICE: Found 1 Lists of Devices
21:47:07 T:140537640478656 NOTICE: Enumerated ALSA devices:
21:47:07 T:140537640478656 NOTICE: Device 1
21:47:07 T:140537640478656 NOTICE: m_deviceName : @
21:47:07 T:140537640478656 NOTICE: m_displayName : Default (HDA ATI SB ALC889 Analog)
21:47:07 T:140537640478656 NOTICE: m_displayNameExtra:
21:47:07 T:140537640478656 NOTICE: m_deviceType : AE_DEVTYPE_PCM
21:47:07 T:140537640478656 NOTICE: m_channels : FL,FR
21:47:07 T:140537640478656 NOTICE: m_sampleRates : 44100,48000,88200,96000,192000
21:47:07 T:140537640478656 NOTICE: m_dataFormats : AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE
21:47:07 T:140537640478656 NOTICE: Device 2
21:47:07 T:140537640478656 NOTICE: m_deviceName : @:CARD=SB,DEV=0
21:47:07 T:140537640478656 NOTICE: m_displayName : HDA ATI SB
21:47:07 T:140537640478656 NOTICE: m_displayNameExtra: ALC889 Analog
21:47:07 T:140537640478656 NOTICE: m_deviceType : AE_DEVTYPE_PCM
21:47:07 T:140537640478656 NOTICE: m_channels : FL,FR
21:47:07 T:140537640478656 NOTICE: m_sampleRates : 48000
21:47:07 T:140537640478656 NOTICE: m_dataFormats : AE_FMT_S32NE


And this is after rebooting, logging out of the Kodi session, into LXDE then out again and back into Kodi. You can see that this time it detects the necessary output, Device 3.

21:56:18 T:140181782353856 NOTICE: special://profile/ is mapped to: special://masterprofile/
21:56:18 T:140181782353856 NOTICE: -----------------------------------------------------------------------
21:56:18 T:140181782353856 NOTICE: Starting Kodi (14.0 Git:ad747d9). Platform: Linux x86 64-bit
21:56:18 T:140181782353856 NOTICE: Using Release Kodi x64 build
21:56:18 T:140181782353856 NOTICE: Kodi compiled Dec 23 2014 by GCC 4.8.2 for Linux x86 64-bit version 3.13.11 (199947)
21:56:18 T:140181782353856 NOTICE: Running on Ubuntu 14.04.1 LTS, kernel: Linux x86 64-bit version 3.13.0-93-generic
21:56:18 T:140181782353856 NOTICE: FFmpeg statically linked, version: 2.4.4-xbmc-2.4.4-Helix
21:56:18 T:140181782353856 NOTICE: Host CPU: AMD FX™-4100 Quad-Core Processor, 4 cores available
21:56:18 T:140181782353856 NOTICE: special://xbmc/ is mapped to: /usr/share/kodi
21:56:18 T:140181782353856 NOTICE: special://xbmcbin/ is mapped to: /usr/lib/kodi
21:56:18 T:140181782353856 NOTICE: special://masterprofile/ is mapped to: /home/jez/.kodi/userdata
21:56:18 T:140181782353856 NOTICE: special://home/ is mapped to: /home/jez/.kodi
21:56:18 T:140181782353856 NOTICE: special://temp/ is mapped to: /home/jez/.kodi/temp
21:56:18 T:140181782353856 NOTICE: The executable running is: /usr/lib/kodi/kodi.bin
21:56:18 T:140181782353856 NOTICE: Local hostname: htpc
21:56:18 T:140181782353856 NOTICE: Log File is located: /home/jez/.kodi/temp/kodi.log
21:56:18 T:140181782353856 NOTICE: -----------------------------------------------------------------------
21:56:18 T:140181782353856 NOTICE: load settings...
21:56:18 T:140181782353856 ERROR: PulseAudio: Failed to connect context
21:56:18 T:140181782353856 NOTICE: PulseAudio might not be running. Context was not created.
21:56:19 T:140181782353856 NOTICE: Found 1 Lists of Devices
21:56:19 T:140181782353856 NOTICE: Enumerated ALSA devices:
21:56:19 T:140181782353856 NOTICE: Device 1
21:56:19 T:140181782353856 NOTICE: m_deviceName : @
21:56:19 T:140181782353856 NOTICE: m_displayName : Default (Xonar DG Multichannel)
21:56:19 T:140181782353856 NOTICE: m_displayNameExtra:
21:56:19 T:140181782353856 NOTICE: m_deviceType : AE_DEVTYPE_PCM
21:56:19 T:140181782353856 NOTICE: m_channels : FL,FR
21:56:19 T:140181782353856 NOTICE: m_sampleRates : 48000
21:56:19 T:140181782353856 NOTICE: m_dataFormats : AE_FMT_S32NE
21:56:19 T:140181782353856 NOTICE: Device 2
21:56:19 T:140181782353856 NOTICE: m_deviceName : @:CARD=DG,DEV=0
21:56:19 T:140181782353856 NOTICE: m_displayName : Xonar DG
21:56:19 T:140181782353856 NOTICE: m_displayNameExtra: Multichannel
21:56:19 T:140181782353856 NOTICE: m_deviceType : AE_DEVTYPE_PCM
21:56:19 T:140181782353856 NOTICE: m_channels : FL,FR
21:56:19 T:140181782353856 NOTICE: m_sampleRates : 48000
21:56:19 T:140181782353856 NOTICE: m_dataFormats : AE_FMT_S32NE
21:56:19 T:140181782353856 NOTICE: Device 3
21:56:19 T:140181782353856 NOTICE: m_deviceName : iec958:CARD=DG,DEV=0
21:56:19 T:140181782353856 NOTICE: m_displayName : Xonar DG
21:56:19 T:140181782353856 NOTICE: m_displayNameExtra: Digital S/PDIF
21:56:19 T:140181782353856 NOTICE: m_deviceType : AE_DEVTYPE_IEC958
21:56:19 T:140181782353856 NOTICE: m_channels : FL,FR
21:56:19 T:140181782353856 NOTICE: m_sampleRates : 32000,44100,48000,64000,88200,96000,176400,192000
21:56:19 T:140181782353856 NOTICE: m_dataFormats : AE_FMT_AC3,AE_FMT_DTS,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE
21:56:19 T:140181782353856 NOTICE: Device 4
21:56:19 T:140181782353856 NOTICE: m_deviceName : @:CARD=SB,DEV=0
21:56:19 T:140181782353856 NOTICE: m_displayName : HDA ATI SB
21:56:19 T:140181782353856 NOTICE: m_displayNameExtra: ALC889 Analog
21:56:19 T:140181782353856 NOTICE: m_deviceType : AE_DEVTYPE_PCM
21:56:19 T:140181782353856 NOTICE: m_channels : FL,FR
21:56:19 T:140181782353856 NOTICE: m_sampleRates : 48000
21:56:19 T:140181782353856 NOTICE: m_dataFormats : AE_FMT_S32NE