flickering sound on ubuntu 16.04


Answer: 1

22 hours ago

I'm new to ubuntu and linux in general. I have some sound problems, when i listening to music, especially on Firefox, I get those sound "hiccups" - meaning every 10-30 seconds the sound stop for a fraction of a second and then return.

It's also happens when I listening to music offline via the preinstalled players, but to lesser extent.

I tried to uncheck the "Use hardware acceleration when available" option in Firefox, but the problem still occur.

Thank you!

Added by: Brenda Rogahn

Answer: 2

19 hours ago

Okay, so I found a solution for my problem.

I followed the instructions in this tutorial: https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Setting_the_default_fragment_number_and_buffer_size_in_PulseAudio

If you interested in the logic behind the solution, feel free to check the link yourself. This answer will be purely technical.

in short, I first ran:

sudo gedit /etc/pulse/default.pa

and added tsched=0 to the existed line - load-module module-udev-detect. meaning that the end result should be: load-module module-udev-detect tsched=0

according to the tutorial it turns off something called "timer-based audio scheduling".

afterwards I ran the command: pactl list sinks and got a long output of informations and parameters.

Sink #0
Name: alsa_output.pci-0000_00_1f.3.analog-stereo
Description: Built-in Audio Analog Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 6
Mute: no
Volume: front-left: 47842 /  73% / -8.20 dB,   front-right: 47842 /  73% / -8.20 dB
        balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
Latency: 92790 usec, configured 99954 usec
    alsa.resolution_bits = "16"
    device.api = "alsa"
    device.class = "sound"
    alsa.class = "generic"
    alsa.subclass = "generic-mix"
    alsa.name = "Generic Analog"
    alsa.id = "Generic Analog"
    alsa.subdevice = "0"
    alsa.subdevice_name = "subdevice #0"
    alsa.device = "0"
    alsa.card = "0"
    alsa.card_name = "HDA Intel PCH"
    alsa.long_card_name = "HDA Intel PCH at 0xef328000 irq 131"
    alsa.driver_name = "snd_hda_intel"
    device.bus_path = "pci-0000:00:1f.3"
    sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
    device.bus = "pci"
    device.vendor.id = "8086"
    device.vendor.name = "Intel Corporation"
    device.product.id = "9d71"
    device.form_factor = "internal"
    device.string = "front:0"
    device.buffering.buffer_size = "17632"
    device.buffering.fragment_size = "4408"
    device.access_mode = "mmap"
    device.profile.name = "analog-stereo"
    device.profile.description = "Analog Stereo"
    device.description = "Built-in Audio Analog Stereo"
    alsa.mixer_name = "Conexant Generic"
    alsa.components = "HDA:14f11f72,104311b0,00100000 HDA:8086280b,80860101,00100000"
    module-udev-detect.discovered = "1"
    device.icon_name = "audio-card-pci"
    analog-output-speaker: Speakers (priority: 10000)
    analog-output-headphones: Headphones (priority: 9000, not available)
Active Port: analog-output-speaker

you should focus only on these 4 lines:

  • Sample Specification: s16le 2ch 48000Hz

  • alsa.resolution_bits = "16"

  • device.buffering.buffer_size = "17632"

  • device.buffering.fragment_size = "4408"

using the information from these 4 lines, you're going to calculate 2 values :

value 1:

(in simple math: https://i.stack.imgur.com/CzEq3.png):

In the first line I got 2ch 48000Hz and in the second line i got the value "16" so I simply did 2*48000*16=1536000.

now divide the value from the forth line(for me "4408") by the result you've just calculated(for me 1536000), and multiply it by 1000.

meaning that for me: value 1 = 2.86979.

value 2: simply divide the value from the first line by the value from the forth line.

meaning that for me: value 2 = 17632/4408 =4.


Finally run the command: sudo gedit /etc/pulse/daemon.conf

look for the lines:

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

and Enter the values like that:

; default-fragments = value 1
; default-fragment-size-msec = value 2

Now all left to do is to restart pulseaudio. run:

killall pulseaudio
pulseaudio --check

and afterwards start pulseaudio from the run dialog (Alt + F2 by default)

Hope it was helpful :)

Added by: Matilde Hayes

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9