Sound – How to Set a Default Audio Output Device in Ubuntu

sound

Every time I boot up I have to switch my audio output device to my "Line Out" headphones because for some reason my microphone defaults as a speaker.

See this screenshot
[See this screenshot.

Best Answer

Simple fix in 19.10 that worked for me:

I couldn't get the solution @singrium proposed to persist on Ubuntu 19.10. It worked with device numbers in /etc/pulse/default.pa but as I connected for example my headset device numbers were changing and things stopped working. It didn't work with device names in /etc/pulse/default.pa.

The simple workaround I found is adding the pactl set default sink command in startup applications.

  1. Run: pactl list short sinks
  2. Note the device name you want to use as default
  3. Try to run: pactl set-default-sink <Your_Device_Name>
    This should work without giving you an error message.
  4. Open the application "Startup Applications" (Should be preinstalled on Ubuntu)
  5. Click on "Add"
  6. Give your startup item a name
  7. Copy your command from above into the command field:
    pactl set-default-sink 'Your-Device-Name'
  8. Click on "Save".

You are now good to go. Your default audio device will be set on each boot and as such be persistent. If you want to change the default device simply edit the device name in startup applications command.