8

I have 19.04 on a Lenovo ThinkPad T580. When my laptop is not docked, default audio output device is "Speakers - built-in". But when I put my laptop in a docking station, it changes default audio output device to "Analog Output - ThinkPad Dock USB Audio".

I don't have any speakers connected to my dock, so I would like to continue to have audio out of the built-in speakers. Of course, I can just change it back manually every time I dock my computer, but it would be much nicer, if it just stopped changing default audio output device whenever I docked my computer.

Any ideas how to accomplish this?

OZ1SEJ
  • 1,235
  • 3
  • 19
  • 31
  • This should do the trick: https://askubuntu.com/questions/1185903/why-cant-i-set-a-default-output-audio-device-in-ubuntu-19-10/1186131#1186131 – WinEunuuchs2Unix Dec 15 '19 at 05:20

1 Answers1

16

I found a solution to this.

  1. Open this file in an editor /etc/pulse/default.pa
  2. Find and comment out the line containing this load-module module-switch-on-connect
  3. Then, restart pulseaudio with pulseaudio -k

This solution was modified from https://danielgibbs.co.uk/2019/06/prevent-automatic-change-of-audio-device-ubuntu/

Tejas Lotlikar
  • 2,945
  • 5
  • 17
  • 26
Charles Giessen
  • 161
  • 1
  • 5
  • 1
    works on 20.04.2 also – Phil Feb 23 '21 at 20:30
  • 5
    Yeah, well, that's not really a solution, because now it doesn't change audio device automatically EVER - not when I plug in my headphones, not when I plug in an HDMI cable. These should still be active, it's just the docking event that shouldn't change audio device. How do I do that? – OZ1SEJ Dec 13 '21 at 19:15