LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Stuttering sound issues in 14.0 (http://www.linuxquestions.org/questions/slackware-14/stuttering-sound-issues-in-14-0-a-4175484269/)

Suevy Suavae 11-11-2013 07:17 PM

Stuttering sound issues in 14.0
 
I've got a relatively recent install of Slackware 14.0 on a desktop I just built, and I'm having a hard time getting the sound output to work properly. "aplay -l" says I have an Intel ALC887-VD chipset, which matches the packaging for my motherboard.

Code:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I can play videos on youtube and the like and the sound will often stutter or skip. I sounds like what I imagine running out of memory would sound like, but I've run htop at the same time and there is lots to spare. If I try to play music through a local music player the problem is even worse. Mocp will just loop the first half a second over and over, and cmus will play the song more recognizably, but it's still choppy and full of static. If it's any help, I initially tried setting up mpd for music, but it would eat up all of my CPU and memory trying to cache everything. I doubt that's related, but better safe then sorry.

In my journey for a solution, I've tried adding the following to my /etc/asound.conf
Code:

$ cat /etc/asound.conf
pcm.!default {
        type hw
        card 0
}
ctl.!default {
        type hw
        card 0
}

but to no avail. If I try specifying sub-device 1 on card 0, I lose all sound, so I assume that sub-device 0 is just default with the current config.

I'm sure I've forgotten something important, so if anyone needs more information on something feel free to ask. I've been messing around with this for so long it's hard to remember everything I've tried.

aus9 11-11-2013 10:36 PM

Hi

a quick solution might be to mute your headphone item in alsamixer as per
https://bbs.archlinux.org/viewtopic....54218#p1054218

2) I would remove all attempts at system wide asound configs pls

3) I assume you are talking about sound from your speakers and not sound from a hdmi cable to a sound system or tv?

Suevy Suavae 11-12-2013 12:48 PM

Thanks for the suggestions and you're correct, I'm trying to play sound to headphones/speakers. I moved the asound.conf with no real improvement (as expected), and I tried muting my headphone device in alsamixer but that didn't seem to help at all, even after storing the settings and rebooting.

aus9 11-12-2013 06:11 PM

ok when you have your alsamixer settings up in the terminal

can you take a screenshot and upload it to host site eg tinypic.com is free to join and then link to it

2) To help trouble shoot can you remove any un-needed sound device or mention that you need them connected
---not limited list includes cell/mobile phones, mp3 players, external modems that use dial up networking

b) can you advise if you have pulseaudio installed ?
Have you tried to use it?

3) Can you advise make model of computer, I am guessing its a laptop?

b) Assuming lsmod shows snd_hda_intel as the hardware module for sound you may wish peruse
Quote:

ALC88x/898/1150
======================
acer-aspire-4930g Acer Aspire 4930G/5930G/6530G/6930G/7730G
acer-aspire-8930g Acer Aspire 8330G/6935G
acer-aspire Acer Aspire others
inv-dmic Inverted internal mic workaround
no-primary-hp VAIO Z/VGC-LN51JGB workaround (for fixed speaker DAC)
from https://www.kernel.org/doc/Documenta...dio-Models.txt

4) Ideally to assist trouble shooting
you make one change at a time

but lets look at your current mixer options
if headphone is not an option then I suggest we consider forcing a model=string onto the module probing file

from another post from a slacker it appears Slackware likes to use this file as the config, don't worry if you don't have one
/etc/modprobe.d/sound.conf

instead look with your file manager at all the contents of files in /etc/modprobe.d

Debian uses alsa-base.conf and what you are looking for a line(s) that start with

options blah blah

for each file you find --lines beginning with "options" , please name the file and its contents

Later on we advise you to try a line using a formula based on
options snd_hda_intel model=string
where string is replaced with one from the list above eg no-primary-hp

but I admit, its not a great list of supported computers so unless you have an aspire or hp, it might not help

5) which command did you use to store your mixer settings?

eg

Code:

sudo alsactl store  (OR)
sudo alsactl -f /home/mike/asound.state store

Change mike to whatever home user account name you have

aus9 11-12-2013 06:26 PM

and a separate post for your local music player

can you download vlc please as it has a good codec support.

What desktop environment / window manager are you using? eg KDE is bad if you have insufficient RAM

what are your RAM specs

2) Have you a live cd eg UBCD that have memtest on it so you can test your existing RAM

b) how old is this computer?

sometimes sticks can slightly pop from their cradles so just need steady pressure to re-embed.
I assume you know turn off computer at mains, or remove laptop battery
touch some metal to remove static electricity before touching RAM modules

Suevy Suavae 11-12-2013 06:42 PM

All right, lots to work through here. First, a screen shot of my alsa mixer can be found at http://i.imgur.com/e936C1X.jpg.

I don't have any other sound devices attached, so we should be good there.

I haven't tried installing pulse audio.

The computer is one I built myself, but it has an Asus H87-Plus motherboard, which both the packaging and alsa agree have the ALC887-VD chipset for sound.

During my initial troubleshooting for this (I knew I would forget things), I did create a file in /etc/modprobe.d/ called snd-hda-intel.conf which contains the line
Code:

options snd_hda_intel index=0 model=auto enable_msi=0
I'm not sure that any of that was helpful, except things did seem to clear up a bit after I added the enable_msi=0.

The computer is only a few months old, and has 8gb of RAM. I'm currently using i3 as my WM so memory shouldn't be an issue unless it's a hardware problem.

I'll start working on installing vlc, but the dependencies look like they'll take a while, so I'll post again when that's up and running.

Daedra 11-12-2013 06:57 PM

Quote:

I'll start working on installing vlc, but the dependencies look like they'll take a while, so I'll post again when that's up and running.
Don't bother, just use Alien Bob's VLC package. It takes care of all the dependencies by statically linking them in the package.
http://slackware.org.uk/people/alien...ackbuilds/vlc/

jon lee 11-12-2013 07:19 PM

What modules does a lsmod show?
The reason I say this is because I'm using a ALC272 on an intel chipset (which is only slightly different than yours), and things worked flawlessly out of the box, without adding anything in /etc/modprobe.d

Also my lsmod shows a realtek module loaded as well as intel.

Quote:

snd_hda_codec 115707 2 snd_hda_codec_realtek,snd_hda_intel
snd 43059 25 snd_seq_oss,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_usb_audio,snd_usbmidi_lib,snd_rawmidi,snd_seq_devi ce,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
i2c_i801
soundcore 4154 3 snd
snd_page_alloc 5694 2 snd_hda_intel,snd_pcm

Suevy Suavae 11-12-2013 07:47 PM

Quote:

Don't bother, just use Alien Bob's VLC package. It takes care of all the dependencies by statically linking them in the package.
http://slackware.org.uk/people/alien...ackbuilds/vlc/
Good call, thanks. Looks like I'm having the same trouble playing audio in vlc as in any of the other players though.

Quote:

What modules does a lsmod show?
The reason I say this is because I'm using a ALC272 on an intel chipset (which is only slightly different than yours), and things worked flawlessly out of the box, without adding anything in /etc/modprobe.d

Also my lsmod shows a realtek module loaded as well as intel.
Code:

$ lsmod | grep 'snd'
snd_seq_dummy          1455  0
snd_seq_oss            29048  0
snd_seq_midi_event      5620  1 snd_seq_oss
snd_seq                51265  5 snd_seq_midi_event,snd_seq_oss,snd_seq_dummy
snd_seq_device          5228  3 snd_seq,snd_seq_oss,snd_seq_dummy
snd_pcm_oss            39183  0
snd_mixer_oss          15404  1 snd_pcm_oss
snd_hda_codec_hdmi    24057  1
snd_hda_codec_realtek  195474  1
snd_hda_intel          23267  1
snd_hda_codec          81925  3 snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi
snd_hwdep              6324  1 snd_hda_codec
snd_pcm                72864  4 snd_hda_codec,snd_hda_intel,snd_hda_codec_hdmi,snd_pcm_oss
snd_page_alloc          7081  2 snd_pcm,snd_hda_intel
snd_timer              18798  2 snd_pcm,snd_seq
snd                    57796  14 snd_timer,snd_pcm,snd_hwdep,snd_hda_codec,snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_mixer_oss,snd_pcm_oss,snd_seq_device,snd_seq,snd_seq_oss
soundcore              5474  1 snd

Code:

snd_hda_codec_realtek  195474  1
snd_hda_codec          81925  3 snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi
snd                    57796  14 snd_timer,snd_pcm,snd_hwdep,snd_hda_codec,snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_mixer_oss,snd_pcm_oss,snd_seq_device,snd_seq,snd_seq_oss

It looks like there are some realtek codec modules loading for me as well.

aus9 11-13-2013 01:55 AM

Quote:

It looks like there are some realtek codec modules loading for me as well.
yes but they are not the hardware modules that I referred to in reply 4---they are codec modules

2) there is nothing wrong with your modprobe config file ---but as you made it yourself keep it but rename something simple
like intel.conf

here is what you should get for the various parameters by running
Code:

sudo modinfo snd_hda_intel
You could run it against some of the codecs but I don't have the same codec as you as I have snd_hda_codec

Code:

---top of list culled to show only parameters
parm:          index:Index value for Intel HD audio interface. (array of int)
parm:          id:ID string for Intel HD audio interface. (array of charp)
parm:          enable:Enable Intel HD audio interface. (array of bool)
parm:          model:Use the given board model. (array of charp)
parm:          position_fix:DMA pointer read method.(-1 = system default, 0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO, 4 = COMBO). (array of int)
parm:          bdl_pos_adj:BDL position adjustment offset. (array of int)
parm:          probe_mask:Bitmask to probe codecs (default = -1). (array of int)
parm:          probe_only:Only probing and no codec initialization. (array of int)
parm:          jackpoll_ms:Ms between polling for jack events (default = 0, using unsol events only) (array of int)
parm:          single_cmd:Use single command to communicate with codecs (for debugging only). (bool)
parm:          enable_msi:Enable Message Signaled Interrupt (MSI) (bint)
parm:          power_save:Automatic power-saving timeout (in second, 0 = disable). (xint)
parm:          power_save_controller:Reset controller in power save mode. (bool)
parm:          align_buffer_size:Force buffer and period sizes to be multiple of 128 bytes. (bint)
parm:          snoop:Enable/disable snooping (bool

3) speaking of building it yourself....well done
do you need hdmi?

4) this must be a tower and not a laptop as image shows front items

5) Now in one hit, run alsamixer make changes but do not store just test sound
press m button to mute the following:
surround, center, LFE
at capture press the space bar to de-activate the mic

---test sound

We know your surround is useless as you have used the up or down arrows at the "channel mode" item to choose 2ch

good luck

we will wait before trying model=strings later

aus9 11-13-2013 01:58 AM

once that test is a fail I am tempted to look at your parameter
align_buffer_size

aus9 11-13-2013 02:08 AM

AHHHHH

I just a quick read of your bios, that mobo is too nice for you, you better to send it to me to test fully....giggle

1) did you know there is a setting in your bios to enable HD Audio = intel

2) But did you know there is a setting in there to enable AC97 legacy sound support

now the reason I ask (2) is you have realtek codecs and they are often associated with AC97 hardware

In other words, turn off ac97 support in your bios please
http://dlcdnet.asus.com/pub/ASUS/mb/...0_H87-PLUS.pdf

page 34,
page 85 sect 3-32 forgive me if you have not enabled ac97

Suevy Suavae 11-13-2013 01:57 PM

Quote:

here is what you should get for the various parameters by running
Code:
Code:

sudo modinfo snd_hda_intel

Code:

# modinfo snd_hda_intel | grep 'parm'
parm:          index:Index value for Intel HD audio interface. (array of int)
parm:          id:ID string for Intel HD audio interface. (array of charp)
parm:          enable:Enable Intel HD audio interface. (array of bool)
parm:          model:Use the given board model. (array of charp)
parm:          position_fix:DMA pointer read method.(0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO). (array of int)
parm:          bdl_pos_adj:BDL position adjustment offset. (array of int)
parm:          probe_mask:Bitmask to probe codecs (default = -1). (array of int)
parm:          probe_only:Only probing and no codec initialization. (array of int)
parm:          single_cmd:Use single command to communicate with codecs (for debugging only). (bool)
parm:          enable_msi:Enable Message Signaled Interrupt (MSI) (int)
parm:          patch:Patch file for Intel HD audio interface. (array of charp)
parm:          align_buffer_size:Force buffer and period sizes to be multiple of 128 bytes. (bool)
parm:          snoop:Enable/disable snooping (bool)

And a quick diff

Code:

5c5
< parm:          position_fix:DMA pointer read method.(-1 = system default, 0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO, 4 = COMBO). (array of int)
---
> parm:          position_fix:DMA pointer read method.(0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO). (array of int)
9d8
< parm:          jackpoll_ms:Ms between polling for jack events (default = 0, using unsol events only) (array of int)
11,14c10,12
< parm:          enable_msi:Enable Message Signaled Interrupt (MSI) (bint)
< parm:          power_save:Automatic power-saving timeout (in second, 0 = disable). (xint)
< parm:          power_save_controller:Reset controller in power save mode. (bool)
< parm:          align_buffer_size:Force buffer and period sizes to be multiple of 128 bytes. (bint)
---
> parm:          enable_msi:Enable Message Signaled Interrupt (MSI) (int)
> parm:          patch:Patch file for Intel HD audio interface. (array of charp)
> parm:          align_buffer_size:Force buffer and period sizes to be multiple of 128 bytes. (bool)

Just as I expected, "bints"... But seriously, hopefully that means more to you then it does to me right now.

Quote:

3) speaking of building it yourself....well done
do you need hdmi?
I don't use it at the moment, but I guess I'd rather it be there then not.

Quote:

4) this must be a tower and not a laptop as image shows front items
Yeah that's correct. Sorry, guess I never specified that.

Quote:

5) Now in one hit, run alsamixer make changes but do not store just test sound
press m button to mute the following:
surround, center, LFE
at capture press the space bar to de-activate the mic

---test sound

We know your surround is useless as you have used the up or down arrows at the "channel mode" item to choose 2ch
No luck, It sounds the same as it always has. Without exposing my ignorance on this topic (I'm sure it was a secret before now), is the 2ch thing something I I should know more about? I know it has 4ch and 6ch as options, but I assume that's surround sound channels, right? Whatever, an issue for another time.

Quote:

1) did you know there is a setting in your bios to enable HD Audio = intel

2) But did you know there is a setting in there to enable AC97 legacy sound support
1) I guess I didn't, but I can't say I ever really thought about it.

2) Again, nope. A quick reboot led me to this menu which sure looks like HD audio is enabled. The front panel did have an option for AC97 which wasn't enabled.

Quote:

I just a quick read of your bios, that mobo is too nice for you, you better to send it to me to test fully....giggle
You laugh, but...

aus9 11-13-2013 05:18 PM

Hi

I may research your modinfo reply later but the easy stuff is

A) you use a headphone and have not indicated you need hdmi output or assumed connection to a stereo system and therefore no need for surround sound config
headphones work work with 2 channel as its 2 speakers to 2 ears
and yet you seem more advanced on Linux with your post count.

If you do decide you want surround sound, enable it in alsa mixer and see what happens to some of your tracks you listen to in your headphones
---it depends on how the track was built,
if built as a 2ch sound file there is no loss
if built as 5.1 or 6 ch you may experience some loss in your headphones

but you now know how to swap between them (in alsamixer using the up or down arrows at that setting) so feel free to experiement.

later on, when you decide to buy some fancy stereo system, you may be better off with a gui and thats one of the benefits of
pulseaudio ---changes on the fly

B) You ran a diff command against my output versus your output. That does not help as you can only rely on your settings not mine.
The reason for the diff is the alsa version in your image shows alsa at 1.0.26 while I have a different distro and am running 1.0.27.2

#############
as I don't use slackware, I would like you to report the executable for alsa, in Debian its /usr/sbin/alsa
Code:

sudo find / -name alsa -executable
2) when you find it, to save us doing a full reboot we will use it stop and start the sound daemon while editting your
/etc/modinfo.d/intel.conf or snd-hda-intel.conf

so I need you to confirm a dry run (no config change) that you have truly stopped daemon

eg
Code:

sudo /usr/sbin/alsa unload

aplay -l (my output follows not OP)
aplay: device_list:268: no soundcards found...

################################  then restart it with
sudo /usr/sbin/alsa reload
aplay -l (gives no hits in debian until I do this)
modprobe hda_hda_intel

Now I admit that I still don't like that realtek showing up, but I take your work that you have not enabled AC97 in bios

good hunting

aus9 11-13-2013 05:31 PM

AHH forgot to mention
when you have vlc, there is a headphone setting

go to pulldown tools -> effects and filters -> tab=audio effects tick box enable then pulldown preset----headphones

naturally you can also try out the other presets but I suggest you use headphones and adjust the sliders to your frequency deafness aspects
---not that I have any nor you, but you will after listening to headphones for a longish time----giggles


All times are GMT -5. The time now is 08:45 PM.