18.04 Sound Through hdmi
Solution 1
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 2
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:
An even more complex solution for when HDMI TV is unplugged and replugged is based on udev
rule:
Extensive Forum Thread
In Linux Mint forum there is an extensive thee page thread on this topic:
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.
Related videos on Youtube
John Dowling
Network automation developer for RackSpace. I develop networking automation tools in Python and Golang.
Updated on September 18, 2022Comments
-
John Dowling over 1 year
I have had an issue with sound ever since I installed Ubuntu. On boot up I can select HDMI sound and it works, when the monitor sleeps one of two things happen.
Either the sound reverts to another source and I have to switch back to it in the settings, which is annoying but not unrecoverable, or the sound stays on the HDMI source but I get no sound and have to reboot to get it back.
throughout this the HDMI source is always available and I can select it. but I always have one of the two issues.
I am loving the experience with Linux at the moment but this is starting become a deal breaker, can someone please help ?
thanks
-
user.dz over 4 yearsOr keep both output mixed (no switching), as in this post askubuntu.com/q/756390/26246
-
-
John Dowling almost 6 yearsHey thanks for the reply, unfortunately I have already done this with no joy.
-
WinEunuuchs2Unix almost 6 years@JohnDowling I've expanded the answer with more complex solutions you may not have tried yet.
-
John Dowling almost 6 yearsI have implemented the first of the complex solutions I will let you all know the result soon
-
John Dowling almost 6 yearsthe solution seems to have stopped the audio switching but has not solved the second of the two possibilities, after wake I have no sound at all, so we seem to have solved the annoying issue but not the deal breaker one lol
-
John Dowling almost 6 yearsIn fact scratch that, on the last reboot the audio switched back to spdif
-
WinEunuuchs2Unix almost 6 years@JohnDowling I find 1 to 2% of suspends goes flakey anyways. So try it for a few days or a week and then let me know...
-
bhotel over 4 yearsThe Simple Solution appears to work for me on 19.10. We'll see if it's reliable over the next few days. But even if it's not, it'll be better than opening the Sound settings every time I wake the machine from suspend...