Might be 3rd cracking audio stream thread I have started. There are many more that I did not start. Cracking is getting worse.
I have alsa, pipewire, and wireplumber installed. By cracking, I mean interruption sporadically of the audio stream not crackling noises added on top of the stream. I have 12 cpu intel i7. Some fixes say it can be caused by activities on other cpus. I see no other evidence of this interference.
Most supposed fixes say to edit pipewire.conf. They say to adjust the parameters below to various values:
The suggested values from the available sources touts values for each of these that vary over two orders of magnitude. I think they are just applying random magic with no logic and may happen to get lucky. I’ve tried to use a set of value for a couple of weeks to determine effectiveness. Then tried another set of values. I should not need to to this.
I’m looking for a determination that these are the parameters that will eliminate cracking. I’m also looking for some logic for the selection of candidate values.
I do not seem to have the cracking on other distros (arch, gentoo, rocky, popos, linux mint, ubuntu) or on windows but I don’t use these to nearly the extent that I use openSUSE. Been about 20 year user.
My other topic concentrated on whether I had been modifying the right pipewire.conf file.
I had been modifying the pipewire.conf file in ~/user.
Then I saw the other pipewire.conf files in root. Since modifying the user pipewire.conf had had no effect, I thought I had been modifying the wrong one.
It was confirmed that I had been modifying the right one.
This thread is about “how” to modify the ~/user pipewire.conf
With reference to the previous thread, I did not believe the cable change makes any sense as I said there. I tried the parameter values that were suggested there. I did try what was suggested there. I also modified pipewire-pulse.conf as suggested and tested that for a week or two. The noise has not gotten better and is perhaps worse (more frequent).
I have a 2nd sound card that is on my nvidia graphics card. I switched to that from the chipset on the motherboard for a while with no measurable improvement.
With respect to another suggestion in the previous thread, my alsa-vm file in root already had the suggested parameter set to 0 so I did not change it.
Hard to understand why it is getting worse without any updates or changes in configuration, without hardware degradation in the equation.
Is the crackling you describe evident only with certain applications? When crackling is evident, run pw-top and observe any changes in QUANT or errors being reported (associated with the audio playback).
Also, are you playing sound through speakers, a monitor, or wired/BT heaphones?
I ran a test. I played a youtube video that was cracking significantly in my host openSUSE in a vm in different linux distro. I listened to the vm for an hour with no cracking at all.
That distro also ran alsa, pipewire, and wireplumber.
I copied the key pipewire.conf settings from the vm distro into the pipewire.conf in user on my host. I restarted pipewire.
For a half hour now, I have had no crackles on the openSUSE host. The newly imported settings are below:
I noticed quite some degradation over the last few months in Tumbleweed, possibly related to changes in the kernel scheduler configs or simply more system load since apparently every new version of any app looks more bloated than the previous one.
Then there is bug 1237419 that shows up if you restart pipewire (e.g. for testing a new user config).
Hard to say how that translates to Leap 15.6, but the OP is not alone in noticing more crackling even with configs and apps that used to work.
I’m not observing any such behavior with my 6 year old laptop, newly running with Slowroll (effectively TW), but my audio needs are minimal. Listening to the odd YT video or streaming from a radio station via a browser for example. It may depend on the platform, audio hardware, and/or system loading as to how it impacts.
Of course when I run openSUSE Leap in a VM environment, I do expect some modest crackling (at least when adjusting volume, loading the system, and at the beginning of streaming perhaps).
The first one takes effect if the player app does not enforce a value of its own (e.g. on Gnome Totem is quite conservative with values around 4000).
The second one takes effect if a player app tries to set a value lower than that min-quantum.
Which is in effect should be evident from values shown by pw-top.
To me default.clock.quantum = 1024looks somewhat conservative but not extreme.
If selected apps only show crackling, you may have to increase min-quantum to a value near the default one, 32 is way too low to prevent crackling on most setups.
That said, I had to increase my settings too over the last few months on Tumbleweed, what worked most of the time with a quantum of 128 now needs 256 or even 512 and still occasionally shows a “click” here and there. As already written, I don’t know how that might translate to Leap 15.6 where there was no new kernel etc.
Of course all that is highly dependent on hardware speed and system load, so YMMV
I agree with this. It tallies with advice/findings I’ve seen in several similar discussions, although the OP seems to have suggested that the recommendations from the 2024 topic I linked to did not help with the crackling.
Thus far, after about 4 hours listening to youtube videos, I have not had one crack. That is a modern record. I entered the key parameter values from the other distro into pipewire.conf and restarted pipewire.
My system has been loaded by “boinc” running astronomy calculations
on 9 cpus in the background.
To me these audio parameters are just numbers to be put in a file. As a “has been” engineer this is an anathema to me. I really like to know how things work.
I really appreciate @OrsoBruno taking the time to write down a description of what these parameters are and what they are supposed to do. Maybe there is some logic to linux audio after all.
One other point, I run the same videos on my tv as I run on my pc without ever a crackle. This convinces me that it is not youtube and not my internet where the crackle originates. The tv and the pc get the same signal. Thus, I conclude the cause must be with the pc and I can eliminate youtube itself and my ip provider.
I know, “once an Engineer, forever an Engineer”
Those parameters are detailed in man pipewire.conf or docs.pipewire.org but I admit that pipewire is somewhat cryptic to the casual user.
Please be aware that pipewire scales the default.clock.quantum(default buffer lenght) by the default.clock.rate, so for a 192000 Hz stream (if included in default.clock.allowed-rates ) pipewire is going to use a 4096 “quantum” buffer length.
BTW, if you are now “good to go” with what appear to be the default openSUSE parameters, that likely means that you tweaked the system-wide parameters during previous attempts with inconsistent values: if that is the case, a “new user” created on that system will likely hear cracklings again.
I understand better now how this works. I do not recall changing the system pipewire.conf but I will look at that. There is no real chance of an additional user.
A question, though, I did tinker with /etc/pipewire/pipewire-pulse.conf at some time where I saw some suggested values. Could you clarify how that fits in?
pipewire includes a pulseaudio server so that applications that still need pulseaudio find a suitable interface to the sound system.
pipewire-pulse.conf includes configuration for that pulseaudio server, but AFAIK that should have no influence on the “main” pipewire configuration. It might be still relevant though if the player(s) you use have no native pipewire interface and still rely on pulseaudio for sound output.