Pulse audio does not remember default sink

Bug #1773549 reported by Alfred Krohmer
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

It seems like pulseaudio is picking the wrong audio sink as a default in different scenarios.

On my computer I have the default onboard Intel HDA audio as well as a USB headset. On the network, there is one pulse instance advertising itself.

I always set the onboard audio as the default audio sink. However, after every reboot or resume or `pulseaudio -k`, the wrong sink is picked (and the one I set previously is *not* picked).

When I enable discovery of remote pulse instances, sometimes the one on my network is picked as default, but sometimes my headset is picked instead of the onboard sink. Then again, if I disable discovery sometimes the onboard sink gets picked as default. There seems to be no clear pattern on when it selects what.

I have even entered the following in /etc/pulse/default.pa:

set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo
set-default-source alsa_input.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-mono

But this doesn't have any effect at all.

I also noticed that *sometimes*, pulse updates the file at `~/.config/pulse/f8a78acf499a402aa80f90af9ef5c15c-default-sink` to point to the correct audio sink that I selected in `pavucontrol`, but not always. Even if I write to that file manually to select a default sink, the file gets overwritten by pulse on the next start with the default sink that it chose.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: pulseaudio 1:11.1-1ubuntu7
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: devkid 3487 F.... pulseaudio
 /dev/snd/controlC2: devkid 3487 F.... pulseaudio
 /dev/snd/pcmC0D0p: devkid 3487 F...m pulseaudio
 /dev/snd/controlC0: devkid 3487 F.... pulseaudio
CurrentDesktop: MATE
Date: Sat May 26 17:07:55 2018
ExecutablePath: /usr/bin/pulseaudio
SourcePackage: pulseaudio
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/07/2014
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: V2.13
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: Z77A-G43 (MS-7758)
dmi.board.vendor: MSI
dmi.board.version: 1.0
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: MSI
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrV2.13:bd03/07/2014:svnMSI:pnMS-7758:pvr1.0:rvnMSI:rnZ77A-G43(MS-7758):rvr1.0:cvnMSI:ct3:cvr1.0:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: MS-7758
dmi.product.version: 1.0
dmi.sys.vendor: MSI
modified.conffile..etc.pulse.default.pa: [modified]
mtime.conffile..etc.pulse.default.pa: 2018-05-26T17:01:12.271701

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

Ubuntu is intentionally designed to automatically prefer the USB (or Bluetooth) audio over the internal audio.

It sounds like you want to disable that feature, so just remove/comment these lines from /etc/pulse/default.pa:

  ### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
  .ifexists module-switch-on-connect.so
  load-module module-switch-on-connect
  .endif

Changed in pulseaudio (Ubuntu):
status: New → Invalid
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Actually this bug could still be kept open. We have a design proposal for fixing it already:

 https://trello.com/c/aI3BX3ax

Changed in pulseaudio (Ubuntu):
importance: Undecided → Wishlist
status: Invalid → Triaged
Revision history for this message
Alfred Krohmer (devkid) wrote :

Oh, thanks for the hint. I didn't know that this module was loaded. But then the behavior of the module-switch-on-connect module is somehow inconsistent. The USB headset is always attached to the computer (wireless USB receiver) so there should be no reason that pulse should select that one over the onboard sink (considering that I had selected the onboard sink as default before). Also network sinks should not really be preferred via that module (that just doesn't seem right to me).

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

I agree it could be better. If you would like to suggest ways to improve that module, please report them to the developers here:

  https://bugs.freedesktop.org/enter_bug.cgi?product=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.