Set default system audio output port (for all accounts)
I've got the answer, thanks to Ford_Perfect in #pulseaudio IRC channel.
I needed to add the following line to /etc/pulse/default.pa
:
set-sink-port alsa_output.pci-0000_00_1f.5.analog-stereo analog-output-mono;output-amplifier-on
This solved the problem, but for some mysterious reason also made sound muted by default, and set default volume level at a very low. So as a workaround I added the following lines to the same file:
set-sink-mute alsa_output.pci-0000_00_1f.5.analog-stereo False
set-sink-volume alsa_output.pci-0000_00_1f.5.analog-stereo 30000
One more important piece of information: to use the above instructions you need your sink name (in my case alsa_output.pci-0000_00_1f.5.analog-stereo
) and name of your sink's ports (in my case I used analog-output-mono;output-amplifier-on
). You can get them running pacmd list-sinks
command - it will list all your avialiable sinks, together with their ports.
Related videos on Youtube
Ludwik Trammer
Updated on September 17, 2022Comments
-
Ludwik Trammer over 1 year
The default output audio port Ubuntu doesn't work on my system. It should be "Analog Mono Output/Amplifier", instead of "Analog Output/Amplifier". I can easily change that in sound preferences, just by choosing the right port in the "Output" tab. The problem is this would only apply to a single account, and I would like to change it system-wide, so it applies to all accounts on the system (I have more than 100 users...).
I'm after 2 hours of Googling, so any help would be appreciated.
Update: I can achieve the same effect as I would by changing it in sound preferences using the following command:
pacmd 'set-sink-port' 'alsa_output.pci-0000_00_1f.5.analog-stereo analog-output-mono;output-amplifier-on'
Unfortunately that's still not system-wide, so doesn't help me much...
-
Ludwik Trammer almost 14 yearsLooks good. I will test it out at work tomorrow.
-
Ludwik Trammer almost 14 yearsNo, unfortunately that's not right. I've got only one sink. What I want to do is to choose one of the sink's audio ports.
-
Hritika Agarwal almost 11 yearsDo you know how can I map my line-in as analog-out? I am able to do that on Windows with Realtek panel but not on Linux so far. Only analog-output and analog-output-stereo are listed below 'ports' section in list-sinks command.