Sound scratching

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Summerof69
Level 4
Level 4
Posts: 200
Joined: Sun Oct 25, 2015 11:52 am
Location: Mainland,Denmark

Sound scratching

Post by Summerof69 »

Hi for some time now, I've noticed a tiny scratching (sound) when for example adjusting volume with pavucontrol or the in-app volume control in gmusicbrowser, but not when the sound is adjusted with the system sound control.

There is also some occasional scratching when streaming Nfl Gamepass through Firefox. (More rare than common)

inxi -Fxz

Code: Select all

System:
  Host: sren-desktop Kernel: 4.15.0-111-generic x86_64 bits: 64 
  compiler: gcc v: 7.5.0 Desktop: Cinnamon 4.4.8 
  Distro: Linux Mint 19.3 Tricia base: Ubuntu 18.04 bionic 
Machine:
  Type: Desktop Mobo: ASRock model: Z77 Extreme6 serial: <filter> 
  BIOS: American Megatrends v: P2.80 date: 07/01/2013 
CPU:
  Topology: Quad Core model: Intel Core i7-3770 bits: 64 type: MT MCP 
  arch: Ivy Bridge rev: 9 L2 cache: 8192 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 54400 
  Speed: 1600 MHz min/max: 1600/3900 MHz Core speeds (MHz): 1: 1600 2: 1600 
  3: 1600 4: 1600 5: 1600 6: 1600 7: 1600 8: 1600 
Graphics:
  Device-1: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics 
  vendor: ASRock driver: i915 v: kernel bus ID: 00:02.0 
  Device-2: NVIDIA GK104 [GeForce GTX 760] vendor: eVga.com. driver: nvidia 
  v: 450.102.04 bus ID: 01:00.0 
  Display: x11 server: X.Org 1.20.8 driver: nvidia 
  resolution: 1920x1080~60Hz 
  OpenGL: renderer: GeForce GTX 760/PCIe/SSE2 v: 4.6.0 NVIDIA 450.102.04 
  direct render: Yes 
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio 
  vendor: ASRock Z77 Extreme4 driver: snd_hda_intel v: kernel 
  bus ID: 00:1b.0 
  Device-2: NVIDIA GK104 HDMI Audio vendor: eVga.com. driver: snd_hda_intel 
  v: kernel bus ID: 01:00.1 
  Sound Server: ALSA v: k4.15.0-111-generic 
Network:
  Device-1: Broadcom and subsidiaries NetLink BCM57781 Gigabit Ethernet PCIe 
  vendor: ASRock Z77 Extreme4 driver: tg3 v: 3.137 port: d000 
  bus ID: 04:00.0 
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:
  Local Storage: total: 3.29 TiB used: 1.58 TiB (47.8%) 
  ID-1: /dev/sda vendor: Kingston model: SV300S37A120G size: 111.79 GiB 
  ID-2: /dev/sdb vendor: Western Digital model: WD30EFRX-68EUZN0 
  size: 2.73 TiB 
  ID-3: /dev/sdc vendor: Western Digital model: WD5000AAKS-00V6A0 
  size: 465.76 GiB 
Partition:
  ID-1: / size: 44.04 GiB used: 13.22 GiB (30.0%) fs: ext4 dev: /dev/sda2 
  ID-2: /boot size: 475.9 MiB used: 150.0 MiB (31.5%) fs: ext4 
  dev: /dev/sda1 
  ID-3: /home size: 64.76 GiB used: 26.12 GiB (40.3%) fs: ext4 
  dev: /dev/sda3 
  ID-4: swap-1 size: 3.95 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sdc4 
Sensors:
  System Temperatures: cpu: 29.5 C mobo: 29.0 C gpu: nvidia temp: 37 C 
  Fan Speeds (RPM): fan-1: 0 fan-2: 1074 fan-3: 0 fan-4: 886 fan-5: 0 
  gpu: nvidia fan: 43% 
  Voltages: 12v: N/A 5v: N/A 3.3v: 3.31 vbat: 3.28 
Info:
  Processes: 259 Uptime: 5m Memory: 15.55 GiB used: 1.31 GiB (8.5%) 
  Init: systemd runlevel: 5 Compilers: gcc: 7.5.0 Shell: bash v: 4.4.20 
  inxi: 3.0.32 
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
For millions of years mankind lived much like the animals
Then something happened which unleashed the power of our imagination
We learned to talk
All we need to do is make sure we keep talking
Stephen Hawkin's voice on Keep Talking by Pink Floyd
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Sound scratching

Post by MrEen »

Hi Summerof69,

See if this stops it first:

Code: Select all

sudo tee /etc/modprobe.d/snd-hda-intel.conf <<<'options snd-hda-intel power_save=0'
Run that in the terminal then reboot and test your sound.
Summerof69
Level 4
Level 4
Posts: 200
Joined: Sun Oct 25, 2015 11:52 am
Location: Mainland,Denmark

Re: Sound scratching

Post by Summerof69 »

@MrEen thank you for your reply.

It does actually sounds like it removed the scratching, but I've all ready tried that very command earlier today, applied it and restarted the computer without any change.
(I found the command in one of your replies in this forum)

That's odd.
For millions of years mankind lived much like the animals
Then something happened which unleashed the power of our imagination
We learned to talk
All we need to do is make sure we keep talking
Stephen Hawkin's voice on Keep Talking by Pink Floyd
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Sound scratching

Post by MrEen »

Could be that there had been a small typo the first time. maybe the last single quote after 0 was missing which would cause if to fail to work.

If you had used the same filename (/etc/modprobe.d/snd-hda-intel.conf) both times, this last one overwrote the first one, so we'll never know for sure.
Summerof69
Level 4
Level 4
Posts: 200
Joined: Sun Oct 25, 2015 11:52 am
Location: Mainland,Denmark

Re: Sound scratching

Post by Summerof69 »

So I've just re tested the issue, and the scratching is back
For millions of years mankind lived much like the animals
Then something happened which unleashed the power of our imagination
We learned to talk
All we need to do is make sure we keep talking
Stephen Hawkin's voice on Keep Talking by Pink Floyd
Summerof69
Level 4
Level 4
Posts: 200
Joined: Sun Oct 25, 2015 11:52 am
Location: Mainland,Denmark

Re: Sound scratching

Post by Summerof69 »

I just realized that rebooting the system removes the issue, until I start up Firefox and streams NFL Gamepass. The issue remains until a reboot.

I guess that the player that NFL network uses does something.

Edit:
After some quick testing it does appear that it is the combo Firefox and the NFL network player, because it doesn't appear to be triggered when watching NFL Gamepass in Google Chrome.
Also the combo Firefox and Youtube doesn't trigger the issue either.
For millions of years mankind lived much like the animals
Then something happened which unleashed the power of our imagination
We learned to talk
All we need to do is make sure we keep talking
Stephen Hawkin's voice on Keep Talking by Pink Floyd
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Sound scratching

Post by MrEen »

Nice sleuthing Summerof69!

This should probably clear it up so a reboot isn't necessary when it happens:

Delete the files in /home/YourUserName/.config/pulse then run pulseaudio -k in the terminal. And most likely you'll need to restart Firefox as well. Don't know if that's better for you or not. Just throwing it out there.
Summerof69
Level 4
Level 4
Posts: 200
Joined: Sun Oct 25, 2015 11:52 am
Location: Mainland,Denmark

Re: Sound scratching

Post by Summerof69 »

MrEen wrote: Mon Apr 12, 2021 10:26 pm Nice sleuthing Summerof69!

This should probably clear it up so a reboot isn't necessary when it happens:

Delete the files in /home/YourUserName/.config/pulse then run pulseaudio -k in the terminal. And most likely you'll need to restart Firefox as well. Don't know if that's better for you or not. Just throwing it out there.
Thanks, it does remove the issue temporarily.
I've created a "nemo" script, that does the job.

BTW it appears that a restart of FF isn't necessary, closing the tab NFl Gamepass is running in seems to be enough.
I don't know if the FF Multi-account-containers extension have something to do with this (not the sound issue though)

Also I'm not totally sure of when exactly the sound scratching is starting, it seems that both sound streams have to be running before it starts.
For millions of years mankind lived much like the animals
Then something happened which unleashed the power of our imagination
We learned to talk
All we need to do is make sure we keep talking
Stephen Hawkin's voice on Keep Talking by Pink Floyd
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Sound scratching

Post by MrEen »

Here's something worth trying as a test.

The next time the scratching starts, go to the Playback tab of Pulseaudio Volume Control (installing it if necessary) and change the output that Firefox is playing to then change it back on that tab.

You'll probably need to change your HDMI card to some profile other than Off on the Configuration tab first to have more than the single option available on teh Playback tab. Even though the Configuration tab options will say (unavailable) go ahead and select one of them anyway.
Summerof69
Level 4
Level 4
Posts: 200
Joined: Sun Oct 25, 2015 11:52 am
Location: Mainland,Denmark

Re: Sound scratching

Post by Summerof69 »

Hello again MrEen.

I've dabbled with your tip for some time now, but changing the output from analogue to HDMI, doesn't really do anything. (I'm assuming that is what you meant)

I've tried to alter all the stream outputs in terms, and all at once too.
For millions of years mankind lived much like the animals
Then something happened which unleashed the power of our imagination
We learned to talk
All we need to do is make sure we keep talking
Stephen Hawkin's voice on Keep Talking by Pink Floyd
Summerof69
Level 4
Level 4
Posts: 200
Joined: Sun Oct 25, 2015 11:52 am
Location: Mainland,Denmark

Re: Sound scratching

Post by Summerof69 »

Update:
Probably not related to the full issue described in the OP, but a noticeable sound scratching issue occurs when watching Gamepass as described in the OP, and opening a new tab with ups.com tracking, for instance.

This triggers 3 instances of "speech-dispatcher", and as long as the site hasn't finished loading all the scripts, a serious sound stutter is heard.
This issue can be resolved by turning off "speech dispatcher" in FF by going into

Code: Select all

about:config
and finding;

Code: Select all

media.webspeech.synth.enabled
and choose false.

This issue doesn't occur every time, but more often than not.

Maybe it resolves this issue from the OP;
There is also some occasional scratching when streaming Nfl Gamepass through Firefox. (More rare than common)
My description of the occurrences may sound self contradicting, regarding the frequency, but the above quote is a general observation, and the ups.com issue is a precise description, of an issue triggered by "speech-dispatcher".
For millions of years mankind lived much like the animals
Then something happened which unleashed the power of our imagination
We learned to talk
All we need to do is make sure we keep talking
Stephen Hawkin's voice on Keep Talking by Pink Floyd
Locked

Return to “Hardware Support”