how.wtf

How to Set Default Audio in Ubuntu

· Thomas Taylor

Using the pactl command, setting default audio in Ubuntu is straightforward. For startup persistence, Ubuntu Startup Applications comes in handy.

pactl is the cli entry for the PulseAudio sound server and will be used in this tutorial.

List all input and output audio

List audio outputs:

1pactl list short sinks
11	alsa_output.pci-0000_06_00.6.HiFi__hw_Generic__sink	module-alsa-card.c	s16le 2ch 48000Hz	RUNNING

List audio inputs:

1pactl list short sources
11	alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_797_2019_02_24_60522-00.analog-stereo	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED
22	alsa_input.pci-0000_06_00.6.HiFi__hw_Generic__source	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED
33	alsa_input.pci-0000_06_00.6.HiFi__hw_acp__source	module-alsa-card.c	s32le 2ch 48000Hz	SUSPENDED

Take note of the devices listed in the output.

Set default input and output audio

Command to set default audio output:

1pactl set-default-sink <device>

Example usage:

1pactl set-default-sink alsa_output.pci-0000_06_00.6.HiFi__hw_Generic__sink

Command to set default audio input:

1pactl set-default-source <device>

Example usage:

1pactl set-default-source alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_797_2019_02_24_60522-00.analog-stereo

Persist command on start/restart

Persisting audio output:

  1. Open the application named “Startup Applications” (should be preinstalled)
  2. Click “Add” button in the upper right hand corner
  3. Enter a command name such as: “Set default audio output” in the Name: field
  4. Place the pactl set-default-sink <device> command in the Command: field
  5. Click “Add” button in the bottom right hand corner of the prompt

Persisting audio input:

  1. Click “Add” button in the upper right hand corner
  2. Enter a command name such as: “Set default audio input” in the Name: field
  3. Place the pactl set-default-source <device> command in the Command: field
  4. Click “Add” button in the bottom right hand corner of the prompt

#linux  

Reply to this post by email ↪