I just managed to configure exactly this thanks to the instructions in the ArchLinux wiki :
Set the one sink - HDMI - in pavucontrol/Configuration, and the other - analog output - you specify in default.pa
:
load-module module-alsa-sink device=hw:0,0
load-module module-combine-sink sink_name=combined
set-default-sink combined
Maybe you were missing the last two lines?
Addendum: This is OK to add the analog output to HDMI, but what if you want it the other way around? (I want to keep analog input, Pulse calls that "duplex"...) Unfortunately, load-module module-alsa-sink device=hw:0,3
did not work to add HDMI output to Pulse's "Analog Stereo Duplex" configuration. Pulse would start, but no HDMI output.
I compared the output of pacmd list-sinks
in the two situations. When I added device=hw:0,3
, that one would show up without ports. When HDMI output was chosen in pavucontrol, there would be ports. Looking at the output details, I came up with device=hdmi:0.
Choose "Analog Stereo Duplex" as your pavucontrol configuration, and add to default.pa
:
load-module module-alsa-sink device=hdmi:0
load-module module-combine-sink sink_name=combined
set-default-sink combined
Works like a charm. I keep my microphone input, and on pavucontrol/Output Devices I have all options for analog output and for HDMI.
I had the same problem (for at least a year now), and the following seemed to work:
Taken from: https://bbs.archlinux.org/viewtopic.php?id=164868
Use pavucontrol
to change the port to your desired one. Then find the internal name of the port with this command:
$ pacmd list | grep "active port"
active port: <hdmi-output-0>
active port: <analog-output-lineout>
active port: <analog-input-linein>
Using this information about the internal name of the port, we can change it with the command:
pacmd set-sink-port 0 analog-output-lineout
If you (or someone else with the problem) has multiple cards, try changing the 0 to a 1.
If this works, you can put:
set-sink-port 0 analog-output-lineout
in your /etc/pulse/default.pa
file to have it across reboots.
Best Answer
Add the following to
/etc/pulse/default.pa
:How do we figure out what to use as
cardindex
and asprofilename
? Here's one way. Configure the card so everything is working. Thecardindex
will usually be 0, but you can find it by runningpacmd list-cards
and looking at the lineindex: ...
. To find theprofilename
, useThe name of the current profile should appear in the output. Remove the angle brackets (the
<
and>
).You can test your configuration by running
from the command line to see if it sets the profile correctly, then add it to
/etc/pulse/default.pa
.Since the index name is dynamic (it can change your PCI device index if you boot with a USB audio device plugged in), you could use
<symbolic-name>
instead of<index>
(if you runpacmd list-cards
, the symbolic name is right below the index). Also, the command might fail if the device is missing when starting pulseaudio so it might worth to wrap the command with an .ifexists clause: