View previous topic :: View next topic |
Author |
Message |
_sap n00b
Joined: 03 Jun 2022 Posts: 18
|
Posted: Tue Jan 21, 2025 3:45 pm Post subject: Pipewire playback crackling/stuttering problems |
|
|
Hi there. I'm having issues with audio playback crackling.
No matter if I use the inbuilt audio jack or a external usbc to 3.5mm adapter/dac playback is stuttery.
Here is my pipewire log: https://paste.c-net.org/EvaluateReplica
Log messages which include warnings are the following lines:
Code: |
[W][09071.736476] pw.node | [ impl-node.c: 1381 debug_xrun_graph()] (alsa_output.usb-Generic_AB13X_USB_Audio_20210926172016-00.analog-stereo-35) gra\
ph xrun not-triggered (0 suppressed)
[W][09071.736490] pw.node | [ impl-node.c: 1399 debug_xrun_graph()] (alsa_output.usb-Generic_AB13X_USB_Audio_20210926172016-00.analog-stereo-35) xru\
n state:0x7f38b5b11008 pending:1/2 s:9071884012799 a:9071884160757 f:9071884193558 waiting:147958 process:32801 status:triggered
[W][09071.736499] pw.node | [ impl-node.c: 1399 debug_xrun_graph()] (LibreWolf-69) xrun state:0x7f38b4d30008 pending:0/1 s:9071925849840 a:907188407\
0678 f:9071884109400 waiting:18446744073667772454 process:38722 status:triggered
|
So I personally think it has something to do with xrun, or possibly buffer under/overruns
pw-top reported Librewolf playing F32LE, but the alsa output S16LE
The reported wait time for Librewolf is about 16 - 80 us wait, 30-50 us busy
For the alsa output 60 - 250 us but mostly around 150 us wait, 15 - 45 us busy
Hardware details:
pactl list sinks:
Code: |
Sink #58
State: SUSPENDED
Name: alsa_output.pci-0000_c1_00.6.analog-stereo
Description: Family 17h/19h HD Audio Controller Analog Stereo
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: yes
Volume: front-left: 33424 / 51% / -17.55 dB, front-right: 32768 / 50% / -18.06 dB
balance -0.02
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.pci-0000_c1_00.6.analog-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "2"
alsa.card_name = "HD-Audio Generic"
alsa.class = "generic"
alsa.components = "HDA:10ec0295,f1110006,00100002"
alsa.device = "0"
alsa.driver_name = "snd_hda_intel"
alsa.id = "ALC295 Analog"
alsa.long_card_name = "HD-Audio Generic at 0x905c0000 irq 94"
alsa.mixer_name = "Realtek ALC295"
alsa.name = "ALC295 Analog"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.sync.id = "00000000:00000000:00000000:00000000"
api.alsa.card.longname = "HD-Audio Generic at 0x905c0000 irq 94"
api.alsa.card.name = "HD-Audio Generic"
api.alsa.path = "front:2"
api.alsa.pcm.card = "2"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "3"
device.api = "alsa"
device.class = "sound"
device.id = "50"
device.profile.description = "Analog Stereo"
device.profile.name = "analog-stereo"
device.routes = "2"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "Family 17h/19h HD Audio Controller"
node.name = "alsa_output.pci-0000_c1_00.6.analog-stereo"
node.nick = "ALC295 Analog"
node.pause-on-idle = "false"
object.path = "alsa:acp:Generic_1:3:playback"
port.group = "playback"
priority.driver = "1009"
priority.session = "1009"
factory.id = "19"
clock.quantum-limit = "8192"
client.id = "48"
node.driver = "true"
node.loop.name = "data-loop.0"
library.name = "audioconvert/libspa-audioconvert"
object.id = "58"
object.serial = "58"
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "2"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio2"
api.dbus.ReserveDevice1.Priority = "-20"
device.bus = "pci"
device.bus_path = "pci-0000:c1:00.6"
device.enum.api = "udev"
device.icon_name = "audio-card-analog-pci"
device.name = "alsa_card.pci-0000_c1_00.6"
device.nick = "HD-Audio Generic"
device.plugged.usec = "3123112"
device.product.id = "0x15e3"
device.product.name = "Family 17h/19h HD Audio Controller"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:c1:00.6/sound/card2"
device.vendor.id = "0x1022"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
device.string = "2"
Ports:
analog-output-speaker: Speakers (type: Speaker, priority: 10000, availability group: Legacy 3, availability unknown)
analog-output-headphones: Headphones (type: Headphones, priority: 9900, availability group: Legacy 2, not available)
Active Port: analog-output-speaker
Formats:
pcm
Sink #60
State: SUSPENDED
Name: alsa_output.usb-Generic_AB13X_USB_Audio_20210926172016-00.analog-stereo
Description: AB13X Headset Adapter Analog Stereo
Driver: PipeWire
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 19660 / 30% / -31.37 dB, front-right: 19660 / 30% / -31.37 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.usb-Generic_AB13X_USB_Audio_20210926172016-00.analog-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "0"
alsa.card_name = "AB13X USB Audio"
alsa.class = "generic"
alsa.components = "USB001f:0b21"
alsa.device = "0"
alsa.driver_name = "snd_usb_audio"
alsa.id = "USB Audio"
alsa.long_card_name = "Generic AB13X USB Audio at usb-0000:c3:00.3-1, full speed"
alsa.mixer_name = "USB Mixer"
alsa.name = "USB Audio"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.sync.id = "00000000:00000000:00000000:00000000"
api.alsa.card.longname = "Generic AB13X USB Audio at usb-0000:c3:00.3-1, full speed"
api.alsa.card.name = "AB13X USB Audio"
api.alsa.path = "front:0"
api.alsa.pcm.card = "0"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "3"
device.api = "alsa"
device.class = "sound"
device.id = "51"
device.profile.description = "Analog Stereo"
device.profile.name = "analog-stereo"
device.routes = "1"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "AB13X Headset Adapter"
node.name = "alsa_output.usb-Generic_AB13X_USB_Audio_20210926172016-00.analog-stereo"
node.nick = "AB13X USB Audio"
node.pause-on-idle = "false"
object.path = "alsa:acp:Audio:3:playback"
port.group = "playback"
priority.driver = "1009"
priority.session = "1009"
factory.id = "19"
clock.quantum-limit = "8192"
client.id = "48"
node.driver = "true"
node.loop.name = "data-loop.0"
library.name = "audioconvert/libspa-audioconvert"
object.id = "35"
object.serial = "60"
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "0"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio0"
api.dbus.ReserveDevice1.Priority = "-20"
device.bus = "usb"
device.bus-id = "usb-Generic_AB13X_USB_Audio_20210926172016-00"
device.bus_path = "pci-0000:c3:00.3-usb-0:1:1.0"
device.enum.api = "udev"
device.form_factor = "headset"
device.icon_name = "audio-headset-analog-usb"
device.name = "alsa_card.usb-Generic_AB13X_USB_Audio_20210926172016-00"
device.nick = "AB13X USB Audio"
device.plugged.usec = "7415681983"
device.product.id = "0x0b21"
device.product.name = "AB13X Headset Adapter"
device.serial = "Generic_AB13X_USB_Audio_20210926172016"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:08.3/0000:c3:00.3/usb5/5-1/5-1:1.0/sound/card0"
device.vendor.id = "0x001f"
device.vendor.name = "Walmart"
device.string = "0"
Ports:
analog-output: Analog Output (type: Analog, priority: 9900, availability unknown)
Active Port: analog-output
Formats:
pcm
|
#60 is the one I'm trying to use
Thank you for your time, I hope that is all the info you need.
I did not find anything useful on the internet, but maybe I was just searching for the wrong thing? |
|
Back to top |
|
|
_sap n00b
Joined: 03 Jun 2022 Posts: 18
|
Posted: Wed Jan 22, 2025 2:29 pm Post subject: |
|
|
Weirdest thing happened.
I decided to upgrade my kernel to 6.13, and chose to enable lazy preemption, and the cracking seems to be gone now.
I don't think it's a great outcome, as the system was not under load, and the 7640U processor is pretty modern and should not struggle with audio playback, so it must have been an issue in the pipewire code (or am I crazy for this?)
Well with preemption it works, so I guess I can't complain. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6201 Location: Dallas area
|
Posted: Wed Jan 22, 2025 4:55 pm Post subject: |
|
|
In your pipewire.conf, are you using rtkit or nice level?
Code: | # Uses realtime scheduling to boost the audio thread priorities. This uses
# RTKit if the user doesn't have permission to use regular realtime
# scheduling. You can also clamp utilisation values to improve scheduling
# on embedded and heterogeneous systems, e.g. Arm big.LITTLE devices.
{ name = libpipewire-module-rt
args = {
nice.level = -11
#rt.prio = 88
#rt.time.soft = -1
#rt.time.hard = -1
#uclamp.min = 0
#uclamp.max = 1024
}
flags = [ ifexists nofail ]
} |
_________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|