Bug 475007 - Changing the default device, doesn't always change which device gets it's volume modified.
Summary: Changing the default device, doesn't always change which device gets it's vol...
Status: RESOLVED UPSTREAM
Alias: None
Product: plasma-pa
Classification: Unmaintained
Component: applet (other bugs)
Version First Reported In: 5.27.8
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL: https://gitlab.freedesktop.org/pipewi...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-28 23:06 UTC by jakubby
Modified: 2023-11-18 11:26 UTC (History)
6 users (show)

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


Attachments
Wrong device gets volume adjusted. (1.19 MB, video/mp4)
2023-09-28 23:06 UTC, jakubby
Details
Manage to trigger it after I reloaded udev and triggered rules. (206.40 KB, video/mp4)
2023-09-29 00:09 UTC, jakubby
Details
Video of the volume control not changing the correct device. (664.66 KB, video/x-matroska)
2023-10-13 13:14 UTC, Zane
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jakubby 2023-09-28 23:06:47 UTC
Created attachment 161940 [details]
Wrong device gets volume adjusted.

SUMMARY
See video. I couldn't always trigger it.
Sometimes it's just a temporary thing in a delay manner(like in range of XXXms).

I tested it out outside of the video.
It's enough of a delay that I can click a button on my touchpad, move that same left hand to volumeUp/Down media key on my laptop(without much of a hurry).
In my case the media keys are on the same spot as F2/F3 so one hand can click the button, the other click the media keys.
I only noticed, because I connected my dongle.

Present in the video is htop with PSI stats.

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT
See video/summary.

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 jakubby 2023-09-28 23:08:41 UTC
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.5.0-1-amd64, debian trixie
(available in About System)
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10

Got carried away, generally it sometimes seems to work in a way that makes it so it never changes to the other device for volume switching.
Comment 2 jakubby 2023-09-29 00:09:38 UTC
Created attachment 161941 [details]
Manage to trigger it after I reloaded udev and triggered rules.
Comment 3 jakubby 2023-09-30 12:50:16 UTC
 when you manually change the output device
it won't automatically change the device which changes volume
until you manually change the volume

This is how I trigger it on my device:
STEPS TO REPRODUCE
1. Disconnect usb-c dongle.
2. Reboot/reload and trigger UDEV.
3. Connect usb-c dongle.
4. Change default device.
5. Volume won't change on default device until user manually moves the volume slider.
6. From now on volume change after switching a default device the dongle has a slight delay, before correct device gets it's volume change.
Comment 4 Zane 2023-10-02 14:37:29 UTC
This consistently happens for me.

For me to reproduce:
- Have output going via HDMI/DP. Changing volume works correctly.
- Plug in headphones
- Manually switch default output device to headphones.
- Audio output correctly switches to the headphones.
- Observe ear drums being blown out from headphones defaulting to 100%
- Rush to change volume using keyboard multimedia keys
- Observe HDMI volume being changed, not headphones.


Interestingly, if I change the device volume slider manually, everything starts working properly and the volume controls start targeting the correct device again.

This started the same time as https://bugs.kde.org/show_bug.cgi?id=473203, suggesting it might be a behavioural change in Pipewire.


SOFTWARE/OS VERSIONS
Linux: 6.1.54, NixOS 23.11.20230922.e35dcc0 (Tapir)
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Comment 5 Nate Graham 2023-10-11 18:05:39 UTC
Can you reproduce the issue when you switch devices using the "PulseAudio Volume Control" app, and not Plasma's audio volume widget or System Settings Page?
Comment 6 Zane 2023-10-13 13:12:02 UTC
(In reply to Nate Graham from comment #5)
> Can you reproduce the issue when you switch devices using the "PulseAudio
> Volume Control" app, and not Plasma's audio volume widget or System Settings
> Page?

I can! Exactly the same behaviour. I recorded it, I'll attach the video.
Comment 7 Zane 2023-10-13 13:14:52 UTC
Created attachment 162276 [details]
Video of the volume control not changing the correct device.
Comment 8 Nate Graham 2023-10-13 19:11:03 UTC
Ok thanks. That means this is an upstream PulseAudio or PipeWire bug. So whichever of those you're using, please report it to them at either https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues or https://gitlab.freedesktop.org/pipewire/pipewire/-/issues. Thanks again!