18.04 Sound Through hdmi
Solution 1:
Simple Solution
When signal is lost to HDMI (during sleep) Pulse Audio is automatically configured to active source (your laptop's speakers). Upon resume the sound device is still your laptop. To override this setting, tell Pulse Audio to never switch sound devices automatically:
- edit the file
/etc/pulse/default.pa
- find the line
load-module module-switch-on-port-available
- insert a
#
at the beginning of the line to disable automatic port switching - save the file and reboot.
Complex Solution
Before I learned of the simple solution, I used a more complex solution based on systemd
suspend/resume hook:
- Ubuntu changing default audio output after suspend
An even more complex solution for when HDMI TV is unplugged and replugged is based on udev
rule:
- Switch between internal and HDMI speakers automatically
Extensive Forum Thread
In Linux Mint forum there is an extensive thee page thread on this topic:
- HDMI + Sound + Mint 18
Solution 2:
Ok So it would seem that the only way I can solve this is to unplug and plug in the hdmi cable after waking, this is better then rebooting but still not Ideal.
I am going to mark this as solved, but if someone has a better suggestion please let me know.
Solution 3:
Ok that's it i'm out.
Until the audio can be fixed on this platform it is a null platform.
Have completely lost sound now, this is a poor showing for 2018.