I am trying to get both of my monitors to play audio out of their speakers. They are connected over HDMI.
I can make them play audio one at a time. But how do I get them both to play audio at the same time?
I am trying to get both of my monitors to play audio out of their speakers. They are connected over HDMI.
I can make them play audio one at a time. But how do I get them both to play audio at the same time?
The other posted solution(s) work however you're going to encounter some issues with stereo sound, as your output speakers are now (L R)(L R). What you're going to want to do is remap the 'left' audio channel to the left channel speaker on your left monitor, then the 'right' audio channel to the right channel speaker on your right monitor. This way you'll have output speakers like this (L x)(x R).
Find the correct device ids:
aplay -l
Add the new configuration to the top of "/etc/pulse/default.pa":
load-module module-alsa-sink device="hw:1,8" sink_name=hdmi_left channel_map=front-left,lfe
load-module module-alsa-sink device="hw:1,10" sink_name=hdmi_right channel_map=lfe,front-right
load-module module-combine-sink sink_name=combined slaves=hdmi_left,hdmi_right
set-default-sink combined
I'm using 'lfe' to disable the middle two speakers. You can remap each audio channel to come out on both speakers on their respective monitors i.e. (L L)(R R), but at least on my setup that sounds terrible.
This is not software problem, and I'm afraid it cannot be solved this way. I suggest you look into audio splitter hardware which is designed specifically for this.
EDIT: found out adding a fake device with paprefs
package (which combines other devices) can be an option. Described in detail on Play sound through two or more outputs/devices
NOTE: Please refer to Play sound through two or more outputs/devices for some apps mentioned.
I also have 2 HDMI monitors which somehow doesn't bind automatically with paprefs
when adding a virtual output for all devices, the steps below worked for me with Built-in Audio
card only, hopefully it will work on your setup as i think you have 2 cards based on your screenshot.
Add a custom profile for shared output of analog and digital
sudo gedit /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf
Save this on the last line of the file
[Profile output:analog-stereo+output:hdmi-stereo+output:hdmi-stereo-extra1]
description = Shared Analog/Digital Stereo Output #Laptop Speakers + HDMI Monitor Speakers
output-mappings = analog-stereo hdmi-stereo hdmi-stereo-extra1
Restart pulseaudio to get custom profile
pulseaudio -k
Open
PulseAudio Volume Control
>Configuration
tab and set your custom profileOpen
PulseAudio Preferences
>Simultaneous Output
tab and check the boxOpen Ubuntu
Sound Settings
>Output
tab and selectSimultaneous output to*
Play any song to test