Whenever I resume my Ubuntu 17.04 from sleep the HDMI audio output is disabled, and audio has defaulted to the SP-DIF output. I always have to run pavucontrol or go into sound settings to re-select HDMI as the audio output. As this is a Home Theatre PC running Kodi this is a pain in the neck, as it can't be done using the IR remote. Is there any way that I can resolve this, either by disabling the SP-DIF output altogether or automatically selecting the HDMI audio device whenever resuming from sleep?
2 Answers
There is a complicated way of accomplishing this with udev
rules, systemd
service and suspend/resume hooks.
An easier way is to check this:
$ cat /etc/pulse/default.pa | grep switch-on-port-available
load-module module-switch-on-port-available
If the second line doesn't begin with a #
(commented out) then edit the file and insert a #
in the beginning.
Now all output will be controlled to what you manually set it to and stay there until you change it.
-
It was already commented out in my case, but running this command brings back the option ... "pulseaudio --kill" .... I hope it helps, Always trying to help, Mark Oct 2, 2018 at 13:51
For the benefit of anyone who hits this problem....Following advice given on another forum I upgraded my kernel from 4.10 to 4.15 and it seems to have fixed the problem.
-
-
FWIW here's the link where I got the advice anyway...forums.digitalspy.com/discussion/comment/…– Ian MMar 20, 2018 at 10:17
-
I tried editing default.pa, commenting out the "load-module module-switch-on-port-available" line. Now the HDMI audio is playing everything back weirdly slowly - at about a quarter of normal speed ???– Ian MMar 20, 2018 at 15:50