Pulseaudio sink/source selection, weird behaviour.

Bug #1864253 reported by Matthias Kohler
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I have a Laptop connected to an USB-C dock. By default the docks analog
audio output is chosen as the default pulse audio sink. I want that the
analog output of the Laptop is the default, hence I configured this in
/etc/pulse/default.py

This does not work and journalctl informs me that the device chosen by me
(alsa_output.pci-0000_00_1f.3.analog-stereo) does not exist, see attached output
from journalctl.

I have followed Workaround 1 here https://wiki.debian.org/BluetoothUser/a2dp
to prevent pulseaudio getting started in gdm to prevent device capture.

This does not work, the device does still not exist.
Restarting pulseaudio sometimes, but not always sets the configured
default sink. Furthermore plugging in the headphones in the Laptops analog input
switches audio to the dock.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: pulseaudio 1:11.1-1ubuntu7.4
ProcVersionSignature: Ubuntu 5.3.0-28.30~18.04.1-generic 5.3.13
Uname: Linux 5.3.0-28-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.9
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: findus 3055 F.... pulseaudio
 /dev/snd/controlC1: findus 3055 F.... pulseaudio
 /dev/snd/controlC0: findus 3055 F.... pulseaudio
 /dev/snd/pcmC0D0p: findus 3055 F...m pulseaudio
CurrentDesktop: i3
Date: Fri Feb 21 22:19:04 2020
InstallationDate: Installed on 2019-06-13 (253 days ago)
InstallationMedia: Ubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210)
SourcePackage: pulseaudio
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/26/2019
dmi.bios.vendor: LENOVO
dmi.bios.version: N2IET80W (1.58 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20N3S0UB00
dmi.board.vendor: LENOVO
dmi.board.version: SDK0R32862 WIN
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.modalias: dmi:bvnLENOVO:bvrN2IET80W(1.58):bd11/26/2019:svnLENOVO:pn20N3S0UB00:pvrThinkPadT490:rvnLENOVO:rn20N3S0UB00:rvrSDK0R32862WIN:cvnLENOVO:ct10:cvrNone:
dmi.product.family: ThinkPad T490
dmi.product.name: 20N3S0UB00
dmi.product.sku: LENOVO_MT_20N3_BU_Think_FM_ThinkPad T490
dmi.product.version: ThinkPad T490
dmi.sys.vendor: LENOVO
modified.conffile..etc.pulse.daemon.conf: [modified]
modified.conffile..etc.pulse.default.pa: [modified]
modified.conffile..etc.pulse.system.pa: [modified]
mtime.conffile..etc.pulse.daemon.conf: 2020-02-21T20:38:20.081439
mtime.conffile..etc.pulse.default.pa: 2020-02-21T19:27:57.386938
mtime.conffile..etc.pulse.system.pa: 2020-02-21T15:23:09.470494

Revision history for this message
Matthias Kohler (2by4brick) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This is the intended default behaviour of Ubuntu; to automatically switch to the audio device most recently plugged in.

To disable this feature, please edit /etc/pulse/default.pa and comment out the line:

  load-module module-switch-on-connect

making it:

  # load-module module-switch-on-connect

Changed in pulseaudio (Ubuntu):
status: New → Won't Fix
Revision history for this message
Matthias Kohler (2by4brick) wrote :

I have commented `load-module module-switch-on-connect` out in both
`/etc/pulse/default.pa` and `~/.config/pulse/default.pa`.
This does not work.

For instance unplugging the headset from the laptop switches the default sink to the dock.
The laptop has speakers and a microphone built in, the dock has not. Why switch the
default devices to somewhere where no sound can be played or recorded. And why switch
even if the switching module is not loaded?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It sounds like PulseAudio is not very smart and doesn't understand docks are hotpluggable audio devices which themselves may be dormant and unused.

Try commenting out both:

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

and

  load-module module-switch-on-connect

If those two changes together do not solve the problem then please report the bug to the PulseAudio developers at https://gitlab.freedesktop.org/groups/pulseaudio/-/issues

Changed in pulseaudio (Ubuntu):
status: Won't Fix → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

You might only need to comment out:

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

Revision history for this message
Matthias Kohler (2by4brick) wrote :

I also have this commented out.
I will report to the PulseAudio developers.

Revision history for this message
Matthias Kohler (2by4brick) wrote :

Link to the report to the PulseAudio developers.

https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/814

Changed in pulseaudio (Ubuntu):
status: Incomplete → New
Revision history for this message
Matthias Kohler (2by4brick) wrote :

The issue has been resolved. See the pulseaudio issue linked above.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It looks like the solution is specific to your system, is that right? If not then is there anything that Ubuntu generally needs to fix?

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
Matthias Kohler (2by4brick) wrote :

Ubuntu does not have to fix anything.

Changed in pulseaudio (Ubuntu):
status: Incomplete → Invalid
Changed in pulseaudio:
status: Unknown → Fix Released
no longer affects: pulseaudio
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.