Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd, 2017 please sign up again. Thanks!

  1. More ways to get the info! - we shoot all of our new original content out as well as random messages on Twitter and our newsletter!. Twitter | Newsletter
    Dismiss Notice

[SOLVED] Arch linux sound crackling/skipping.

Discussion in 'Linux Audio / Video' started by VladDorn1234, Apr 10, 2019.

  1. VladDorn1234

    VladDorn1234 New Member

    Joined:
    Dec 16, 2018
    Messages:
    11
    Likes Received:
    6
    Hello everyone. I am having trouble with small skips
    and crackling inside arch linux. I have just recently
    installed this arch install onto my pc last week and have
    been working on it and have been satistied with everything
    besides the volume problems i am stating here.
    (please excuse my spelling mistakes as english is not my native language)

    in both firefox and vlc media player I have been having
    audio skipping and crackling and I am certian it is
    not my hardware as it works in windows and linux mint.


    (Log in to hide this advertisement)


    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.


    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-83962389...xample/s-L79lX
     
  2. wizardfromoz

    wizardfromoz Super Moderator
    Staff Member Gold Supporter

    Joined:
    Apr 30, 2017
    Messages:
    2,839
    Likes Received:
    2,280
    G'day Vlad :)

    Out of interest, did you try the two commands (pulseaudio) listed in @rado84 's Thread stickied to the top of the Audio-Video page?

    Chris Turner
    wizardfromoz
     
  3. VladDorn1234

    VladDorn1234 New Member

    Joined:
    Dec 16, 2018
    Messages:
    11
    Likes Received:
    6
    Yes, as a matter of fact, that was the first thing I tried period. let me give a little more info i forgot to mention,:

    I had also gotten audio skipping problems in debian 9.5 stable (I also got many other problems and my hardware was not well supported in 9.5 so I moved on to other distros ) and also Manjaro had similar noise problems. But both windows 7, 8, and 10 had no problems and linux mint 17-19 had no issues, also a live usb of kali linux and a live cd of tails had no audio problems as well. so From this it looks to be arch distro specific other than debian stable.


    and for anyone who is interested my lspci output is:

    Code:
    00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD9x0/RX980 Host Bridge (rev 02)
    00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD/ATI] RD890S/RD990 I/O Memory Management Unit (IOMMU)
    00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GFX port 0)
    00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 0)
    00:09.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 4)
    00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] (rev 40)
    00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
    00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
    00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
    00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
    00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 42)
    00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller (rev 40)
    00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)
    00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)
    00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge (rev 40)
    00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
    00:16.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
    00:16.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
    00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 0
    00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 1
    00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 2
    00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 3
    00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 4
    00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 5
    01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Tonga PRO [Radeon R9 285/380] (rev f1)
    01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Tonga HDMI Audio [Radeon R9 285/380]
    02:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)
    03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
    I am guessing that 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 0-5' Is my built in audio device that I am using because it is a typical motherboard sound that has the 6 line inputs/outputs on the back.
     
  4. wizardfromoz

    wizardfromoz Super Moderator
    Staff Member Gold Supporter

    Joined:
    Apr 30, 2017
    Messages:
    2,839
    Likes Received:
    2,280
    Thanks for the extra material, that may help someone who is more of a Sound Guru than I (which would not be hard).

    Code:
    lspci -v | grep -i audio
    gives output less confusing.

    I am not a Sound Guru but I will keep my eyes peeled and if I learn anything I will get back here.

    Wizard
     
    VladDorn1234 likes this.
  5. VladDorn1234

    VladDorn1234 New Member

    Joined:
    Dec 16, 2018
    Messages:
    11
    Likes Received:
    6
    Well this is quite weird. I have been busy for a few days and had to use my windows install for that time being and I came back with the free time i had tonight to look at my arch sound issues and they are now non existent. this is quite strange. I am not sure how. in case something comes back i will not mark as solved for a few more days. also in case it comes back here is my output for
    lspci -v | grep -i audio:

    00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)
    01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Tonga HDMI Audio [Radeon R9 285/380]
    Subsystem: ASUSTeK Computer Inc. Tonga HDMI Audio [Radeon R9 285/380]
     
  6. wizardfromoz

    wizardfromoz Super Moderator
    Staff Member Gold Supporter

    Joined:
    Apr 30, 2017
    Messages:
    2,839
    Likes Received:
    2,280
    Nice outcome? :)

    Vlad, thanks for that output, and now might be a good time to acquaint yourself with Timeshift.

    Take a full snapshot of your Arch, and then if things head south for the winter, you can roll back.

    In Arch, you can likely do this from the AUR, using the command

    Code:
    sudo pacman -S timeshift
    Cheers

    Wiz
     
    Rob likes this.
  7. Rob

    Rob Administrator
    Staff Member

    Joined:
    Oct 27, 2011
    Messages:
    432
    Likes Received:
    922
    Yeah, strange - wondering .. do you have automatic updates configured? Perhaps a driver or something updated and fixed your issue.
     
  8. VladDorn1234

    VladDorn1234 New Member

    Joined:
    Dec 16, 2018
    Messages:
    11
    Likes Received:
    6
    hmmm this is interesting.
    sudo pacman -S timeshift

    does not work for me as it says the package does not exist and when I tried installing from aur with yay It said errors and package could not be installed. so I am guessing that it is broken on arch currently?


    EDIT: I found this article saying I should downgrade vala for timeshift
    . I am not sure what that Is is this a bad idea ?

    https://www.virtualconfusion.net/timeshift-19-01-1-vala/
     
  9. wizardfromoz

    wizardfromoz Super Moderator
    Staff Member Gold Supporter

    Joined:
    Apr 30, 2017
    Messages:
    2,839
    Likes Received:
    2,280
    OK Vlad, hold off on that idea for now :)

    My only Arch is in a VM under Arch-based Swagarch. It installs easily enough under all my Arch-based Distros (about 12 of them).

    Are you still able to use yaourt under Arch? If so, try substituting yaourt for yay. I know yaourt was being deprecated in favour of yay. Yaourt might require base-devel to be installed.

    Otherwise, as I say, hold off on it, and if I find anything I'll come back here.

    Cheers

    Wizard
     
    VladDorn1234 likes this.
  10. VladDorn1234

    VladDorn1234 New Member

    Joined:
    Dec 16, 2018
    Messages:
    11
    Likes Received:
    6
    I forgot I can just manually back up with rsync. I will have to use that for now. Thank you all.
     
    wizardfromoz likes this.

Share This Page