Bug 434225

Summary: plasma-pa widget doesn't show active port selector sometimes
Product: [Unmaintained] plasma-pa Reporter: a.v.shkop
Component: appletAssignee: David Rosca <nowrep>
Status: RESOLVED WORKSFORME    
Severity: normal CC: long76.git, nate, plasma-bugs-null, sitter
Priority: NOR    
Version First Reported In: 5.18.5   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot without selector
Screenshot of the hamburger menu
Screenshot with the selector
pactl list sinks output with dock
pactl list sinks output without dock

Description a.v.shkop 2021-03-10 09:50:03 UTC
Created attachment 136551 [details]
Screenshot without selector

SUMMARY
plasma-pa widget doesn't show active port selector sometimes

STEPS TO REPRODUCE
1. Start the system without headphones connected
2. Connect the headphones
3. Open KDE Audio Volume widget

OBSERVED RESULT
No port selector appears on the widget

EXPECTED RESULT
Port selector should be present

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 20.04
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION
If I start the system with headphones connected, the selector appears.
I also created a bug on launchpad, not sure where this has to be fixed:
https://bugs.launchpad.net/ubuntu/+source/plasma-pa/+bug/1918409
Comment 1 Nate Graham 2021-03-10 17:24:30 UTC
The port selector is right there under the hamburger menu. As you can see from your screenshot, there is no room whatsoever to add a combobox to that layout. :)

FWIW this layout has been substantially changed in subsequent versions, but the port selector is still there in the hamburger menu.
Comment 2 a.v.shkop 2021-03-10 19:34:30 UTC
Created attachment 136562 [details]
Screenshot of the hamburger menu

Here's what I have under the hamburger menu, there's still no port selector. That's the same system, just dock station detached. As I wrote I have a dropdown in this layout in case I start the system with headphones plugged in. I can attach another screenshot with it if you'd like.
Comment 3 a.v.shkop 2021-03-10 19:38:08 UTC
Created attachment 136564 [details]
Screenshot with the selector
Comment 4 Nate Graham 2021-03-10 19:51:08 UTC
Ah, we must have added it later. I guess you'll need to upgrade.

As for whether or not the option will appear in that version in your particular case, I guess you'll have to upgrade and see. It's not really possible for me to say with Plasma 5.18 since so much has changed since then. Sorry.
Comment 5 a.v.shkop 2021-03-10 20:11:52 UTC
I see, not sure I want to move from LTS Ubuntu release right now. Issue is certainly not that critical, just a nuisance.

BTW, Isn't 5.18 also LTS release for plasma?
Comment 6 Nicolas Fella 2021-03-10 20:46:15 UTC
In 5.18 both the applet and KCM show a port combobox, but only if there's actually  more than one port to select between.

Can you attach the output of "pactl list sinks" with and without the docking station attached?
Comment 7 a.v.shkop 2021-03-11 07:08:25 UTC
Created attachment 136576 [details]
pactl list sinks output with dock
Comment 8 a.v.shkop 2021-03-11 07:08:45 UTC
Created attachment 136577 [details]
pactl list sinks output without dock
Comment 9 a.v.shkop 2021-03-11 07:10:52 UTC
I've attached outputs both with and without dock attached. In both cases I see two ports for 'Built-in Audio Analog Stereo' but port selector is not show in the applet, but it appears in KCM, as in the first screenshot.
Comment 10 a.v.shkop 2021-03-11 07:35:55 UTC
For me it looks like the port availability is not updated after I plug in the headphones. It seems that applet adds a port to the list only if it's available: https://github.com/KDE/plasma-pa/blob/Plasma/5.18/applet/contents/ui/ListItemBase.qml#L134. This explains why if I start the system with headphones plugged in I see the combobox. But if port was unavailable during the startup, this list should be updated I guess.
Comment 11 Nate Graham 2021-03-11 17:10:43 UTC
Thanks for the info and the investigation!
Comment 12 Misha Shaygu 2021-03-12 05:19:06 UTC
*** Bug 434272 has been marked as a duplicate of this bug. ***
Comment 13 Misha Shaygu 2021-03-12 05:19:56 UTC
i have the same issue
Comment 14 Misha Shaygu 2021-03-12 05:32:02 UTC
helps

pulseaudio -k

also try

rm -r ~/.config/pulse/
Comment 15 a.v.shkop 2021-03-12 07:14:13 UTC
(In reply to Misha Shaygu from comment #12)
> *** Bug 434272 has been marked as a duplicate of this bug. ***

Are you sure that this is the same issue? I use plasma 5.18, and after I plug in the headphones I can use them and hear the sound out of the headphones. My issue is that I'm not able to switch back to speakers through the applet, only via the KCM.

So in my case pusleaudio works as expected, it's the applet that for some reason does not show the combobox. In your case, since restarting the pulse daemon helps, this looks like a pulseaudio issue, not an applet.
Comment 16 Misha Shaygu 2021-03-12 07:20:36 UTC
(In reply to a.v.shkop from comment #15)
> (In reply to Misha Shaygu from comment #12)
> > *** Bug 434272 has been marked as a duplicate of this bug. ***
> 
> Are you sure that this is the same issue? I use plasma 5.18, and after I
> plug in the headphones I can use them and hear the sound out of the
> headphones. My issue is that I'm not able to switch back to speakers through
> the applet, only via the KCM.
> 
> So in my case pusleaudio works as expected, it's the applet that for some
> reason does not show the combobox. In your case, since restarting the pulse
> daemon helps, this looks like a pulseaudio issue, not an applet.

yeah, thanks!
Comment 17 Harald Sitter 2024-09-26 12:59:04 UTC
Is this still a problem?
Comment 18 Bug Janitor Service 2024-10-11 03:49:07 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 19 Bug Janitor Service 2024-10-26 03:46:59 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.