[SOLVED] Arch Audio Stutters and Skips.
Welcome, Guest.
“Theory and practice sometimes clash. And when that happens, theory loses. Every single time.” ― Linus Torvalds

Author Topic: [SOLVED] Arch Audio Stutters and Skips.  (Read 833 times)

Offline james5654

  • Newbie
  • **
  • Posts: 17
[SOLVED] Arch Audio Stutters and Skips.
« on: April 06, 2019, 02:29:29 PM »
Hello everyone. I have not been active on here for a while but I am glad to be back as I always get great help here. Recently, since before I had problems with so many distros to be compatible with my mobo/ gpu combo I finally decided to give arch one more try, so I did a proper installation. i have installed arch many times before so I am confident i hopefully did not install anything to do with the audio in the wrong way.  I then installed all the necessary programs that i use fonts etc... everything is working great and I am very pleased with the performance of arch this time. The only problem I am having is that both web based audio and video and local files played in vlc are making a strange glitchy stuttering noise every few seconds and I cannot figure out what is causing it..At first, I thought it was only a firefox problem so I played around with the hardware acceleration in firefox but it did not change anything so I then played some music and video files locally on vlc and then thats when I saw the problem was just all audio and video in general on the system.  Inside my windows 10 install on my other drive on the same machine (which I cant stand haha) The audio and video playback is flawless and I would like to try to get arch to be the same so I can finally convert over to linux  fully.

my hardware: 16 gb ram ddr3
amd radeon r9 380 4gb
amd fx 6300 6 core
72000 rpm hdd
gigabyte 970a ud3p
KDE plasma
onboard sound

Here is an example of the issue i tried to recreate in audacity: https://soundcloud.com/user-839623891/skipexample/s-L79lX
« Last Edit: April 16, 2019, 05:19:57 PM by james5654 »

Offline Spatry

  • Benevolent Dictator
  • Administrator - Sysop
  • **********
  • Posts: 5602
  • Cup of Linux Founder
    • Cup of Linux
Re: Arch Audio Stutters and Skips.
« Reply #1 on: April 06, 2019, 02:35:51 PM »
Matthew Moore explained to me some time ago that the solve to such sound problems stems from configuring the audio to match the frequency of your sound hardware. The Arch wiki should have instructions on setting these preferences. My apologies for not giving a more complete answer but I am in the process of rolling out new content for the channel.... Good Luck.
Windows assumes the user is an idiot... Linux DEMANDS Proof!

Offline james5654

  • Newbie
  • **
  • Posts: 17
Re: Arch Audio Stutters and Skips.
« Reply #2 on: April 06, 2019, 03:23:09 PM »
Ok thanks for the tip, I will be looking at the wiki today and will report back what i tried and how it worked out tomorrow.

Post Merge: April 07, 2019, 07:42:40 PM

Update: did not get to it today but will keep updated.

Post Merge: April 08, 2019, 06:22:24 PM

Ok, so i tried some of the suggestions on the arch wiki:


the first thing I did was change:
/etc/pulse/default.pa


load-module module-udev-detect tsched=0


I then restarted pulseaudio and then tried again to
listen to a sound file in vlc. the sound stayed the
same.


after this failed I then tried to set the buffer
and fragment size by using the command :


$ pactl list sinks




after i had looked at the information about my sound card I
could see what I needed to do. here is the part from the
arch wiki that talks about calculating fragment sizes i have
edited to show my exact calculations I got for my sound card.


device.buffering.buffer_size = "17664" => 17664/1411200 = 0.0125 s = 12.5 ms
device.buffering.fragment_size = "2994" => 2994/1411200 = 0.002086 s = 2.086 ms






In the previous step, we calculated the fragment size parameter. The number of fragments is simply buffer_size/fragment_size, which in this case (12.5/2.086) is 5.599:




I then changed /etc/pulse/daemon.conf to use these parameters ( i also tried both just 5 and 2 as well same result) :


; default-fragments = 5.599
; default-fragment-size-msec = 2.086


then restarted pulse again.


I then tested the same audio file in vlc and though the skipping slightly
went down, the problem is still there.


after all of that i decided to take out tsched=0 again from
/etc/pulse/default.pa


when i had done that the crackling and skipping had gone away again even more,
but every 30 seconds or so the crackling and skipping still did happen.





Post Merge: April 09, 2019, 06:04:05 PM
The problem persisted and I dont know why.

Post Merge: April 16, 2019, 05:19:42 PM
hi everyone, it appears after a few days of tinkering around that the problem is now gone. I believe there may have either been a driver update, or just restarting the computer a few times after the changes i made it finally took effect. thanks for all the help :)
« Last Edit: April 16, 2019, 05:19:42 PM by james5654 »