You are not logged in.

#1 2013-03-29 22:34:29

youngian
Member
Registered: 2012-08-06
Posts: 22

[SOLVED] Sound problems after upgrading

Forgive me in advance for any vagueness on my part. I confess that I'm not entirely clear on how the sound on my system is set up - I've generally just been taking the path of least resistance, and as long as it works I don't worry about it too much.

I did an upgrade a couple days ago that pulled in a ton of new packages, new kernel, etc. Afterwards my sound is (partly) gone. It seems like maybe PulseAudio is working but Alsa isn't? Clementine, native HTML5 videos in Firefox, and speaker-test all have sound. Mplayer, flashplugin, and aplay do not have sound. I'm plugged into a Creative X-fi. There's also a card on the motherboard, but I don't use that one.

I checked alsamixer and unmuted anything that I thought might be to blame, still no luck.

https://i.minus.com/ibqvIkM70QjWVn.png

Here's the default option in alsa.

https://i.minus.com/idY2usYPGY6El.png

Here's the mixer for the Creative.

https://i.minus.com/ibpRAR9h7SBy2b.png

Here's the audio mixer applet with the various options. Both Creative options are unmuted and turned up.

$ sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: XFi [Creative X-Fi], device 0: ctxfi [Front/WaveIn]
  Subdevices: 255/256
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
<snip>
  Subdevice #255: subdevice #255
card 0: XFi [Creative X-Fi], device 1: ctxfi [Surround]
  Subdevices: 256/256
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
<snip>
  Subdevice #255: subdevice #255
card 0: XFi [Creative X-Fi], device 2: ctxfi [Center/LFE]
  Subdevices: 256/256
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
<snip>
  Subdevice #255: subdevice #255
card 0: XFi [Creative X-Fi], device 3: ctxfi [Side]
  Subdevices: 256/256
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
<snip>
  Subdevice #255: subdevice #255
card 0: XFi [Creative X-Fi], device 4: ctxfi [IEC958 Non-audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Intel [HDA Intel], device 1: AD198x Digital [AD198x Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
$ lsmod | grep '^snd' | column -t
snd_hda_codec_hdmi    27848   4
snd_hda_codec_analog  79922   1
snd_ctxfi             97609   3
snd_hda_intel         34194   6
snd_hda_codec         102453  3   snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_analog
snd_hwdep             6428    1   snd_hda_codec
snd_pcm               78146   4   snd_ctxfi,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc        7426    3   snd_ctxfi,snd_pcm,snd_hda_intel
snd_timer             18934   1   snd_pcm
snd                   60156   26  snd_ctxfi,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec,snd_hda_intel,snd_hda_codec_analog

Please let me know if there's anything else I can add to help troubleshoot. Being inexperienced with sound stuff, I don't know where to look.


-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --

Last edited by youngian (2014-01-03 07:21:28)

Offline

#2 2013-04-01 07:17:53

felixculpa
Member
From: Alberta, Canada
Registered: 2012-06-12
Posts: 185

Re: [SOLVED] Sound problems after upgrading

I think I am having a related issue.  Sound will not work for youtube, mplayer or dragon player. However it works for speaker tests and amarok.

Offline

#3 2013-04-02 20:30:16

kev717
Member
Registered: 2011-06-08
Posts: 49

Re: [SOLVED] Sound problems after upgrading

I had a similar problem recently using an intel sound card (the module is snd_hda_intel i believe - HDA ATI SB in alsamixer), but my problem was that there would be absolutely no sound after resuming from suspend.  Restarting the computer fixed the sound for me, but that's not a very good solution to the problem.

There is another way potentially:
Open alsamixer and navigate to your sound card.  Press <F5> to show all information.  Navigate to the right and see if you find an option labelled "Dynamic Power-Control".  If it's enabled, disable it.  That restored sound for me.

Hopefully this helps.

--
kev717

Offline

#4 2013-04-02 20:44:28

zebulon
Member
Registered: 2008-10-20
Posts: 235

Re: [SOLVED] Sound problems after upgrading

Same issue for me, also using Intel sound driver. KMix has changed, it does not show the pulseaudio channels anymore, but the HDA Intel Mix. Is it a pulse problem?

Offline

#5 2013-04-02 21:11:05

cookiecaper
Member
Registered: 2007-09-22
Posts: 196

Re: [SOLVED] Sound problems after upgrading

Yes, it's most likely a Pulse problem. Add pulseaudio --start to your .xinitrc or just go to /etc/pulseaudio/client.conf and set "autospawn" back to "yes" and see if that fixes it. This resolved my problem with gnome's media keys not working anymore.

Offline

#6 2013-04-03 05:40:53

bam211
Member
Registered: 2012-01-22
Posts: 11

Re: [SOLVED] Sound problems after upgrading

cookiecaper wrote:

Yes, it's most likely a Pulse problem. Add pulseaudio --start to your .xinitrc or just go to /etc/pulseaudio/client.conf and set "autospawn" back to "yes" and see if that fixes it. This resolved my problem with gnome's media keys not working anymore.

Thanks! Pusleaudio would not start after latest upgraded for me and the instructions from @cookiecaper worked for me.

Last edited by bam211 (2013-04-03 05:41:14)

Offline

#7 2013-04-04 03:41:38

youngian
Member
Registered: 2012-08-06
Posts: 22

Re: [SOLVED] Sound problems after upgrading

Thanks for the suggestions, folks. Unfortunately, none of them solved my issue. I did make one new discovery, thanks to this thread. None of the following work:

aplay sound.wav
aplay -D default sound.wav
aplay -D pulse sound.wav

But the following *do* work:

aplay -D sysdefault:CARD=XFi sound.wav
aplay -D front:CARD=XFi sound.wav

I'm not sure what this means. I've got a bad default or something?

Offline

#8 2013-04-07 05:55:13

youngian
Member
Registered: 2012-08-06
Posts: 22

Re: [SOLVED] Sound problems after upgrading

I made some progress on this. I can get sound again by putting the following in my ~/.asoundrc:

pcm.!default front:XFi

However, I'm not sure if this is the correct solution, or just a workaround. My /etc/asound.conf looks like it's sending to PulseAudio:

# Use PulseAudio by default
pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

# vim:set ft=alsaconf:

This seems normal, so I'm not sure why I need to override it. I'd like to be sending everything through Pulse, since that's the way of the future ...right? I'm not entirely clear on Pulse's relationship to alsa, or what exactly is failing on my system that I need to specify a default.

Offline

#9 2014-01-03 07:20:46

youngian
Member
Registered: 2012-08-06
Posts: 22

Re: [SOLVED] Sound problems after upgrading

Ok, I finally figured it out. Will document here in hopes that it helps others. Please excuse any vagueness or minor inaccuracies, this stuff is not my area of specialization.

As I expected, the key was gaining a better understanding of what roles each package plays. ALSA sits close to the hardware and drivers. It's the thing responsible for actually pumping sound into my sound card and out the speakers. PulseAudio sits on top of ALSA, and handles mixing different audio streams coming in from different sources, plus does a bunch of other fancy stuff if you ask it to. So Pulse mixes stuff into one sensible audio stream and pumps that into ALSA, which handles the hardware. Now one final layer: some legacy applications will only work with an ALSA device, but Pulse doesn't want to share ALSA with anyone - it wants everything to go through Pulse first. So Pulse provides an emulated ALSA device for these applications that looks like a sound card, but actually routes through Pulse. That's what the stuff in asound.conf is doing; setting the system's default audio device to be the emulated Pulse device.

Now to my specific problem. Pulse, for whatever reason, was using the wrong "sink" for audio output. It has several different sinks listed for my soundcard, but only one works. So with asound.conf intact, sound was being routed into Pulse and then out the wrong sink, thus no sound for me. When I added the line to my ~/.asoundrc, I was (I think) actually overwriting the default device so that it was no longer the emulated Pulse device. So even though the Pulse server was running, I was bypassing it and sending all my system sound straight to ALSA. This also explains some weird behavior I was seeing in my web browsers, where I got audio fine from Flash, but not from native HTML5 video.

To fix it, I got rid of my ~/.asoundrc, and left /etc/asound.conf as is. Then I had Pulse list all the available sinks for my sound card:

pactl list sinks

I tested each sink to find one that worked:

paplay /tmp/volumeTest.wav -d alsa_output.pci-0000_01_00.1.hdmi-stereo

Once I knew which one was the correct one, I set it as the default sink:

pactl set-default-sink alsa_output.pci-0000_05_00.0.analog-stereo

And then tested to make sure that Pulse was working, and that ALSA was routing things into Pulse:

paplay /tmp/volumeTest.wav
aplay -D default /tmp/volumeTest.wav

Offline

Board footer

Powered by FluxBB