7

I use my "Line Out - Built-in Audio" for my speakers, but for some reason, every time I reboot my computer, it changes by default to "Digital Output (S/PDIF) - Built-in Audio".

The funny thing is that, if I unplug and re-plug my speaker connector, the channel changes by itself to "Line Out" without me having to do anything.

What could I do so that I can stop doing this annoying step every day?

enter image description here

WinEunuuchs2Unix
  • 99,709
  • 34
  • 237
  • 401
Enrique Moreno Tent
  • 3,289
  • 11
  • 41
  • 65
  • Does this answer your question? [Ubuntu 18.04: Audio doesn't work unless I switch between outputs](https://askubuntu.com/questions/1165625/ubuntu-18-04-audio-doesnt-work-unless-i-switch-between-outputs) – Raffa Jan 26 '21 at 06:48

2 Answers2

4

You can have pulse audio stay on the last selected output source no matter what:

sudo -H gedit /etc/pulse/default.pa

Find this line:

load-module module-switch-on-port-available

and change it to:

# load-module module-switch-on-port-available

An additional step is needed as listed in:

We need to add the line:

set-sink-port <name|index>  analog-output-headphones

The name or index of the active sink, and available ports can be displayed with pactl list sinks. The way I spelled analog-output-lineout may be incorrect.

Save the file and exit.

Restart pulse audio with:

pulseaudio -k

In your sound settings select "Line Out" and it will always stay connected even if you physically unplug it.

WinEunuuchs2Unix
  • 99,709
  • 34
  • 237
  • 401
0

I have multiple audio devices connected:

  • Internal sound card
  • Speakers via HDMI monitor
  • USB Mic and headphone adapter

As suggested by Enrique in a comment to WinnEunuuchs2Unix answer, I commented out the line load-module module-switch-on-connect in my /etc/pulse/default.pa and it solved my problems of having the primary audio device change every boot.

onions
  • 1