The fact that audio doesn't automatically switch to a newly-connected output device is a source of confusion and frustration for a lot of new users, and represents a usability papercut that falls under https://phabricator.kde.org/T6831. We should consider enabling switchOnConnect by default.
module-switch-on-connect conflicts with module-device-manager which is loaded by default in Plasma (see /usr/bin/start-pulseaudio-x11). Disabling module-device-manager would mean that the entire "Audio/Video settings" KCM (phonon) won't work anymore.
Are you saying that the setting in the KCM itself doesn't actually work because it conflicts with something else?
he's saying if you turn this setting on, you break all of something else.
Also, it's not necessarily a better default. I had a monitor in an office with inbuilt speakers, I still wanted audio to come out my headphone jack. I'm not convinced you'd have fewer complaints, they'd just be from a different group.
> he's saying if you turn this setting on, you break all of something else. If that's the case, should the setting even exist? This smells like a deeper bug. > I had a monitor in an office with inbuilt speakers, I still wanted audio to come out my headphone jack. If you plugged in your headphones last, then the audio would/should come out of them, right?
>If you plugged in your headphones last, then the audio would/should come out of them, right? Unfortunately not.
That seems like another bug that needs fixing, then. I don't have hardware that can replicate that setup; could you file a bug for the issue if you still do? I'll mention that the use case of plugging headphones into my laptop and having the audio automatically transferred there works fine for me, even without this setting turned on. But maybe that's because the internal speakers and headphones are both on the same device?
> That seems like another bug that needs fixing, then. I don't have hardware that can replicate that setup; could you file a bug for the issue if you still do? What bug? That's a behavior of pulseaudio itself and I don't really see any issue with it. Both modules (switch-on-connect and device-manager) are trying to do the same thing (automatic routing of streams), so it makes sense that they conflict with each other. Audio/Video KCM interacts directly with the module-device-manager, so it is also expected to not be working when you unload this module from pulseaudio.
>But maybe that's because the internal speakers and headphones are both Yes. Which is also why it's not a bug that it doesn't auto switch back. The sound card of my laptop doesn't get added when I plug something into the jack. I don't like bug reports in the form of proposing a solution rather than in the form of a bug so I'm closing this.
OK, here's a bug report that describes the bug without proposing a solution: https://bugs.kde.org/show_bug.cgi?id=392117 In the process, I learned a lot about PulseAudio, so thanks for pushing me a bit.
The Phonon KCM has now been removed, so there is no longer a technical barrier to implementing switch-on-connect. Any remaining objections are whether or not the user experience is better than the current one. Re-opening the bug so we can have that discussion. If I'm understanding correctly, the objection to switch-on-connect is that if the user plugs in a new device such as an HDMI monitor whose transport protocol has both audio and video capabilities, but the device does not actually have speakers capabilities, then switch-on-connect behavior will inappropriately cause audio to be inappropriately routed there anyway, effectively muting the system. If this is accurate, is there any way we can add some more intelligence to detect devices that could-but-don't handle audio output and avoid automatically switching to them? Or would that have to be done in the PulseAudio switch-on-connect module itself? Or something else?
>then switch-on-connect behavior will inappropriately cause audio to be inappropriately routed there anyway, effectively muting the system. That wasn't my gripe last time this came up. Even if it has speakers I still didn't want to disable my laptops headphone jack. I haven't retested the behaviour of that. That's a reason for it to still be an option, doesn't necessarily mean it's reason for it to not be default. >Would that have to be done in the PulseAudio switch-on-connect module itself? It would. --- I also don't know how we would (in any non terrible way) enable this by default on the client side.
*** Bug 413283 has been marked as a duplicate of this bug. ***
*** Bug 378018 has been marked as a duplicate of this bug. ***
*** Bug 417901 has been marked as a duplicate of this bug. ***
As I understand it, the only remaining objection to doing this by default is that HDMI devices would be automatically switched to (whether or not they can play audio), which would be very annoying. The changelog for PulseAudio 14 indicates that HDMI are now excluded from switch-on-connect behavior: https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/14.0/ (https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/225). With that done, perhaps we will be able to enable this behavior by default.
Needs re-investigation with pipewire :| There is also the question why upstreams don't enable it.