1

So I'm on Ubuntu 24.04 LTS and the sound was working just fine for many weeks and then about 2 weeks ago the sound just started acting funny, I can hear the sound and I can make out what people are saying but it's crackly, it's got static noise in it. If I remember correctly about 2 weeks ago there was an update and then my sound started acting funny so I believe an update to Ubuntu is what caused this, though I'm not sure.

I've been trying to fix this on my own and nothing has worked. So yeah I've tried a couple of solutions already and it hasn't worked.

But I've found this thread here Why do I hear crackling sounds on Ubuntu 24.04? How can I fix it? and I want to try Emanuele's solution but I'm a little confused.

So in Nautilus file manager you need to go into "Other Locations" (which you'll see under Trash) to be able to find the folder /usr/share/pipewire/pipewire-pulse.conf I need to specify this part cause at first I couldn't find this folder cause I was looking in my Home folder, if I got confused here then surely other people did as well.

Ok so here's where I'm not sure what to do exactly, I know Emanuele tells you what to do but I'm a newbie here, I really do need someone to hold my hand and walk me through this step by step. Will someone explain this to me like I'm 5?

I really do appreciate screenshots too, I'm a visual learner. Well, I can learn from text sure, but screenshots really do help though.

Please create instructions with screenshots that are easy for the average layman to understand? Thank you.

Edit: Also on this page Why do I hear crackling sounds on Ubuntu 24.04? How can I fix it? you'll see that Tung Dao Thanh Tung has created a script to automate the process. This is his script

# copy the default config to `/etc/pipewire` for editing
export newConf=/etc/pipewire/pipewire-pulse.conf
sudo mkdir -p $(dirname $newConf)
sudo cp /usr/share/pipewire/pipewire-pulse.conf $newConf

uncomment and change the value from 128 to 1024

sudo sed -i.bak 's/#pulse.min.quantum = 128/48000 # 2.7ms/pulse.min.quantum = 1024/48000/' $newConf

check if the sed command successfully changed the config, log should show 1024

cat $newConf | grep "pulse.min.quantum"

after changing the config, restart the audio services

systemctl --user restart wireplumber pipewire pipewire-pulse

I restart the computer too

So yeah I'm a newbie so how exactly do I do this, do I just copy all that text and paste it as is into my terminal and hit enter, is that what I do?

I mean if I could just use a script instead of having to use a text editor (I've literally never ever had to use nano or any text editor before, I've only been using Linux for about 3 years now) that would be excellent.

So you're supposed to set the value from 128 to 1024 but Amos Folarin said that he changed 128 to 2048 and that's what worked for him. And I'm assuming that I could implement this change in the script as well, you know just edit the script slightly, like this for example

# copy the default config to `/etc/pipewire` for editing
export newConf=/etc/pipewire/pipewire-pulse.conf
sudo mkdir -p $(dirname $newConf)
sudo cp /usr/share/pipewire/pipewire-pulse.conf $newConf

uncomment and change the value from 128 to 2048

sudo sed -i.bak 's/#pulse.min.quantum = 128/48000 # 2.7ms/pulse.min.quantum = 2048/48000/' $newConf

check if the sed command successfully changed the config, log should show 2048

cat $newConf | grep "pulse.min.quantum"

after changing the config, restart the audio services

systemctl --user restart wireplumber pipewire pipewire-pulse

I restart the computer too

Notice the three little edits in there to 2048? So I made a total of three edits to the script (where it said 1024, I changed it to 2048), but would this work?

I mean if I can use a simple script to do this that'd be much more user friendly.

Or if I need to use nano and edit the file, well I've never used nano before so please could you create step by step instructions that your average computer user can follow? I'm not a coder or programmer, please someone hold my hand and walk me through this? If I don't have detailed step by step instructions that tell me exactly what to do then I will get confused.

Edit: For instance @ysalmon says "Note that as mentioned in that file, one is supposed to make a custom version in /etc/pipewire or ~/.config/pipewire rather than editing /usr/share/pipewire/pipewire-pulse.conf."

I'm sitting here scratching my head going "So what am I supposed to do exactly?" Can someone walk me through this, please?

I haven't had sound in 2 weeks now. I'm desperate to get this finally fixed.

James1
  • 399

1 Answers1

0

How exactly do I edit /usr/share/pipewire/pipewire-pulse.conf?

Right:

Open a terminal.

Run in it:

sudo cp /usr/share/pipewire/pipewire-pulse.conf /usr/share/pipewire/pipewire-pulse.conf.res

With this command you copy the file /usr/share/pipewire/pipewire-pulse.conf to /usr/share/pipewire/pipewire-pulse.conf.res

If you want to restore it, you restore it with this command:

sudo cp /usr/share/pipewire/pipewire-pulse.conf.res /usr/share/pipewire/pipewire-pulse.conf

Once the backup is done, you edit it with this command in the same terminal:

sudo nano /usr/share/pipewire/pipewire-pulse.conf

In the file that opens, you look for the characters you want to change, you change them and with Ctrl + O, you save the file, with Ctrl + X, you close nano and with the following command in the same terminal you restart the system, to see if The changes are effective on your sound system:

sudo reboot
kyodake
  • 17,808