Bug 1922131

Summary: Audio playback suffers from clipping and skipping in Fedora Rawhide, kernel 5.11.
Product: [Fedora] Fedora Reporter: Lukas Ruzicka <lruzicka>
Component: pipewireAssignee: Wim Taymans <wtaymans>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: brunovern.a, wtaymans
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: pipewire-0.3.21-2.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-06 01:18:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
PipeWire messages from the affected system.
none
Pactl info output none

Description Lukas Ruzicka 2021-01-29 10:19:58 UTC
Created attachment 1751991 [details]
PipeWire messages from the affected system.

Description of problem:

When I updated to the latest updates of Fedora Rawhide, the audio playback has significantly worsened. The playback suffers from lots of interruptions (clipping) and the overall experience is very bad. 

This was observed in Gnome Session on Wayland, using Rhythmbox and Firefox. The situation was even worse in Rhythmbox than in Firefox.

The situation was worse when built-in audio interface (Intel Corporation Sunrise Point-LP HD Audio (rev21)) was used than when a usb audio device (M-Audio Fast Track) was used.

Pavucontrol shows correct sound devices and can modify its loudness.


Version-Release number of selected component (if applicable):

Kernel 5.11.0
PipeWire 0.3.20
The laptop is Lenovo ThinkPad T460s

How reproducible:

Always

Steps to Reproduce:
1. Boot the system.
2. Start Rhythmbox.
3. Listen to playback.

Actual results:

Lots of clipping.
The journal reports many of the following issues (see attachment):

===
- (alsa_output.usb-M-Audio_Fast_Track-00.analog-stereo-44) XRun! rate:1024/48000 count:1 time:174364907 delay:448 max:448
- Jan 29 10:33:52 localhost.localdomain pipewire[1932]: alsa-pcm 0x562efe980c28: snd_pcm_status error: Broken pipe
- Jan 29 10:34:23 localhost.localdomain pipewire-pulse[1744]: (PulseAudio Volume Control-22) client missed 1 wakeups
- Jan 29 10:34:50 localhost.localdomain pipewire[1932]: 1 events suppressed
- Jan 29 10:39:16 localhost.localdomain pipewire-pulse[1744]: (Rhythmbox-47) client missed 5 wakeups
- Jan 29 10:39:19 localhost.localdomain pipewire[1932]: 8 events suppressed
- Jan 29 10:50:56 localhost.localdomain pipewire[1932]: (Firefox-102) client too slow! rate:256/48000 pos:53689856 status:triggered
- Jan 29 10:50:56 localhost.localdomain pipewire[1932]: (Rhythmbox-117) client too slow! rate:256/48000 pos:53689856 status:triggered
===

pactl list: See attachments!

pactl info:

====
        Server String: /run/user/1000/pulse/native
        Library Protocol Version: 34
        Server Protocol Version: 34
        Is Local: yes
        Client Index: 131
        Tile Size: 65472
        User Name: lruzicka
        Host Name: localhost.localdomain
        Server Name: PulseAudio (on PipeWire 0.3.20)
        Server Version: 14.0.0
        Default Sample Specification: float32le 2ch 48000Hz
        Default Channel Map: front-left,front-right
        Default Sink: alsa_output.usb-M-Audio_Fast_Track-00.analog-stereo
        Default Source: alsa_input.usb-M-Audio_Fast_Track-00.analog-stereo
        Cookie: 51d1:2b61
====


pw-dump 0:

====
[
  {
    "id": 0,
    "type": "PipeWire:Interface:Core",
    "version": 3,
    "permissions": [ "r", "w", "x", "m" ],
    "info": {
      "cookie": 1372662625,
      "user-name": "lruzicka",
      "host-name": "localhost.localdomain",
      "version": "0.3.20",
      "name": "pipewire-0",
      "name": "pipewire-0",
      "change-mask": [ "props" ],
      "props": {
        "core.name": "pipewire-0",
        "context.profile.modules": "none",
        "core.daemon": true,
        "link.max-buffers": 16,
        "default.clock.rate": 48000,
        "default.clock.quantum": 1024,
        "default.clock.min-quantum": 32,
        "default.clock.max-quantum": 8192,
        "default.video.width": 640,
        "default.video.height": 480,
        "default.video.rate.num": 25,
        "default.video.rate.denom": 1,
        "mem.allow-mlock": true,
        "cpu.max-align": 32,
        "object.id": 0
      }
    }
  }
]
====


Expected results:
No clipping occurs when playing back audio.

Additional info:

See above.

Comment 1 Lukas Ruzicka 2021-01-29 10:20:52 UTC
Created attachment 1751992 [details]
Pactl info output

Comment 2 Wim Taymans 2021-02-04 10:38:36 UTC
0.3.21 has more conservative defaults for the buffer size, it should work better.

Comment 3 Fedora Update System 2021-02-04 10:39:36 UTC
FEDORA-2021-f394ea10e9 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-f394ea10e9

Comment 4 Fedora Update System 2021-02-05 01:27:33 UTC
FEDORA-2021-d6d23603c6 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-d6d23603c6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-d6d23603c6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Lukas Ruzicka 2021-02-05 10:58:08 UTC
Hello,
I can confirm that on the latest pipewire update, i.e. 0.3.21, the issue does not happen any more. Thank you.

Comment 6 Fedora Update System 2021-02-06 01:18:02 UTC
FEDORA-2021-d6d23603c6 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.