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


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.

| improve this answer | |
  • It did not work :/ – Enrique Moreno Tent Sep 8 '19 at 11:16
  • @EnriqueMorenoTent I've revised the answer with a similar problem's solution. – WinEunuuchs2Unix Sep 8 '19 at 16:50
  • I don't have a set-sink-port command. In the default.pa there is a load-module module-switch-on-connect. Could that be relevant? – Enrique Moreno Tent Sep 8 '19 at 20:20
  • I'm not sure. I must confess I'm not an expert and struggle with pulseaudio and alsa myself many times. – WinEunuuchs2Unix Sep 8 '19 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.