Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crackling audio when easyeffects is active #3124

Open
tuxrinku opened this issue May 3, 2024 · 6 comments
Open

Crackling audio when easyeffects is active #3124

tuxrinku opened this issue May 3, 2024 · 6 comments

Comments

@tuxrinku
Copy link

tuxrinku commented May 3, 2024

EasyEffects Version

7.1.6

What package are you using?

Other (specify below)

Distribution

Ubuntu 24.04, using the package shipped with the distribution.

Describe the bug

I'm using Ubuntu 24.04 (coming from development release) but since then the audio has been crackling here and there. I'm using the liquorix kernel (6.8.7), but there was no problem at all with this kernel before the update to pipewire 1.0.4 that shipped with 24.04.

There is no problem with the regular ubuntu generic kernel. I don't have much experience debugging audio, and even less with pipewire itself

Expected Behavior

Audio is playing through easyeffects without any issue.

Debug Log

No response

Additional Information

No response

@violetmage
Copy link
Contributor

Just to confirm, the crackling only happens when running pipewire 1.0.4 on the liquorix kernel?

While the crackling is happening, what does pw-top show, especially in the "ERR" column?

@tuxrinku
Copy link
Author

tuxrinku commented May 3, 2024

Yes that's it. But at the same time, the audio works fine on generic kernel, still on pipewire 1.0.4. So the problem is affecting the combo liquorix kernel + pipewire 1.0.4 + easyeffects.

Running pw-top while having some audio didn't show anything special. I have some processses that have something different than 0 in the ERR column tho. See the attached screenshot
Screenshot from 2024-05-03 22-44-58

@violetmage
Copy link
Contributor

While the ERR column in pw-top can seem kind of vague, the vast majority of the time the ERR counter is incremented because of an xrun. xruns are also usually the cause of "crackling", "pops", and "random clicks".

From the pw-top manpage:

Xruns for drivers are when the graph did not complete a cycle. This can be because a node in the graph also has an Xrun. It can also be caused when scheduling delays cause a deadline to be missed, causing a hardware Xrun.

Xruns for followers are incremented when the node started processing but did not complete before the end of the graph cycle deadline.

Basically, for some reason the players with ERR values > 0 that you see in pw-top (easyeffects / alsa) were unable to finish processing in time, so you hear crackling. My guess is that liquorix is doing something to the realtime scheduling configuration of the kernel that doesn't play nicely with pipewire

@wwmm
Copy link
Owner

wwmm commented May 3, 2024

Based on your pw-top image the audio players you are running are requesting a very low latency (quantum) value. Not all systems handle such a low quantum well. Take a look at https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Guide-Latency and try to see if forcing a fixed and higher latency makes any difference. Is the quantum this low in the configuration that does not have the crackling?

@tuxrinku
Copy link
Author

tuxrinku commented May 4, 2024

Changing quantum setting to 256 seems to be working. The configuration is the same when it doesnt have the crackling, just a different kernel.
So basically quantum set at 64 with generic ubuntu kernel = no problem; quantum set at 64 with liquorix kernel = crackling audio. Both kernels are 6.8

@wwmm
Copy link
Owner

wwmm commented May 4, 2024

So basically quantum set at 64 with generic ubuntu kernel = no problem; quantum set at 64 with liquorix kernel = crackling audio. Both kernels are 6.8

This is curious. I would expect a kernel customized for responsiveness like liquorix to handle low latency values better than a generic kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants