Bug 480306 - Audio balance is lost when setting volume to 0
Summary: Audio balance is lost when setting volume to 0
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_pulseaudio (show other bugs)
Version: 5.92.0
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL: https://gitlab.freedesktop.org/pipewi...
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-01-25 07:39 UTC by Antonio Orefice
Modified: 2024-09-08 20:52 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Orefice 2024-01-25 07:39:46 UTC
STEPS TO REPRODUCE
0. Set volume to 50%
1. Open Audio settings 
2. Click Balance to unlock multiple sliders (left and right for me)
3. Set each to a different value
4. Using plasma applet, set volume to 100
5. Set volume back to 50%

OBSERVED RESULT
Audio Balance setting is lost.

EXPECTED RESULT
Audio balance set to where you first put at point 3

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 

KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12+kde+r147
Comment 1 Antonio Orefice 2024-01-25 10:32:35 UTC
Easy fix would be to put a minimum and a maximum to allowed volume range when panning is in use.
If one of the slider reaches 100, don't move the others
If one of the slider reaches 0, don't move the others
Comment 2 fanzhuyifan 2024-01-25 18:48:36 UTC
On plasma 6, I can only reproduce this when the volume is set to 0 -- balance is lost afterwards. The balance is preserved when I set the volume to 100.

Another weird thing about the UI:

In system settings if you click balance then you can only move the individual sliders individually. However, now when you use the buttons or the applet, you can move the overall volume, which changes both sliders while preserving their ratio. 

If you click balance again, you get back one slider. If you move that slider and click balance again, sometimes you see balance is preserved. Sometimes the balance is lost. The behavior seems pretty inconsistent.
Comment 3 Antonio Orefice 2024-01-25 18:55:01 UTC
(In reply to fanzhuyifan from comment #2)
> On plasma 6, I can only reproduce this when the volume is set to 0 --
> balance is lost afterwards. The balance is preserved when I set the volume
> to 100.
> 
> Another weird thing about the UI:
> 
> In system settings if you click balance then you can only move the
> individual sliders individually. However, now when you use the buttons or
> the applet, you can move the overall volume, which changes both sliders
> while preserving their ratio. 
> 
> If you click balance again, you get back one slider. If you move that slider
> and click balance again, sometimes you see balance is preserved. Sometimes
> the balance is lost. The behavior seems pr
Is it (In reply to fanzhuyifan from comment #2)
> On plasma 6, I can only reproduce this when the volume is set to 0 --
> balance is lost afterwards. The balance is preserved when I set the volume
> to 100.

Weird, is it preserved even if you set, say, left to a very low value and right to a very high one?
Comment 4 fanzhuyifan 2024-01-25 18:57:08 UTC
(In reply to Antonio Orefice from comment #3)
> Weird, is it preserved even if you set, say, left to a very low value and
> right to a very high one?

The ratio seems roughly preserved -- there might be rounding errors though.
Comment 5 fanzhuyifan 2024-01-25 18:59:54 UTC
You could also share a link to a screencast of the problem you are seeing.
Comment 6 Antonio Orefice 2024-01-25 19:03:42 UTC
(In reply to fanzhuyifan from comment #5)
> You could also share a link to a screencast of the problem you are seeing.

yeah, ofc. but the problem seems pretty clear, we can avoid the bloat when plain text is enough ;)
Comment 8 Nate Graham 2024-02-15 17:47:10 UTC
So is there anything we can do ourselves to work around this, or is it a purely upstream bug we should wait for?
Comment 9 Harald Sitter 2024-02-16 00:03:19 UTC
Depends on how inclined we are to move from pulseaudio API to pipewire API. If we were to move to pipewire we could fix the bug. I think that only makes sense if pulseaudio doesn't manage to come up with a fix on their end though.

https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3799