Linux Mint identify, fix sound problems, set default device

I have been using Linux Mint for a years and it has been a great experience.
I work as a programmer and a data scientist (or at least I believe so). I am also a hobby vlogger with interests in many areas like music, art, science and more.
I have several sound devices on my machine:

  • camera with microphone
  • separate microphone
  • headphones
  • speakers
  • HDMI monitor

so all is working fine except the:

  • default sound device - the sound output is from the speakers but the default device are the headphones - so after a restart if I want to increase the volume I need to manually change the device. Even setting the speakers as a default device is not working for me.
  • after a restart or update the input device is changed to the camera microphone - which cause me several problems with meetings and presentations.

So finally I decided to spend some time, identify the problems and fix them. In this article you will find:

  • How to install Pulse Audio
  • How to find all your sound cards / devices
  • How to disable HDMI or microphone device (input and output)
  • View the default sound device
  • Set new default sound device
  • Check the fix by restart of pulse audio

I think that this solution can be applied to Linux Mint, Ubuntu and Debian.

How to install Pulse Audio

You can install it by using the Linux mint menu:

  • Menu
  • Software Manager
  • Search for 'pavucontrol'
  • Install it

or using the terminal and typing:

sudo apt-get update
sudo apt-get install pavucontrol

Then you can access it from the menu by searching: Pulse Audio.

In tab playback you can find the current apps and the sound profiles.
Then you have Output and Input devices. You can find all enabled devices there. You can change the default device by: Set fallback. unfortunatelly this is not persistent after restart.

On the final table you can disable devices. For example select a device: Camera and then select profile off. This is going to disable the use of the device. The same can be done for the HDMI.

Note: That if you disable your HDMI sound this will disable also the display. So a better option is to change the default sound device. The HDMI wasn't working even after changing setting the old ones and restart. The only thing that restore the HDMI was restart of the TV. You can read more here:

TV connected HDMI and display port not working after sound setup

Also this is the place where you can search for problems related to your Linux Mint about HDMI, display port, TV, audio related to them.

How to find all your sound cards / devices

You can find all devices for the current machine by:

  • Menu
  • Preferences
  • Sound

There you will see all hardware device. No matter are they enabled or no.
If you want to check only the enabled devices you can start Pulse Audio:

  • Menu
  • Sound & Video
  • PulseAudio Volume Control

Here you can find the enabled input and output sound devices. Also you can disable devices from tab configuration.

For Linux Mint 19 setting default devices is not working or at least for me. How to change default output device:

  • PulseAudio
  • Tab Output devices
  • Check set fallback next to the desired device

If you prefer to use the terminal you can use the following commands:

This one will give you short list of the enabled devices:

pacmd list-sinks | grep -e 'name:' -e 'index:'

output:

index: 0
name: <alsa_output.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo>
  • index: 1
    name: <alsa_output.pci-0000_22_00.3.analog-stereo>

The * means default device.

if you want to list all cards with all information you can use:

pacmd list-cards

which will give output similar to:

4 card(s) available.
    index: 0
    name: <alsa_card.usb-Sonix_Technology_Co.__Ltd._USB_2.0_Camera-02>
    driver: <module-alsa-card.c>
    owner module: 7
    properties:
        alsa.card = "3"
           device.icon_name = "camera-web-usb"
    profiles:
        input:analog-mono: Analog Mono Input (priority 2, available: unknown)
        off: Off (priority 0, available: unknown)
    active profile: <off>
    ports:
        analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: unknown)
            properties:
                device.icon_name = "audio-input-microphone"

You are interested in several points from this huge list:

  • how many cards do you have - 4 card(s) available.
  • what are the active profiles active profile: <off>
  • the name of the device and the index - index: 0, name: <alsa_card.usb-Sonix
  • sinks - alsa_output.usb-Blue_Microphones

Set new default sound device

In order to set a new default output device you can follow next steps. List all devices from your system with:

pacmd list-sinks | grep -e 'name:' -e 'index:'

output:

index: 0
name: <alsa_output.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo>
  • index: 1
    name: <alsa_output.pci-0000_22_00.3.analog-stereo>

Then open a file: /etc/pulse/default.pa with your preferred editor like:

sudo nano /etc/pulse/default.pa

add the next lines ( you need to change them for your situation):

set-card-profile 3  output:analog-stereo
set-default-sink alsa_output.pci-0000_22_00.3.analog-stereo

Note: I tried to use the index:

set-card-profile 3  output:analog-stereo
set-default-sink 3

but it didn't do any change so I use the name.

Set default input source

Let say we have the following card profiles:

  index: 0
    name: <input>
      device.string = "hw:2"
* index: 1
    name: <oss_input.dsp>
      device.string = "/dev/dsp"
  index: 2
    name: <alsa_output.pci-0000_04_01.0.analog-stereo.monitor>

The newer versions have section like:

### Make some devices default
#set-default-sink output
#set-default-source input

then we can change the above section to:

### Make some devices default
#set-default-sink output
set-default-source alsa_output.pci-0000_04_01.0.analog-stereo.monitor

Set default output sink

Let say we have the following card profiles:

  * index: 0
	name: <alsa_output.pci-0000_04_01.0.analog-stereo>
    index: 1
	name: <combined>

The newer versions have section like:

### Make some devices default
#set-default-sink output
#set-default-source input

then we can change the above section to:

### Make some devices default
#set-default-sink alsa_output.pci-0000_04_01.0.analog-stereo
set-default-source input

Check the fix by restart of pulse audio

Finally how to check the change. You can test the change by restarting your computer and verifying the default output device. If you don't want to restart your PC then you can simply restart the Pulse Audio with:

pulseaudio -k

You can check if the pulse audio is running by:

pulseaudio --check

if all is ok no output will be shown.

you can start it and check for problems on start by:

pulseaudio --start

Resources