Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

[SOLVED] Audio stuttering after migration to pipewire

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
AECFXI
n00b
n00b
Posts: 35
Joined: Wed Nov 28, 2018 10:34 pm

[SOLVED] Audio stuttering after migration to pipewire

  • Quote

Post by AECFXI » Fri Mar 08, 2024 6:30 pm

About a year ago I attempted the pipewire migration but found that in some games or otherwise intensive system use, the audio would stutter. The stuttering behavior is moments of silence for a second to several seconds. When sound returns, it comes back correctly aligned video playback and there is no distortion during these events. Audio always returns. There is, separately from these events, short episodes of crackling from time to time.

The issue resisted all attempted fixes and was intermittent enough to just disregard, but recently when attempting to play Helldivers 2 via Steam this game was found to have extremely aggravated 'stuttering' where audio is mostly silent and cut out from the stutter effect during the tutorial mission.

Currently journalctl and dmesg appear clear of audio-related errors.

When revisiting the steps for using PipeWire for sound in the news publication, I find the only system error I am currently encountering:

Code: Select all

matthew@integrity ~ $ systemctl --global enable --now pipewire.socket pipewire-pulse.socket wireplumber.service
Failed to enable unit, unit /etc/systemd/user/sockets.target.wants/pipewire.socket does not exist.
Failed to enable unit, unit /etc/systemd/user/sockets.target.wants/pipewire-pulse.socket does not exist.
Failed to enable unit, file "/etc/systemd/user/pipewire-session-manager.service": Permission denied
Failed to enable unit, unit /etc/systemd/user/pipewire.service.wants/wireplumber.service does not exist.
My system profile is "default/linux/amd64/17.1/desktop/plasma/systemd/merged-usr (stable)".

emerge --info pulseaudio: https://pastebin.com/aByUQV9b

emerge --info pipewire: https://pastebin.com/fSAez86J

make.conf: https://pastebin.com/Sda7U2Qw

Next immediate step I'm looking at is resolving systemctl failing to enable the associated services.
Last edited by AECFXI on Tue Mar 12, 2024 10:20 pm, edited 1 time in total.
Top
AECFXI
n00b
n00b
Posts: 35
Joined: Wed Nov 28, 2018 10:34 pm

  • Quote

Post by AECFXI » Tue Mar 12, 2024 8:12 pm

I was able to solve this myself.

Firstly, the output from $ systemctl --global enable --now pipewire.socket pipewire-pulse.socket wireplumber.service was due to the --global flag failing. Replacing it with the --user flag eliminated the errors in the output, however this did not effect my system because those services had long been enabled since when I first migrated.

The actually effective solution for me was to adjust /etc/pipewire/pipewire.conf to have the following line:

Code: Select all

default.clock.min-quantum = 2048
Any lower power of 2 caused crackling and stuttering with Helldivers 2 playing, albeit each uptick of this value saw an improvement. With 2048, all audio crackling across the system has been completely eliminated along with the stuttering.

It is unclear if any of the other actions I performed helped resolve the issue. I have default.clock.rate = 192000 in pipewire.conf, and I set full preempt in my kernel config.
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Tue Mar 12, 2024 8:23 pm

I have mine set this way.

Code: Select all

    default.clock.min-quantum   = 16
    default.clock.max-quantum   = 2048
    default.clock.quantum-limit = 8192
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
AECFXI
n00b
n00b
Posts: 35
Joined: Wed Nov 28, 2018 10:34 pm

  • Quote

Post by AECFXI » Tue Mar 12, 2024 10:31 pm

Anon-E-moose wrote:I have mine set this way.

Code: Select all

    default.clock.min-quantum   = 16
    default.clock.max-quantum   = 2048
    default.clock.quantum-limit = 8192
That is also the default config file that I started out with, but by lowering default.clock.min-quantum even down to 1024 it re-introduces the crackling and stuttering on my system.

I can honestly not think of anything distinct about my setup that would be giving rise to needing to have such an aggressive min value. There was no unusual tinkering I did before developing stutter. My system specs are:

Gentoo kernel 6.6.13
Intel i7-12700K
MSI Mag Z690 Tomahawk
32gb DDR5 RAM
NVIDIA GeForce RTX 3080 12gb

Audio is going out through an HDMI cable to a Yamaha RX-V4A AV receiver.

I discovered the solution in this thread: https://www.reddit.com/r/linux_gaming/c ... _games_or/
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Tue Mar 12, 2024 10:49 pm

Problem might be in wireplumber section, instead of pipewire.
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
Post Reply

5 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic