Opening certain sites leads to crackling on audio

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
exxonin
Level 2
Level 2
Posts: 95
Joined: Tue Aug 30, 2016 1:37 am

Opening certain sites leads to crackling on audio

Post by exxonin »

When I open certain sites, crackling on audio starts. I do have to close the browser and reopen it to solve the problem. Why is this?
Now it even happens on the linux mint site! I did close a tab on my browser where I was watching video, and now the crackling on my headphones has stopped!

So, I was watching video, no crackling, but opening certain sites on another tab at the same time might cause crackling.
Last edited by SMG on Tue Apr 26, 2022 7:05 pm, edited 1 time in total.
Reason: Locking 3 yr old topic.
gibbs1984
Level 5
Level 5
Posts: 825
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Re: Opening certain sites leads to crackling on audio

Post by gibbs1984 »

Wow, didn't think I'd see someone else with this issue, I have it too but I just thought it was my extremely old speakers playing up, will be getting some new ones soon but maybe it's not the speakers and this issue will persist with new speakers.

Sorry, don't know how to fix the issue apart from restarting the browser but hopefully someone will know.

Let's try to narrow it down.

I use Firefox when this happens.
Seems to happen either on Facebook or YouTube, might be other apps though.
Using Mint 19.1 Cinnamon 64bit.
Linux Mint 20.3 (Cinnamon) 64bit.
exxonin
Level 2
Level 2
Posts: 95
Joined: Tue Aug 30, 2016 1:37 am

Re: Opening certain sites leads to crackling on audio

Post by exxonin »

It is the combination of running video, and simultaneously opening certain sites on other tabs. This triggers the crackling on, when shutting down the video or closing the tab it is active on, the irritating tingling stops! I did try many headphones, but that is not it! If I unplug the headphones, the rustling is also present over the laptop speakers!
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Opening certain sites leads to crackling on audio

Post by MrEen »

Hi gibbs1984 and exxonin.

I have a somewhat usual fix for crackling audio but I am not certain it will help in your cases. This fix is normally for those with crackling audio at all times, but your cases are unique. It's entirely reversible so we should try it anyway.

In the terminal enter xed admin:///etc/pulse/default.pa (if using Mint 18.x or 17.x use gksudo xed /etc/pulse/default.pa instead.)

Find the line that says load-module module-udev-detect and change it to load-module module-udev-detect tsched=0

Save the file, then run pulseaudio -k in the terminal and test your sound.

Let me know if that stops the issue from happening.
exxonin
Level 2
Level 2
Posts: 95
Joined: Tue Aug 30, 2016 1:37 am

Re: Opening certain sites leads to crackling on audio

Post by exxonin »

Thus far MrEen your solution works fine! Thank you so much! :D
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Opening certain sites leads to crackling on audio

Post by MrEen »

You're quite welcome, exxonin.
gibbs1984
Level 5
Level 5
Posts: 825
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Re: Opening certain sites leads to crackling on audio

Post by gibbs1984 »

Thanks MrEen,

I've done what you've said, the crackling sound was only random (at least once a week though) so I'll keep this thread updated with whether it happens again or not within a few weeks.
Linux Mint 20.3 (Cinnamon) 64bit.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Opening certain sites leads to crackling on audio

Post by MrEen »

Sound good, gibbs1984. Good luck. :)
gibbs1984
Level 5
Level 5
Posts: 825
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Re: Opening certain sites leads to crackling on audio

Post by gibbs1984 »

Been nearly 2 weeks now and I haven't had the crackling noise once since doing this fix.
Linux Mint 20.3 (Cinnamon) 64bit.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Opening certain sites leads to crackling on audio

Post by MrEen »

That's great, gibbs1984!

So glad that fix worked for both of you. :D
Norbert
Level 1
Level 1
Posts: 9
Joined: Wed Jul 09, 2014 5:23 pm

Re: Opening certain sites leads to crackling on audio

Post by Norbert »

gibbs1984 wrote: Sun Feb 17, 2019 7:13 amWow, didn't think I'd see someone else with this issue, [...]
Hm, I've actually had this problem with Linux (Mint) for years...
It's one of those things where I'm wondering why it still hasn't been fixed.
I'll try the fix/workaround mentioned in this thread, and I'll add it to my list of things to run after (re)installing the OS.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Opening certain sites leads to crackling on audio

Post by MrEen »

Hi Norbert.

Some years ago pulseaudio switched from interrupt based scheduling to timer based scheduling. Some systems just don't work well with this newer setting, so that modification is necessary. I honestly don't know if computer age has anything to do with the likelihood of needing the modification.

Hope it resolves your issue as well. Good luck.
User avatar
PaganDegree
Level 1
Level 1
Posts: 12
Joined: Sat Jan 23, 2021 11:35 pm

Re: Opening certain sites leads to crackling on audio

Post by PaganDegree »

@MrEen
Had I just done a little more and better google searching, I would have found this instead of buying a USB SoundBlaster for my PC. This whole time I thought my NUC had a faulty audio port, and it was this. Just wow. Anyway, just wanted to say thanks. I found this today because I built myself a new Linux Mint workstation and was shocked to experiencing audio crackling issues from the start.
:shock:
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Opening certain sites leads to crackling on audio

Post by MrEen »

You're welcome PaganDegree. And welcome to the forum. :D

And yeah, it sucks such a little thing like this can cause issues, and can be a bear to figure out the cause.
User avatar
PaganDegree
Level 1
Level 1
Posts: 12
Joined: Sat Jan 23, 2021 11:35 pm

Re: Opening certain sites leads to crackling on audio

Post by PaganDegree »

@MrEen
Incidently, this is still an issue on these platforms:
Nuc8i7HVK (realtek ??) - Mint 19.3
Nuc8i7HVK (realtek ??) - Mint 20.1
ASROCK Z490M Pro4 (Realtek ALC1200 Audio Codec) - Mint 20.1

Just wanted to add details for clarity and your fix appears so far to work on all of them. Maybe Realtek audio has the biggest problem?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Opening certain sites leads to crackling on audio

Post by MrEen »

PaganDegree wrote: Sun Jan 24, 2021 12:28 amMaybe Realtek audio has the biggest problem?
Don't get me started on Realtek! :lol:

A new sound fix for many people is to actually blacklist the realtek module. There's a built-in generic parser in Linux that can do the main lifting instead of the codec specific parser. They may miss out on some options that would have previously been there, but at least it works!

Thanks to another user here (hglee) I discovered this recently and it's helped dozens of people with all manner of sound issues already.

To be fair, this could be more of an Ubuntu problem than a Realtek problem. It is Ubuntu that issues "fixes" that may have created this mess. I have no idea if they get input from Realtek before implementing them.
User avatar
PaganDegree
Level 1
Level 1
Posts: 12
Joined: Sat Jan 23, 2021 11:35 pm

Re: Opening certain sites leads to crackling on audio

Post by PaganDegree »

@MrEen
If there is anything I can help you with while working on this issue let me know. Happy to support the Mint community if I can.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Opening certain sites leads to crackling on audio

Post by MrEen »

PaganDegree wrote: Sun Jan 24, 2021 12:54 am @MrEen
If there is anything I can help you with while working on this issue let me know. Happy to support the Mint community if I can.
There isn't really anything we can do. A bug report at Ubuntu would be the proper place to report it, but I don't believe it would lead anywhere. When Mint 21 comes out next year, there will be a new version of PulseAudio that might fix this. A bug report at PulseAudio might be even better. I just don't know if any developers care about this. I think as far as they're concerned, adding the tsched=0 is the fix.

That ALC1200 codec has been an issue mentioned here recently. Or was it 1220? I'm not sure at the moment. But one of those had a few people fixed by blacklisting the realtek module (which indicates an issue in the kernel, not PulseAudio) but some didn't get fixed with it. There seems to be no rhyme or reason to which systems get fixed with which hacks. Frankly, this is starting to wear on me. But I've gone through these feelings a few times now, and I usually bounce back after venting some similar to what I've done here (though not always in such a family-friendly way) so I expect the same to happen again.

But I do thank you for the offer! If you wanted to persue this, you could follow either of the above links and see if it leads anywhere. I've always figured Ubuntu has such a huge user base that there wasn't much point in suggesting people go there to report these things, as there must be plenty of Ubuntu users affected similarly who would then use their channels to report this stuff. We just have to wait for the fixes to get implemented and sent down the chain.

And while I'm venting, I'll just mention that if any of your systems have Radeon HDMI audio, you can expect that to periodically break. Again, by the time Mint 21 rolls around, I'm hoping that stops happening. We've been going through some big changes in the entire audio subsystem from the past year and change, with more coming, so there are still some teething pains.
phase7
Level 1
Level 1
Posts: 9
Joined: Sun Aug 11, 2019 11:21 pm

Re: Opening certain sites leads to crackling on audio

Post by phase7 »

The solution worked for me too.
I was facing this issue on my Linux Mint 20.2 x86_64, Kernel: 5.11.0-25-generic - youtube on firefox 90.0.2
User avatar
palimmo
Level 4
Level 4
Posts: 392
Joined: Sun Feb 03, 2013 9:55 am

Re: Opening certain sites leads to crackling on audio

Post by palimmo »

MrEen wrote: Sun Feb 17, 2019 1:43 pm Hi gibbs1984 and exxonin.

I have a somewhat usual fix for crackling audio but I am not certain it will help in your cases. This fix is normally for those with crackling audio at all times, but your cases are unique. It's entirely reversible so we should try it anyway.

In the terminal enter xed admin:///etc/pulse/default.pa (if using Mint 18.x or 17.x use gksudo xed /etc/pulse/default.pa instead.)

Find the line that says load-module module-udev-detect and change it to load-module module-udev-detect tsched=0

Save the file, then run pulseaudio -k in the terminal and test your sound.

Let me know if that stops the issue from happening.
Similar problem with LM 20.2 Cinnamon. The problem occurs randomly when using Firefox and watching/listening something.
Hope this will fix. I'll keep you posted.
Btw: what's the meaning of this workaround? Here a few infos: https://wiki.archlinux.org/title/PulseA ... leshooting

Thanks!

Code: Select all

~$ inxi -Fzx
System:
  Kernel: 5.11.0-41-generic x86_64 bits: 64 compiler: N/A 
  Desktop: Cinnamon 5.0.7 Distro: Linux Mint 20.2 Uma 
  base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: LENOVO product: 81NC v: Lenovo IdeaPad S340-15API 
  serial: <filter> 
  Mobo: LENOVO model: LNVNB161216 v: SDK0J40700 WIN serial: <filter> 
  UEFI: LENOVO v: AMCN29WW(V1.12) date: 01/27/2021 
Battery:
  ID-1: BAT1 charge: 48.7 Wh condition: 50.1/52.5 Wh (95%) model: 0x43 0x65 
  0x6C 0x78 0x70 0x65 0x 0x4C 0x31 0x38 0x43 0x33 0x50 0x5250 
  status: Unknown 
CPU:
  Topology: Quad Core model: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx 
  bits: 64 type: MT MCP arch: Zen+ rev: 1 L2 cache: 2048 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 33537 
  Speed: 1271 MHz min/max: 1400/2100 MHz Core speeds (MHz): 1: 1377 2: 1267 
  3: 1397 4: 1233 5: 1397 6: 1380 7: 1407 8: 1397 
Graphics:
  Device-1: AMD Picasso vendor: Lenovo driver: amdgpu v: kernel 
  bus ID: 04:00.0 
  Display: x11 server: X.Org 1.20.11 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: AMD Radeon Vega 8 Graphics (RAVEN DRM 3.40.0 
  5.11.0-41-generic LLVM 12.0.0) 
  v: 4.6 Mesa 21.0.3 direct render: Yes 
Audio:
  Device-1: AMD Raven/Raven2/Fenghuang HDMI/DP Audio vendor: Lenovo 
  driver: snd_hda_intel v: kernel bus ID: 04:00.1 
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor 
  vendor: Lenovo driver: snd_pci_acp3x v: kernel bus ID: 04:00.5 
  Device-3: AMD Family 17h HD Audio vendor: Lenovo driver: snd_hda_intel 
  v: kernel bus ID: 04:00.6 
  Sound Server: ALSA v: k5.11.0-41-generic 
Network:
  Device-1: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter 
  vendor: Lenovo driver: ath10k_pci v: kernel bus ID: 02:00.0 
  IF: wlp2s0 state: up mac: <filter> 
  Device-2: Qualcomm Atheros type: USB driver: btusb bus ID: 3-2:2 
Drives:
  Local Storage: total: 953.87 GiB used: 122.80 GiB (12.9%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB1T0HBLR-000L2 
  size: 953.87 GiB 
Partition:
  ID-1: / size: 89.17 GiB used: 13.52 GiB (15.2%) fs: ext4 
  dev: /dev/nvme0n1p6 
  ID-2: swap-1 size: 8.01 GiB used: 0 KiB (0.0%) fs: swap 
  dev: /dev/nvme0n1p7 
Sensors:
  System Temperatures: cpu: 66.0 C mobo: N/A gpu: amdgpu temp: 66 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 283 Uptime: 2h 19m Memory: 5.74 GiB used: 2.41 GiB (42.0%) 
  Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.17 
  inxi: 3.0.38 
LM Cinnamon 64bit
Locked

Return to “Beginner Questions”