Created attachment 130159 [details] headphones plugged in SUMMARY When I connect headphones with microphone, only output device is automatically detected and selected and input device is not. STEPS TO REPRODUCE 1. Get headphones with a microphone 2. Open audio applet 3. Plug in heaphones OBSERVED RESULT When headphones are plugged in, new output is correctly detected and automatically switched from Speakers to Headphones and Ports menu appears. However input devices are not automatically detected. I have to move volume slider from 100% to some other value and then Ports menu appears and I can switch port to Headset Microphone. See attached video. Please ignore flickering as that was introduced by screen recorder. I also checked KCM where Ports select is available after plugging in, but Headset Microphone option is tagged as unplugged. When I move volume slider, unplugged tag is removed. EXPECTED RESULT Input Ports menu appears immediately when new device is plugged in and last used Port is automatically selected (as in input devices / ports). SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux KDE Plasma Version: 5.19.3 KDE Frameworks Version: 5.72.0 Qt Version: 5.15.0
Created attachment 130161 [details] microphone unplugged
Created attachment 130162 [details] microphone plugged
Looks like the port isn't getting automatically switched over. Can you install and open the "PulseAudio Volume Control" app and see if the same behavior is observed there too? If so, the issue may be deeper than the Plasma applet and live somewhere in PulseAudio itself. Regardless... > Headset Microphone option is tagged as unplugged. When I move volume slider, > unplugged tag is removed. That definitely feels like a bug in plasma-pa somewhere.
Just to clarify behaviour of KCM. When I completely unplug my headset, I can still see select with all the ports - plugged and unplugged as well. I assume that once I plug in my headphones, they are remembered and they are always among ports. I guess they are remembered in folder ~/.config/pulse/. Anyway I tried pavucontrol and it behaves exactly like Plasma. When I plug in my headset, output device is recognized and switched, input device remains in unplugged state until I move volume slider or until I select the unplugged device from ports select. So you were right, this looks like upstream issue. Although Gnome didn't have this problem. When I plugged in headset, popup menu appeared asking me whether I want: - Keep current setting, - Switch output to headphones and keep input as it is, - Switch both output to headphones and input to headset mic. So I guess somehow Gnome knows, that I plugged in headset with mic.
Interesting. Perhaps they are working around it in GNOME somehow. Either way, can you file a bug at https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/? The folks there will hopefully be able to narrow it down a bit. If they credibly say it's our bug, we can resume here. Thanks!
Reported at https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/941
I reopened the bug because Tanu at PulseAudio made a suggestion for Plasma: The input device isn't automatically switched, because PulseAudio doesn't know what you plugged in. The kernel tells PulseAudio only that "either headphones, a headset or a microphone was plugged in". In this situation Gnome asks the users what they plugged in. There's recent work to make the PulseAudio API better for this: !283 (merged). That's not yet available in any released version, but if KDE wants to implement something similar, that API is the way to do it (I have some unpublished fixes and additional documentation for it, hopefully I'll finish them soon). So please consider whether it's something you would like to do. Thanks.
*** Bug 432068 has been marked as a duplicate of this bug. ***
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3833
*** Bug 451655 has been marked as a duplicate of this bug. ***