Bug 428778

Summary: Microphone tray applet's icon not updated unless all mics are muted--not just the current one
Product: [Plasma] plasmashell Reporter: Daniel <daniel-other+kdebug>
Component: Microphone Indicator widgetAssignee: Kai Uwe Broulik <kde>
Status: CONFIRMED ---    
Severity: normal CC: kde, nate, oded, pavol, plasma-bugs, postix
Priority: NOR Keywords: usability
Version First Reported In: 5.20.2   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=428757
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: wrong icon is displayed
same as other attachment, this time encoded with h264 because browsers don't support h265
mute icon not shown in applet tray despite all (shown) mics beeing muted.
speaker mute icon shown in plasma 5.24.4, but not all speakers are muted

Description Daniel 2020-11-07 10:45:34 UTC
Created attachment 133104 [details]
wrong icon is displayed

SUMMARY
Under certain circumstances, the microphone tray icon is not updated to the mute-icon when it should be.

STEPS TO REPRODUCE
1. Have a application requesting mic input running. Have a microphone already connected.
2. Plugin a second microphone or a headset.
3. Mute microphone by scrolling on the mic icon.

OBSERVED RESULT
The mic tray icon shows 0% volume.

EXPECTED RESULT
It should show the muted-mic icon instead.
Comment 1 Nate Graham 2021-02-03 22:09:58 UTC
Looks like there is no video in that attachment. Can you attach a new one? Thanks!
Comment 2 Daniel 2021-02-03 22:56:38 UTC
Created attachment 135406 [details]
same as other attachment, this time encoded with h264 because browsers don't support h265
Comment 3 Nate Graham 2021-02-04 00:24:57 UTC
The microphone indicator icon only changes to show a muted state when *all* mics are muted, not only the current one.

This may not be ideal though. I've found myself slightly confused by it in the past too.
Comment 4 Daniel 2021-02-04 13:08:05 UTC
Created attachment 135422 [details]
mute icon not shown in applet tray despite all (shown) mics beeing muted.

Just a quick note that "hidden" microphones aren't excluded when plasma sets the icon. (hidden mics available). See attachment, a hidden device is the mic headset jack.
Comment 5 Oded Arbel 2021-12-12 19:52:53 UTC
Cannot reproduce with current neon unstable: with more than one microphone connected and not muted, scrolling on the microphone icon in the system tray (changing the volume of the first microphone) does not cause the microphone icon to show the muted icon. With all other microphones muted, scrolling on the microphone icon, setting the volume down to zero, does cause the icon to show the muted microphone icon.
Comment 6 Daniel 2021-12-12 20:05:03 UTC
(In reply to Oded Arbel from comment #5)
> with more than one microphone
> connected and not muted, scrolling on the microphone icon in the system tray
> (changing the volume of the first microphone) does not cause the microphone
> icon to show the muted icon. 

So you reproduced it :)

> 3. Mute microphone by scrolling on the mic icon.
> OBSERVED RESULT
> The mic tray icon shows 0% volume.
> EXPECTED RESULT
> It should show the muted-mic icon instead.

I think the same behaviour as with the speakers should be done: muting to 0% should show the mute icon (and mute all microphones, different from speaker behaviour). Having a zero percent icon is very confusing as its unclear wether the mic is on or off.
Comment 7 Oded Arbel 2021-12-12 20:45:48 UTC
(In reply to Daniel from comment #6)
> So you reproduced it :)
> 
> > 3. Mute microphone by scrolling on the mic icon.
> > OBSERVED RESULT
> > The mic tray icon shows 0% volume.
> > EXPECTED RESULT
> > It should show the muted-mic icon instead.
> 
> I think the same behaviour as with the speakers should be done: muting to 0%
> should show the mute icon (and mute all microphones, different from speaker
> behaviour). Having a zero percent icon is very confusing as its unclear
> wether the mic is on or off.

Ok, then I definitely could not reproduce a problem :-) The current behavior of the speaker icon is the same as the microphone icon - it shows a mute icon only when all devices are muted.

If you have multiple output devices and only one of them is muted, the speaker icon still doesn't show a mute icon. I think this is the Right Thing - it doesn't make sense to show the mute icon when some devices are not actually muted. The other alternative, that I think you suggested, that lowering the volume on one device to 0% mutes all others automatically (which not lowering their volume?) I think is a bad UX and doesn't allow for the use case of actually wanting one device muted but not others.
Comment 8 Daniel 2021-12-12 21:35:36 UTC
(In reply to Oded Arbel from comment #7)
> Ok, then I definitely could not reproduce a problem :-) 

Sorry, it is late and I'm tired :-) Comment #4 is important for reproducing it: Now that I think about it, the bug is originally about unmuted, **inactive devices** which cause the 0-vol icon beeing shown. (I just reproduced this bug on Plasma 5.23.4. btw)

> If you have multiple output devices and only one of them is muted, the
> speaker icon still doesn't show a mute icon.

At least on Plasma 5.23.4 this is not the case, the mute icon is indeed shown (see attachment I just added).

On the general behaviour of the icon after scrolling to zero volume:
Showing zero vol. icon = bad: you can't see at quick glance that mic is muted (which is important)
Showing mute icon = good: you can quickly see that mic is muted; bad: but not all mics might be muted (which is important to know too)
Showing mute icon + muting all mics (equivalent to clicking on mic icon itself) = good: you can quickly see all mics are muted.

Also I want to note that even if the 0% vol icon is shown, the "hud" volume info which appears in the center of the screen tells that the mic has been muted together with a muted icon.

>  that lowering the volume on one device to 0% mutes all others automatically (which not lowering their volume?) I think is a bad UX and doesn't allow for the use case of actually wanting one device muted but not others.

This use case could still be done by opening the volume applet and adjusting it there. I'm talking about the volume control using scrolling above the tray icons.
Comment 9 Daniel 2021-12-12 21:37:13 UTC
Created attachment 144491 [details]
speaker mute icon shown in plasma 5.24.4, but not all speakers are muted
Comment 10 Oded Arbel 2021-12-13 22:29:27 UTC
(In reply to Daniel from comment #8)
> Sorry, it is late and I'm tired :-) Comment #4 is important for reproducing
> it: Now that I think about it, the bug is originally about unmuted,
> **inactive devices** which cause the 0-vol icon beeing shown. (I just
> reproduced this bug on Plasma 5.23.4. btw)
> 
> > If you have multiple output devices and only one of them is muted, the
> > speaker icon still doesn't show a mute icon.
> 
> At least on Plasma 5.23.4 this is not the case, the mute icon is indeed
> shown (see attachment I just added).

Ok, you are correct - my previous repro was incomplete and I skipped some things.

Here's the current situation:

* Output devices:
1. Speaker icon shows "muted speaker" if the currently selected output device ("default"?) is muted or set to zero volume (if the current device is unmuted while still at zero volume, the speaker icon still shows "muted").
2. Setting the volume to zero sets the mute flag, and changing the volume of a muted device (even when not at zero) unmutes the device. This is a Plasma behavior as doing the same with the pulse audio control panel doesn't show the automatic muting/unmuting behavior.
3. Selecting a different audio device as the new "default" immediately changes the speaker icon to show "mute" or not "mute" depending on the status of the new default device.

I'm not 100% sure I like this behavior as again it means that you might have audio playing even when the speaker shows the system is muted, but without a more elaborate visual scheme, lets call this "consistent" for now.

* Input devices:
1. Microphone icon shows "muted microphone" only if all input devices are muted. If one of the input devices is at zero volume but not muted, than the microphone icon will not show "muted".
2. Setting the volume to zero sets the mute flag and setting the volume to non-zero unsets the mute flag. So if all other input devices are muted, scrolling on the microphone icon to set the volume to zero will cause the "muted microphone" icon to be shown.
3. Because of (1), selecting a different input device does not change the status of the microphone icon, but setting any input device to non-mute (even if at zero volume) will cause the icon to show "not muted".

I don't have any hidden input devices, but your assertion that they have the same effect as shown devices (i.e. that having any non-muted prevents the microphone icon from showing "mute") seems logical.

I thought about this issue a bit and I'm going to say that I think this behavior is acceptable and better than fixing the input behavior (1) to be the same as output behavior (1):
- Unlike output where it is very clear if an application is playing something to a non-default audio device, so the meaning of the "muted speaker" icon is not critical, when an app records it isn't very clear to the user that this is happening.
- Also, unintended output is much less likely to cause issues to the user, while if the user thinks their microphone is muted but an application is recording from another viable microphone - it might get the user into serious trouble, like broadcasting unintended speech to a conference call or something.

I like the behavior of "if the microphone icon doesn't show the mute icon, then you have some live microphone". As for scrolling down on the microphone icon setting all microphones to mute - basically the same effect as clicking on the microphone icon - I wouldn't mind having that edge case implemented (just on the microphone system tray icon), but as the functionality you need is already available on the same icon with a simple click (which I'd think is even more discoverable than scroll) and if the "scroll to 0 on system tray icon should mute all microphones even if scroll to 0 on the pa applet doesn't" behavior is a hassle to implement, I'm OK with leaving it like this.