Stuttering sound on Linux Mint 18 Sarah 64-bit (MATE)

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
somelurker
Level 4
Level 4
Posts: 206
Joined: Fri Jul 01, 2016 6:10 pm

Re: Stuttering sound on Linux Mint 18 Sarah 64-bit (MATE)

Post by somelurker »

Here is the output from the pactl command you posted:

Code: Select all

alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
alsa_input.pci-0000_00_1f.3.analog-stereo
Soon, I will delete .xsession-errors and look for anything that seems relevant.
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

Re: Stuttering sound on Linux Mint 18 Sarah 64-bit (MATE)

Post by trytip »

install swh-plugins from synaptic these are LADSPA plugins like equalizer and compressor that you can use with audacity or other editors. but they can be live on the system to enhance or correct audio.
so after you install swh-plugins go into .config/pulse folder and create a blank text naming it default.pa inside default.pa paste this content then SAVE

Code: Select all

#include system-wise config
.include /etc/pulse/default.pa

#compressor -- for normalize audio volume
.ifexists module-ladspa-sink.so
.nofail

### BEGIN: Equalized audio configuration
### Generated from: pulseaudio-equalizer
load-module module-ladspa-sink sink_name=ladspa_sink master=alsa_input.pci-0000_00_1f.3.analog-stereo plugin=sc1_1425.so label=sc1 control=3,401,-30,4,5,9.6
#
load-module module-ladspa-sink sink_name=ladspa_output.mbeq_1197.mbeq master=alsa_input.pci-0000_00_1f.3.analog-stereo plugin=mbeq_1197 label=mbeq control=-1.0,-2.0,0.0,1.5,3.1,5.4,5.4,7.4,7.4,9.4,9.4,7.4,5.8,3.6,1.8
#
load-module module-ladspa-sink sink_name=ladspa_out master=ladspa_output.mbeq_1197.mbeq plugin=sc1_1425.so label=sc1 control=3,401,-30,4,5,12
#
load-module module-ladspa-sink sink_name=ladspa_normalized master=ladspa_out plugin=fast_lookahead_limiter_1913 label=fastLookaheadLimiter control=12,0,0.8
#
set-default-sink ladspa_out
set-sink-volume alsa_input.pci-0000_00_1f.3.analog-stereo 65536
set-sink-mute alsa_input.pci-0000_00_1f.3.analog-stereo 0
### END: Equalized audio configuration

.fail
.endif

###use the below pactl command for alsa card should be one w/o .monitor###
###  pactl list | grep -A2 'Source #' | grep 'Name: ' | cut -d" " -f2  ###
you will need to logOFF/ON or reboot

when you are back, you should now have LADSPA effects enabled in pulse if i made the script compatible with your audio output. you can use pavucontrol PulseAudio Volume Control to see your connections. you will have in output devices 4 new audio templates which can be viewed in the Playback tab of pavucontrol

every once in a while i like to go to .config/pulse and DELETE everything except the now newly created default.pa or the presets folder.
BACKUP your default.pa by rightclick and compress because if you use the PulseAudio Equalizer the default.pa will be written over, meaning you will not be able to use PulseAudio Equalizer as it will interfere with the script

but none of this will matter if your sound is still shuttering, so let me know if it works then i will explain the different script possibilities

ps: this script will only work for your machine. it can be modified by replacing alsa_input.pci-0000_00_1f.3.analog-stereo in the script with the output of the pactl command for alsa card from pactl list | grep -A2 'Source #' | grep 'Name: ' | cut -d" " -f2 and selecting the string WITHOUT .monitor
Last edited by trytip on Sun Mar 25, 2018 1:58 am, edited 1 time in total.
Image
thebrowser

Re: Stuttering sound on Linux Mint 18 Sarah 64-bit (MATE)

Post by thebrowser »

Hello there,

I'm having a similar issue with my audio and didn't want to open a new topic, I hope this is ok, please let me know if I should.

My problem is that while playing audio (music or video) every few minutes the sound "stutters" and comes out the speakers with a lot of distortion. The sound goes back to normal after pausing the track/video and waiting for a few seconds, but then after a couple of minutes comes back again. I'm running Mint as a virtual machine on top of windows 7 (host) using Virtual Box, which I understand is not great for media but even simple audio files get distorted, even when the computer is doing nothing else.

Some useful information:

Code: Select all

System:    Host: LMUser Kernel: 4.13.0-32-generic x86_64 (64 bit)
           Desktop: MATE 1.18.0  Distro: Linux Mint 18.3 Sylvia
           
           Virtual Box 5.2.6
           Audio Driver: ICH AC97
I've tried to change the audio driver to Intel HD with no result, play audio/videos from different sources (local storage, youtube, twitch...) with no result, install available updates through Update Manager, and also followed the steps in this guide I found online (although it seems it was focused for Ubuntu). To avoid you the reading I made the following changes:

Code: Select all

1. sudo nano /etc/modprobe.d/alsa-base.conf
2. at the bottom add "options snd-intel8x0 ac97_clock=48000"
Sorry for the long post, please let me know your thoughts and thanks in advance for the help.

Cheers
somelurker
Level 4
Level 4
Posts: 206
Joined: Fri Jul 01, 2016 6:10 pm

Re: Stuttering sound on Linux Mint 18 Sarah 64-bit (MATE)

Post by somelurker »

thebrowser, you should probably start your own topic, because your problem looks different from mine. Your sound goes back to normal after pausing and waiting, but mine does not have anything to do with that. Even if I don't pause, the stuttering goes away on its own after a fraction of a second. Furthermore, pausing does not in any way diminish the frequency of my problem after I unpause. Your problem also has the added complication of involving VirtualBox. My problem happens on the host machine, so it clearly has nothing to do with a VirtualBox guest.

I know it's been a while because I've been busy with other things, but the stuttering seems to have disappeared again. I will do a more exhaustive test when I have an hour of uninterrupted free time, but because I've changed nothing on my system except installing the usual updates suggested by Update Manager, I believe the problem was most likely caused by some kind of buggy package update. I remember having this stuttering problem about 2 years ago, and about 1 year ago, it had completely disappeared, but it returned in the past few months, to my frustration. Now it is gone again, and I hope it stays that way. If not, I will have to keep doing more tests such as the swh-plugins test trytip suggested, which I honestly do not fully understand completely (but I will make an effort once I see the problem return).
somelurker
Level 4
Level 4
Posts: 206
Joined: Fri Jul 01, 2016 6:10 pm

Re: Stuttering sound on Linux Mint 18 Sarah 64-bit (MATE)

Post by somelurker »

Ok, so I've done an exhaustive test. I listened to at least 50 minutes of audio, and I haven't heard any stuttering. I'm really enjoying being able to watch videos and listen to music again. I want to thank every single person who replied to my original post trying to help me with this extremely complicated and frustrating problem. Assuming my theory is correct that some kind of buggy package update caused the problem, is there any way to narrow down the source of the problem should it return in the future?

I tried going through the Update Manager's list of recently installed packages, but because I'm not always using this computer, the number of updates was overwhelming. I also cannot narrow down the date range to less than a few months because I generally don't record the times I listen to music.
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

Re: Stuttering sound on Linux Mint 18 Sarah 64-bit (MATE)

Post by trytip »

i use synaptic to update linux mint all levels and it records a history which i can view what was updated or installed/removed. not sure if using the mint update has the same
Last edited by trytip on Tue Apr 03, 2018 11:57 am, edited 1 time in total.
Image
somelurker
Level 4
Level 4
Posts: 206
Joined: Fri Jul 01, 2016 6:10 pm

Re: Stuttering sound on Linux Mint 18 Sarah 64-bit (MATE)

Post by somelurker »

I believe I may have found the culprit. After some form of skipping came back (not the same type as before, but close enough), I checked my Update Manager to see what had recently been installed. One package stood out: intel-microcode. I already had this package installed prior to Update Manager updating it to a new version, but it appears the newer version broke my sound again. I opened Driver Manager, chose "Do not use the device" under intel-microcode, and the problem appeared to be gone following a reboot. I now suspect that the problem returned and disappeared intermittently due to updates of intel-microcode.

If intel-microcode is indeed the culprit (and so far it appears to be), is there any way I can avoid Meltdown and Spectre while still keeping my sound?

Edit: For anyone who's still reading this, I threw in the towel and bypassed the problem with a different sound card. I've tried nearly every single fix suggested, but it looks like the problem is some kind of incompatibility between software and hardware. If that's correct, there may be no easy fix short of getting the attention of a developer of the relevant driver or package. Of course, the problem is identifying just which software is the culprit. I don't have the ability or time to do that, so I went for an easy bypass instead. I'm just a casual user who wants to get sound working without having to go back to Windows. I don't want to risk security vulnerabilities by tampering with intel-microcode, if in fact that package is the problem.
Locked

Return to “Sound”