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

            Bug ID: 477522
           Summary: Visual feedback of currently playing audio in
                    plasma-pa with pipewire breaks bluetooth headset power
                    management and pipewire adaptive sample rate
    Classification: Plasma
           Product: plasma-pa
           Version: 5.27.9
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: applet
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected], [email protected]
  Target Milestone: ---

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug
symbols.
See
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Set `default.clock.allowed-rates = [ 48000 44100 96000 ]` as described in
https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-PipeWire#setting-sample-rates
and restart pipewire
2. No plasma PA clients available in `pw-top` (because the widget was never
opened after the pipewire restart):
Try playing audio and pause it: after some time bluetooth headset stops playing
white noise which means that it has entered power-saving state

Trying sample rate switch:

Play some audio with 44100 sample rate: (`pw-top`)
R   68   1024  44100  20.1us  27.4us  0.00  0.00    0    S16LE 2 48000
bluez_output.00_0A_45_0E_94_F7.1
R   61   1102  44100    ---    0.0us  ---   0.00    0    F32LE 2 44100  +
alsa_playback.mpv
The graph is running at 44100

Pause the audio and switch to the 48000 audio source:
The graph switches to 48000 sample rate
R   68   2048  48000  33.1us   7.9us  0.00  0.00    0    S16LE 2 48000
bluez_output.00_0A_45_0E_94_F7.1
I   61   1102  44100    ---    0.0us  ---   0.00    0    F32LE 2 44100  +
alsa_playback.mpv
R   74   3600  48000  13.6us  13.1us  0.00  0.00    0    F32LE 2 48000  +
Firefox

3. Open the plasma-pa widget. Observe that a new client appeared for the output
device:
R   68   1024  44100 102.3us  49.2us  0.00  0.00    0    S16LE 2 48000
bluez_output.00_0A_45_0E_94_F7.1
I   61   1102  44100    ---    0.0us  ---   0.00    0    F32LE 2 44100  +
alsa_playback.mpv
I   74   3600  48000  20.7us  18.9us  0.00  0.00    0    F32LE 2 48000  +
Firefox
R   82      1     25  50.2us   9.8us  0.00  0.00    0       F32LE 1 25  +
Plasma PA

pw-top shows the `Plasma PA` client to be in `R=RUNNING` state

The bluetooth headset is now playing white noise without stopping (power
management no longer works)
Play some audio with 44100 sample rate: (`pw-top`)
R   68   1024  44100  37.0us  28.0us  0.00  0.00    0    S16LE 2 48000
bluez_output.00_0A_45_0E_94_F7.1
R   61   1102  44100    ---    0.0us  ---   0.00    0    F32LE 2 44100  +
alsa_playback.mpv
I   74   3600  48000  20.7us  18.9us  0.00  0.00    0    F32LE 2 48000  +
Firefox
R   82      1     25  20.9us   6.3us  0.00  0.00    0       F32LE 1 25  +
Plasma PA
R   83      1     25   1.0ms   3.1us  0.04  0.00    0       F32LE 1 25  +
Plasma PA
The graph is running at 44100

Pause the audio and switch to the 48000 audio source:
R   68   1024  44100  60.7us  42.0us  0.00  0.00    0    S16LE 2 48000
bluez_output.00_0A_45_0E_94_F7.1
I   61   1102  44100    ---    0.0us  ---   0.00    0    F32LE 2 44100  +
alsa_playback.mpv
R   82      1     25  13.1us   7.8us  0.00  0.00    0       F32LE 1 25  +
Plasma PA
I   83      1     25 459.4us   3.7us  0.02  0.00    0       F32LE 1 25  +
Plasma PA
R   84   3600  48000  22.2us  28.9us  0.00  0.00    0    F32LE 2 48000  +
Firefox
The graph no longer switches to 48000 sample rate. The graph is stuck at the
last used sample rate

OBSERVED RESULT
`Plasma PA` client always stays in `R=RUNNING` state which prevents the graph
from switching sample rate and prevents bluetooth devices to entering the
suspend state

EXPECTED RESULT
`Plasma PA` client should be able to switch to `I=IDLE` state


SOFTWARE/OS VERSIONS
$ kinfo
Operating System: Arch Linux
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Kernel Version: 6.6.2-zen1-1-zen (64-bit)
Graphics Platform: offscreen
Processors: 16 × AMD Ryzen 7 5800H with Radeon Graphics
Memory: 23.1 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3050 Ti Laptop GPU/PCIe/SSE2

ADDITIONAL INFORMATION
pipewire 0.3.85
wireplumber 0.4.16

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

Reply via email to