Bug 494664

Summary: While muted at 1% volume or higher, the system doesn't use the muted icon in the device connection osd notification
Product: [Plasma] plasmashell Reporter: Fernando M. Muniz <fernandommuniz>
Component: Audio Volume widgetAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: isma.af, kainz.a, kdedev, m, nate
Priority: NOR    
Version First Reported In: 6.3.1   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=496272
Latest Commit: Version Fixed In: 6.4.0
Sentry Crash Report:
Attachments: Notice the notification not displaying the muted icon.
This only appears when it's muted via 0% volume, but not when it's muted via button at 1% volume or more.
Number of steps to reproduce the issue.

Description Fernando M. Muniz 2024-10-13 13:55:02 UTC
Created attachment 174774 [details]
Notice the notification not displaying the muted icon.

If I set the speaker to mute while mantaining the volume at 1% or higher, connect the headphone, then disconnect it, it will show the volume percentage and the UNmuted volume icon, even though it's supposed to show the muted volume icon.
Comment 1 Fernando M. Muniz 2024-10-13 15:57:36 UTC
*** Bug 493894 has been marked as a duplicate of this bug. ***
Comment 2 Fernando M. Muniz 2024-11-14 16:52:17 UTC
There's also a weird design choice that there's both "mute by reducing volume to 0%" and "mute by pressing the mute button", which means that you can go from one mute type straight into the other.

Perhaps there should be two visually distinct mute icons, and perhaps I should file another bug for it?
Comment 3 Fernando M. Muniz 2024-11-16 18:34:09 UTC
(In reply to Fernando M. Muniz from comment #2)
> There's also a weird design choice that there's both "mute by reducing
> volume to 0%" and "mute by pressing the mute button", which means that you
> can go from one mute type straight into the other.
> 
> Perhaps there should be two visually distinct mute icons, and perhaps I
> should file another bug for it?

Created Bug 496272.
Comment 4 Nate Graham 2025-02-19 21:39:02 UTC
With more context about your system from other bug reports, I see what's going on now. The first OSD you see is a "you switched devices" OSD. And that OSD has a hardcoded icon, so not seeing a mute icon there is intentional. However then you see a second "Device is muted" OSD, and there the icon is wrong.

How did you get this second OSD to appear? Did you do anything specific after disconnecting your headphones?
Comment 5 Fernando M. Muniz 2025-02-19 21:45:14 UTC
(In reply to Nate Graham from comment #4)
> With more context about your system from other bug reports, I see what's
> going on now. The first OSD you see is a "you switched devices" OSD. And
> that OSD has a hardcoded icon, so not seeing a mute icon there is
> intentional. However then you see a second "Device is muted" OSD, and there
> the icon is wrong.
> 
> How did you get this second OSD to appear? Did you do anything specific
> after disconnecting your headphones?

I did nothing beyond what can be seem in the video.
1- Speaker muted (via button) at 50% volume.
2- Headphone gets plugged in (I've set it to mute [via button] at 100% volume before the recording).
3- Then I've unplugged the headphone.
Comment 6 Fernando M. Muniz 2025-02-19 21:47:50 UTC
Created attachment 178613 [details]
This only appears when it's muted via 0% volume, but not when it's muted via button at 1% volume or more.
Comment 7 Fernando M. Muniz 2025-02-19 21:50:19 UTC
As I've reported in Bug 496272 , there's two states of "mute".
Comment 8 Fernando M. Muniz 2025-02-19 21:55:16 UTC
In other words, the OSD shows the mute only when it's via 0% volume. It doesn't recognize when it's muted via button (Fn + F2)
Comment 9 Fernando M. Muniz 2025-02-19 21:55:41 UTC
(In reply to Fernando M. Muniz from comment #8)
> In other words, the OSD shows the mute only when it's via 0% volume. It
> doesn't recognize when it's muted via button (Fn + F2)

Fn + F1*
Comment 10 Fernando M. Muniz 2025-02-20 08:44:38 UTC
1- Have the speaker set to 0% volume
2- Have the headphone set to 100% volume but mute it with Fn+F1 (or press the speaker icon on the widget)
3- Connect and disconnect the headphone.

Result:
Only 0% volume is treated as a mute by the OSD.
Comment 11 Nate Graham 2025-05-19 20:46:01 UTC
Maybe someone else can take over; I can't make heads or tails of this.
Comment 12 Fernando M. Muniz 2025-05-20 12:18:18 UTC
Created attachment 181562 [details]
Number of steps to reproduce the issue.

1- Press Fn+F1 to mute while above 1% volume.
2- Connect and disconnect audio device.

Result:
The notification at the center of the screen doesn't have the mute icon on the speaker.
Comment 13 TraceyC 2025-05-20 20:59:26 UTC
I attempted to reproduce this on git-master and it looks like this was fixed.

Setup:
Volume is set above 1% for speakers and headphones
Device connection / disconnection pop-up notifications enabled
Clicked the icon next to the headphones in the audio applet to mute them
Disconnected the headphones

In this state the audio applet shows a speaker icon without a mute symbol, as expected, for the active speakers since they are not muted

Reproduction steps per comment # 10

1- Speaker muted (via button) at 50% volume.
Both speaker icons in applet and OSD audio notification have the mute icon when I mute this output

2- Headphone gets plugged in
Applet still has the muted audio icon. 
OSD notification for device connected shows the muted speaker symbol

3- Then I've unplugged the headphone.
Applet still has the muted audio icon.
OSD notification for device disconnected shows the muted speaker symbol

I don't know what merge request contains the affected code, but this will likely be fixed on your system with 6.4.0. Please let us know if this is not the case when 6.4.0 is installed on your system.