Discussion about module-device-manager change to module-switch-on-connect

Mark Gaiser markg85 at gmail.com
Sun Aug 21 14:16:09 UTC 2016


Hi,

Disclaimer:
Specially on this list i tend to jump to conclusions or come across as rude
at times. I'm trying to be constructive here with a "what would the user
like best" point of view.

The background for this topic started ~2 years ago. I tried to get my USB
headphone to work with PulseAudio, but somehow it didn't work as i would
expect it. That caused me to start a mailing list thread on
pulseaudio-discuss which you can read here [1]. The issues were identified,
but PulseAudio was at fault at that point in time.

What i wanted: plug in a USB headset and sound will be redirected there.
Unplug it and the sound would redirect to wherever it was before.

That did not work as described pre PulseAudio 8.0.

Fast forward to today. With the release of PulseAudio 8.0 things got
massively improved (we're at 9.0 right now). The module
"module-switch-on-connect" was needed. Loading that module on a desktop
like Gnome, Unity or Openbox gave the expected result i was hoping for. It
finally worked :)

So next up was trying to get the same stuff working in Plasma5. That turned
out to be less easy than anticipated. Loading the
module module-switch-on-connect didn't make it work on Plasma5. Why, i
asked myself. After quite a few hours of debugging and comparing loaded
modules in Plasma5 and Gnome i discovered one difference that resulted in
things not working. module-device-manager. Upon further investigation that
module was being loaded in /bin/start-pulseaudio-x11, like so:

if [ x"$KDE_FULL_SESSION" = x"true" ]; then
  /usr/bin/pactl load-module module-device-manager "do_routing=1" >
/dev/null
fi

That file was installed by pulseaudio and is in the pulseaudio repositories
so i thought module load might not have to be there anymore. I opened a bug
report with the request to remove the KDE specific rule [2].

There 2 things happened:
1. It turned out to be for Plasma's Multimedia settings, i didn't know that
before.
2. Neither plasma nor pulseaudio is at fault (i thought it was plasma till
this point). It just so happens that the two modules (module-device-manager
and module-switch-on-connect) just don't work together.

There probably is a benefit of having module-device-manager, but i haven't
discovered it yet. On the other side, there is a very big benefit of having
"module-switch-on-connect". That quite simply makes USB headsets work out
of the box, something that isn't the case by default. IT would be a nice
improvement in my book :)

What i'd like for this thread is to consider
loading module-switch-on-connect by default (changing the line
in start-pulseaudio-x11) and thus consider removing
"module-device-manager". It would most certainly improve the user
experience for those that have USB headsets.

Best regards,
Mark

[1]
https://lists.freedesktop.org/archives/pulseaudio-discuss/2014-October/021891.html
[2] https://bugs.freedesktop.org/show_bug.cgi?id=95104
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160821/ed1e8fdc/attachment.html>


More information about the Plasma-devel mailing list