Score:0

How to persist settings for default audio output on Ubuntu 21.04?

cn flag

I have Ubuntu 21.04 running.

I always need to change the audio output settings from "Analog Out" (which has no sound) to "Speakers" (works well).

The same problem occurs with the audio input ("Analog input" does not work, but "Internal microphone" does).

How to persist these changes?

Score:0
fr flag

I had this problem - pulseaudio was defaulting to my USB headset, but I want sound to come to my speakers by default and I'll switch to the headset using video conferencing software if I'm on a call.

I ran pactl list short sinks to find out which 'sinks' (i.e. audio output devices) are available. The output looked like this:

$ pactl list short sinks
1   alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo  module-alsa-card.c  s16le 2ch 44100Hz   RUNNING
2   alsa_output.pci-0000_09_00.4.analog-stereo  module-alsa-card.c  s16le 2ch 44100Hz   IDLE
7   alsa_output.pci-0000_07_00.1.hdmi-stereo    module-alsa-card.c  s16le 2ch 44100Hz   SUSPENDED

The first of these, which the list has as RUNNING, is my USB headset. The one I want is the second. If I run pactl set-default-sink alsa_output.pci-0000_09_00.4.analog-stereo this makes the right device active, but this is just like changing the option in the 'Sound' settings menu.

To make the change persistent through rebooting, I edited /etc/pulse/default.pa and added set-default-sink alsa_output.pci-0000_09_00.4.analog-stereo to the bottom of the file (i.e. the same as the command above but missing off the pactl from the front).

So work out which device you want to switch to, run pactl set-default-sink device to check you have this right, then add set-default-sink device to the bottom of /etc/pulse/default.pa.

For input devices, the equivalent commands are pactl list short sources and pactl set-default-source.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.