https://bugs.kde.org/show_bug.cgi?id=511576

Hynek Schlindenbuch <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #9 from Hynek Schlindenbuch <[email protected]> ---
I encountered this issue as well and I looked into it. There is a workaround:
it seems that you can prevent the issue by setting the volume to 100% on the
external device that you're going to connect/disconnect dynamically (this works
for me in ArchLinux (laptop) and KDE Linux (VM)).

The issue can be reproduced easily in a VM with KDE Linux (as of version
202606290254):

- Boot into the VM.
- Pass an external sound device into it (USB headphones in my case).
- Make sure that the volume is not set to 100%.
- Remove the external sound device.
- Mute sound.
- Re-add the sound device.
- The sound should be unmuted (it doesn't seem to happen in 100% of cases, but
maybe 90%).

The cause of the issue is as follows:

- plasma-pa's AudioShortcutsService::handleSinkDataChanged has code that
unmutes audio on volume change. This is perfectly reasonable on its own. It was
added in this MR: https://invent.kde.org/plasma/plasma-pa/-/merge_requests/362
- It seems that Wireplumber (0.5.15) first creates the sink with 100% volume
and then it restores the previous volume (or sets default volume of 40%). This
is seen in plasma-pa as a volume change and the global mute is disabled because
of it. I confirmed this by adding qDebugs to log what happens in
AudioShortcutsService::handleNewSource and handleSinkDataChanged.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to