Bug 452547 - More than one or no radio button may be checked if >= two PW modules with same sink exist
Summary: More than one or no radio button may be checked if >= two PW modules with sam...
Status: REOPENED
Alias: None
Product: plasma-pa
Classification: Unmaintained
Component: applet (other bugs)
Version First Reported In: 6.1.5
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-12 11:22 UTC by postix
Modified: 2025-12-17 01:27 UTC (History)
3 users (show)

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


Attachments
Screenshot. The arrow marks the unchecked outout over which the audio is played. (99.20 KB, image/png)
2022-04-12 11:22 UTC, postix
Details
Screenshot of opposite case. (99.46 KB, image/png)
2022-04-12 11:24 UTC, postix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2022-04-12 11:22:51 UTC
Created attachment 148118 [details]
Screenshot. The arrow marks the unchecked outout over which the audio is played.

STEPS TO REPRODUCE
1.  Have at least 2 audio sinks available in the applet
2. Keep the applet open (pin it)
2.  Output audio via sink1
3.  Disconnect sink1 (eg disconnect your bluetooth device)

OBSERVED RESULT
Audio plays now automatically via sink2 but the radio button is not checked.

EXPECTED RESULT
The radio button of the automatically chosen sink2 is checked.


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220409
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.2
Kernel Version: 5.17.1-1-default (64-bit)
Graphics Platform: Wayland
Comment 1 postix 2022-04-12 11:24:37 UTC
Created attachment 148119 [details]
Screenshot of opposite case.

The opposite can happen if you keep it open, check the radio button and attach a new output again: Now I got two checked radio buttons though only one output really plays audio.
Comment 2 postix 2023-05-22 19:31:58 UTC
Could just reproduce it again.
Comment 3 Noah Davis 2024-09-24 09:38:11 UTC
I was not able to reproduce this using the steps provided with my wireless earbuds or my external monitor.
Comment 4 Noah Davis 2024-09-24 11:31:19 UTC
It's not completely clear, but it could be that the sink to be removed must be the first sink. I cannot test that with my setup because the first sink (onboard audio) cannot be removed.
Comment 5 postix 2024-09-24 11:44:48 UTC
I see. I will try to reproduce it again later, now on Plasma 6.1.5 and also try to reproduce it using pw commands to manually add/remove sinks.
Comment 6 postix 2024-09-24 14:50:10 UTC
Looks like it has been fixed over the course of time. :)
Comment 7 postix 2024-09-24 15:22:25 UTC
I can reproduce it now definitely with the following steps (fish shell syntax):

set id0 (pactl load-module module-null-sink sink_name="Virtual0_Sink" sink_properties=device.description="Virtual-Speaker-0")
set id1 (pactl load-module module-null-sink sink_name="Virtual_Sink" sink_properties=device.description="Virtual-Speaker-1")
set id2 (pactl load-module module-null-sink sink_name="Virtual_Sink" sink_properties=device.description="Virtual-Speaker-2")

Select Virtual-Speaker-1 in the applet
Select Virtual-Speaker-2 in the applet

now both radio buttons of 1 and 2 are checked.

pactl unload-module $id1

Virtual-Speaker-1 is gone in the applet, but Virtual-Speaker-0 and -2 remain, both are unchecked!
Comment 8 Harald Sitter 2024-10-02 11:08:15 UTC
Default devices are identified by their name, if you have an overlapping name there's no way of correctly handling the situation.

https://freedesktop.org/software/pulseaudio/doxygen/structpa__server__info.html#acdb84917f3527479bcbd701c5ac76f04
Comment 9 postix 2024-10-02 11:26:07 UTC
(In reply to Harald Sitter from comment #8)
> Default devices are identified by their name, if you have an overlapping
> name there's no way of correctly handling the situation.
> 
> https://freedesktop.org/software/pulseaudio/doxygen/structpa__server__info.
> html#acdb84917f3527479bcbd701c5ac76f04

Yeah, makes sense, but both have a different id and a different description: Couldn't the unique id be used to differ between sinks?
Is this something (worth) to be reported upstream?
Comment 10 Harald Sitter 2024-10-02 11:27:46 UTC
You can always try reporting upstream.
Comment 11 postix 2025-12-17 01:27:56 UTC
> Default devices are identified by their name, if you have an overlapping
> name there's no way of correctly handling the situation.

I ran again into the situation w/o creating virtual sinks but by plugging in an external USB mic:

❯ pactl list sources | grep -i name:
        Name: alsa_output.pci-0000_06_00.6.HiFi__Speaker__sink.monitor
        Name: alsa_input.pci-0000_06_00.6.HiFi__Mic2__source
        Name: alsa_input.pci-0000_06_00.6.HiFi__Mic1__source <---- SELECTED
        Name: alsa_output.pci-0000_06_00.1.HiFi__HDMI4__sink.monitor
        Name: alsa_output.pci-0000_06_00.1.HiFi__HDMI3__sink.monitor
        Name: alsa_output.pci-0000_06_00.1.HiFi__HDMI2__sink.monitor
        Name: alsa_output.pci-0000_06_00.1.HiFi__HDMI1__sink.monitor
        Name: alsa_output.usb-R__DE_Microphones_R__DE_VideoMic_NTG_0471D467-00.analog-stereo.monitor
        Name: alsa_input.usb-R__DE_Microphones_R__DE_VideoMic_NTG_0471D467-00.analog-stereo <--- SELECTED

so clearly there's no overlapping name or is there something else specific I need to check?
I will report it upstream anyway too.  Feel free to close again if you don't think it's a Plasma issue.

# System info
Operating System: Fedora Linux 43
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.21.0
Qt Version: 6.10.1
Kernel Version: 6.17.12-300.fc43.x86_64 (64-bit)
Pipewire: 1.4.9