You are not logged in.

#1 2016-12-02 00:26:23

hungerfish
Member
Registered: 2009-09-13
Posts: 254

[SOLVED]Pulseaudio, glitches/cutoffs every other minute

I recently installed pa, and ever since I've been having these weird 'glitches'.
They happen every other minute, not necessarily regularly, and from what I can determine not 'just' during media playback. To elaborate:

I first noticed this happening during video playback using VLC, the audio would cut off every maybe 2/3 minutes and I would loose up to a second of sound.
I've also tried smplayer (mvp) , and I get similar 'cut', though not as much audio is 'dropped' as with vlc.
I also occasionally get (very short) cutoffs when playing youtube vids in firefox, again randomly, not at beginning or end.

At first I thought this must be related to settings in vlc, I've tried all sorts of stuff to no avail. I then installed smplayer and left it at its defaults, and as mentioned, a similar effect.
Once more. even with no output, I get occasional 'clicks' coming from my speakers (like when unplugging  headphones), which I first thought to be a separate issue,
but since playing around with some more, I feel that they are probably all down to the same problem. (No connection issue, because plain alsa was fine, also windows doesn't do this on the same system/setup)

I've tried disabling pa's glitchfree mode (tshed=0), I've also disabled "module-suspend-on-idle", I've also adjusted "default-fragment-size-msec" (to 125 per wiki's math for my soundcard), and quite frankly
I'm now at a loss. I'm not very 'into sound stuff' and using plain alsa didn't give me these headaches (but I wanted per application volume control, so... )

Any idea's  what I could try?

The strange thing is that music playback works fine (or I fail to notice the glitches.. as I said, I don't get it...)

I'm using my onboard soundchip, SBx00 Azalia (Intel HDA) / Realtek ALC892 -> S/PDIF out->DAC->analog stereo amp -> crappy speakers (so nothing fancy)

Last edited by hungerfish (2016-12-08 18:45:46)


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#2 2016-12-02 08:19:05

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,659

Re: [SOLVED]Pulseaudio, glitches/cutoffs every other minute

Might be jack change events, although the fact that music playback seems to work throws that somewhat out. Anyway, can you post

pacmd list-sinks
pacmd list-sink-inputs

before and after a dropout? Maybe looking into

dmesg | grep -E 'snd|ALSA'
journalctl --user-unit=pulseaudio.service

might contain some useful stuff as well.

Offline

#3 2016-12-02 12:30:25

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: [SOLVED]Pulseaudio, glitches/cutoffs every other minute

Hey, thanks for taking the time!
Journal just reports the starting/stopping of the service..
The rest:

~ $ dmesg | grep -E 'snd|ALSA'
[    5.675017] snd_hda_intel 0000:00:14.2: enabling device (0000 -> 0002)
[    5.675257] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[    5.675294] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[    5.675295] snd_hda_intel 0000:01:00.1: Force to non-snoop mode
[    5.695006] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC892: line_outs=4 (0x14/0x15/0x16/0x17/0x0) type:line
[    5.695011] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    5.695012] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[    5.695013] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[    5.695014] snd_hda_codec_realtek hdaudioC0D0:    dig-out=0x1e/0x0
[    5.695015] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[    5.695017] snd_hda_codec_realtek hdaudioC0D0:      Front Mic=0x19
[    5.695018] snd_hda_codec_realtek hdaudioC0D0:      Rear Mic=0x18
[    5.695019] snd_hda_codec_realtek hdaudioC0D0:      Line=0x1a

Always the same:

~ $ pacmd list-sink-inputs
0 sink input(s) available.

Nothing playing:

~ $ pacmd list-sinks
1 sink(s) available.
  * index: 3
        name: <alsa_output.pci-0000_00_14.2.iec958-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: IDLE
        suspend cause: 
        priority: 9958
        volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        base volume: 65536 / 100% / 0,00 dB
        volume steps: 65537
        muted: no
        current latency: 1765,48 ms
        max request: 344 KiB
        max rewind: 344 KiB
        monitor source: 4
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 1999,82 ms; range is 0,50 .. 1999,82 ms
        card: 1 <alsa_card.pci-0000_00_14.2>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC892 Digital"
                alsa.id = "ALC892 Digital"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "1"
                alsa.card = "0"
                alsa.card_name = "HDA ATI SB"
                alsa.long_card_name = "HDA ATI SB at 0xfeb00000 irq 16"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:14.2"
                sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card0"
                device.bus = "pci"
                device.vendor.id = "1002"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
                device.product.id = "4383"
                device.product.name = "SBx00 Azalia (Intel HDA)"
                device.form_factor = "internal"
                device.string = "iec958:0"
                device.buffering.buffer_size = "352768"
                device.buffering.fragment_size = "176384"
                device.access_mode = "mmap+timer"
                device.profile.name = "iec958-stereo"
                device.profile.description = "Digital Stereo (IEC958)"
                device.description = "Built-in Audio Digital Stereo (IEC958)"
                alsa.mixer_name = "Realtek ALC892"
                alsa.components = "HDA:10ec0892,18497892,00100302"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
                        properties:

        active port: <iec958-stereo-output>

During playback (audio)

~ $ pacmd list-sinks
1 sink(s) available.
  * index: 3
        name: <alsa_output.pci-0000_00_14.2.iec958-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: RUNNING
        suspend cause: 
        priority: 9958
        volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        base volume: 65536 / 100% / 0,00 dB
        volume steps: 65537
        muted: no
        current latency: 237,48 ms
        max request: 44 KiB
        max rewind: 344 KiB
        monitor source: 4
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        configured latency: 260,00 ms; range is 0,50 .. 1999,82 ms
        card: 1 <alsa_card.pci-0000_00_14.2>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC892 Digital"
                alsa.id = "ALC892 Digital"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "1"
                alsa.card = "0"
                alsa.card_name = "HDA ATI SB"
                alsa.long_card_name = "HDA ATI SB at 0xfeb00000 irq 16"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:14.2"
                sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card0"
                device.bus = "pci"
                device.vendor.id = "1002"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
                device.product.id = "4383"
                device.product.name = "SBx00 Azalia (Intel HDA)"
                device.form_factor = "internal"
                device.string = "iec958:0"
                device.buffering.buffer_size = "352768"
                device.buffering.fragment_size = "176384"
                device.access_mode = "mmap+timer"
                device.profile.name = "iec958-stereo"
                device.profile.description = "Digital Stereo (IEC958)"
                device.description = "Built-in Audio Digital Stereo (IEC958)"
                alsa.mixer_name = "Realtek ALC892"
                alsa.components = "HDA:10ec0892,18497892,00100302"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
                        properties:

        active port: <iec958-stereo-output>

During playback(video)

~ $ pacmd list-sinks
1 sink(s) available.
  * index: 3
        name: <alsa_output.pci-0000_00_14.2.iec958-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: RUNNING
        suspend cause: 
        priority: 9958
        volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        base volume: 65536 / 100% / 0,00 dB
        volume steps: 65537
        muted: no
        current latency: 39,90 ms
        max request: 7 KiB
        max rewind: 344 KiB
        monitor source: 4
        sample spec: s16le 2ch 48000Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        configured latency: 40,00 ms; range is 0,50 .. 1837,33 ms
        card: 1 <alsa_card.pci-0000_00_14.2>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC892 Digital"
                alsa.id = "ALC892 Digital"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "1"
                alsa.card = "0"
                alsa.card_name = "HDA ATI SB"
                alsa.long_card_name = "HDA ATI SB at 0xfeb00000 irq 16"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:14.2"
                sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card0"
                device.bus = "pci"
                device.vendor.id = "1002"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
                device.product.id = "4383"
                device.product.name = "SBx00 Azalia (Intel HDA)"
                device.form_factor = "internal"
                device.string = "iec958:0"
                device.buffering.buffer_size = "352768"
                device.buffering.fragment_size = "176384"
                device.access_mode = "mmap+timer"
                device.profile.name = "iec958-stereo"
                device.profile.description = "Digital Stereo (IEC958)"
                device.description = "Built-in Audio Digital Stereo (IEC958)"
                alsa.mixer_name = "Realtek ALC892"
                alsa.components = "HDA:10ec0892,18497892,00100302"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
                        properties:

        active port: <iec958-stereo-output>

Its a bit difficult to 'catch' these cutoffs manually, can I somehow continuously log the relevant data? From what I can see, the only difference between audio/video/idle are the latency and 'request' values...


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#4 2016-12-05 13:16:10

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: [SOLVED]Pulseaudio, glitches/cutoffs every other minute

So, while 'suffering' through this some more the last few days, for whatever reason, this 'cutoff ' lasted longer than before at one point, long enough for me to definitely identify it as a 'muting' problem.
I can say this, since as mentioned above, I use S/PDIF -> dac converter, and this converter produces very specific 'noises' when its source is muted which then get outputted to my speakers. This normally is not a problem though,
and is otherwise unrelated to this pulseaudio problem, however during this 'longer cutoff' I could hear these exact noises... meaning that pulseaudio, for whatever reason decides to temporarily mute output during playback.

So how can I monitor any changes to pulseaudio's  connectors status to try and catch this?
Is there maybe a way to disable this mute/toggle entirely?
Automute is already disabled in alsamixer, this must be specific to something that pulse does..


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#5 2016-12-05 14:34:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,659

Re: [SOLVED]Pulseaudio, glitches/cutoffs every other minute

Yeah this was my suspicion as well, somewhat dampened by the fact, that at least in the excerpt you posted, the sink index didn't increase, which would be indicative of a loss of the sink. You could try and disable/comment the pulse module-switch-on-port-available which should prevent pulse from switching away even if the connector reports a disconnect. As for monitoring, you will want to look into Acpi jack events

Another potential source is cork events from e.g. VoIP applications or system notifications, disable module-role-cork although I feel that this one is less likely for the usecase you described

Last edited by V1del (2016-12-05 14:43:17)

Offline

#6 2016-12-08 18:45:29

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: [SOLVED]Pulseaudio, glitches/cutoffs every other minute

So after yet more days of testing, I'm happy to report that the issue seems to be resolved.
I'd already disabled "module-role-cork" before posting last but I must have missed "module-switch-on-port-available" before ...  disabling that seems to have cured the pain though!
Looking back, I can remember having to disable 'auto-jack detection in the windows-realtek config program with win7 or it too would flip out, it hasn't been a problem with win10 though, and as mentioned, neither with pure alsa.
Anyway, I don't really care smile

Thanks V1del!

Last edited by hungerfish (2016-12-08 18:47:22)


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

Board footer

Powered by FluxBB