2018-02-16, 21:55
This is just a quick note for those running Kodi on Linux who need full audio passthrough functionality via HDMI. Kodi 17.6 passthrough works beautifully on Linux, you simply have to launch it with a script that disables PulseAudio on entry and reenables it on exit. I run Manjaro (a bit easier to use derivative of Arch), and used to run Ubuntu, so here are the scripts I use for launching Kodi with full passthrough capability. There are three scripts - pulseaudio_start, pulseaudio_stop, and kodi_launch. The start and stop scripts are different depending upon the Linux distro you're using, while the kodi_launch script is the same for all. Simply create the appropriate scripts and place them in /usr/local/bin, make them executable, and then change your Kodi launcher to execute "kodi_launch" instead of "kodi."
~~~~~~~~~~~~
Arch/Manjaro
~~~~~~~~~~~~
pulseaudio_stop
--------------------
#! /bin/bash
systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
pulseaudio_start
---------------------
#! /bin/bash
systemctl --user start pulseaudio.socket
systemctl --user start pulseaudio.service
~~~~~~
Ubuntu
~~~~~~
pulseaudio_stop
--------------------
#! /bin/bash
echo autospawn = no > $HOME/.config/pulse/client.conf
pulseaudio --kill > /dev/null 2>&1
pulseaudio_start
---------------------
#! /bin/bash
rm $HOME/.config/pulse/client.conf > /dev/null 2>&1
pulseaudio --start > /dev/null 2>&1
~~~~~~~~~~~~~~
All Distributions
~~~~~~~~~~~~~~
kodi_launch
---------------
#! /bin/bash
pulseaudio_stop
kodi
pulseaudio_start
I hope this helps some of those who love Linux but absolutely must have that passthrough (like me)!
~~~~~~~~~~~~
Arch/Manjaro
~~~~~~~~~~~~
pulseaudio_stop
--------------------
#! /bin/bash
systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
pulseaudio_start
---------------------
#! /bin/bash
systemctl --user start pulseaudio.socket
systemctl --user start pulseaudio.service
~~~~~~
Ubuntu
~~~~~~
pulseaudio_stop
--------------------
#! /bin/bash
echo autospawn = no > $HOME/.config/pulse/client.conf
pulseaudio --kill > /dev/null 2>&1
pulseaudio_start
---------------------
#! /bin/bash
rm $HOME/.config/pulse/client.conf > /dev/null 2>&1
pulseaudio --start > /dev/null 2>&1
~~~~~~~~~~~~~~
All Distributions
~~~~~~~~~~~~~~
kodi_launch
---------------
#! /bin/bash
pulseaudio_stop
kodi
pulseaudio_start
I hope this helps some of those who love Linux but absolutely must have that passthrough (like me)!
