Bug 424273 - headphones/headset/mic selector dialog on plug event
Summary: headphones/headset/mic selector dialog on plug event
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Audio Volume widget (show other bugs)
Version: 6.2.4
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 432068 451655 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-07-16 07:06 UTC by elman
Modified: 2024-12-18 21:09 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
headphones plugged in (244.27 KB, video/webm)
2020-07-16 07:06 UTC, elman
Details
microphone unplugged (31.98 KB, image/png)
2020-07-16 07:07 UTC, elman
Details
microphone plugged (30.23 KB, image/png)
2020-07-16 07:07 UTC, elman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description elman 2020-07-16 07:06:19 UTC
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
Comment 1 elman 2020-07-16 07:07:03 UTC
Created attachment 130161 [details]
microphone unplugged
Comment 2 elman 2020-07-16 07:07:25 UTC
Created attachment 130162 [details]
microphone plugged
Comment 3 Nate Graham 2020-07-17 03:18:02 UTC
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.
Comment 4 elman 2020-07-17 08:10:29 UTC
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.
Comment 5 Nate Graham 2020-07-17 14:18:21 UTC
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!
Comment 7 elman 2020-07-22 20:37:05 UTC
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.
Comment 8 Harald Sitter 2024-10-03 12:05:01 UTC
*** Bug 432068 has been marked as a duplicate of this bug. ***
Comment 10 Harald Sitter 2024-10-03 23:38:08 UTC
*** Bug 451655 has been marked as a duplicate of this bug. ***