no system sound, but sound in vlc/xbmc works

I have an 11.3 machine that has been running fine for quite some time, and recently stopped playing system audio (or audio from websites like youtube). Audio for videos and audio played through vlc and/or xbmc works fine. Since this machine is mostly used as an htpc, it isn’t critical that sound work everywhere, but I do play Starcraft II (via wine) and occasionally watch youtube and other flash videos on it. So, I would like to figure out what happened to my sound.

Like I said, all sound was working previously. Then one day, system sounds just stopped. This has happened to me previously on this machine when I was running 11.2, but since a zypper dup to 11.3, it seemed to be fine. I was previously able to fix it by installing/reinstalling alsa-driver-kmp-desktop and restarting alsa (/etc/init.d/alsasound restart). I have tried that this time, but it doesn’t seem to fix it.

More hardware info:
I am using the optical out on a Gigabyte GA-EP45-UD3P motherboard connected to a receiver. Like I said, audio works just fine within xbmc and vlc, so I don’t think it is a hardware problem, likely a configuration somewhere.

Things I have tried so far:
Changing user accounts doesn’t help. No sound for root or a newly created user.
Removing sound card in Yast and reinstalling.
Installing the alsa-driver-kmp-desktop rpm from download.opensuse.org/repositories/multimedia:/audio:/KMP/openSUSE_11.3_Update
I think I have checked all the mute and volume settings in kmix and all are turned all the way up and not checked to be muted (except for mic, since I don’t have one).

As much other info I can think of to give:
alsa-info.sh output http://www.alsa-project.org/db/?f=93a395a074593f178d66bd73d49f1af654c77cac

htpc:~ # rpm -qa '*alsa*'
alsa-plugins-1.0.23-1.9.x86_64
alsamixergui-0.9.0rc1-746.1.x86_64
alsa-tools-1.0.23-1.8.x86_64
pyalsa-1.0.22-1.8.x86_64
alsa-oss-32bit-1.0.17-29.2.x86_64
alsa-tools-devel-1.0.23-1.8.x86_64
alsa-utils-1.0.23-1.8.x86_64
alsa-tools-gui-1.0.23-1.8.x86_64
alsa-devel-1.0.23-2.12.x86_64
alsa-1.0.23-2.12.x86_64
alsa-driver-kmp-desktop-1.0.23.20101210_k2.6.34.7_0.5-1.1.x86_64
alsa-oss-1.0.17-29.2.x86_64
alsa-plugins-32bit-1.0.23-1.9.x86_64
alsa-firmware-1.0.23-1.2.noarch
htpc:~ # rpm -qa '*pulse*'
libpulse0-32bit-0.9.21-10.1.1.x86_64
libpulse-mainloop-glib0-0.9.21-10.1.1.x86_64
libpulse0-0.9.21-10.1.1.x86_64
libpulse-browse0-0.9.21-10.1.1.x86_64
libpulse-devel-0.9.21-10.1.1.x86_64
htpc:~ # rpm -qa libasound2
libasound2-1.0.23-2.12.x86_64
htpc:~ # uname -a
Linux htpc 2.6.34.7-0.5-desktop #1 SMP PREEMPT 2010-10-25 08:40:12 +0200 x86_64 x86_64 x86_64 GNU/Linux
htpc:~ # zypper lr
# | Alias                   | Name                  | Enabled | Refresh
--+-------------------------+-----------------------+---------+--------
1 | Emulators_1             | Emulators             | Yes     | Yes    
2 | NVIDIA_Repository       | NVIDIA Repository     | Yes     | Yes    
3 | Packman_Repository      | Packman Repository    | Yes     | Yes    
4 | VideoLan_Repository     | VideoLan Repository   | No      | Yes    
5 | multimedia_1            | multimedia            | Yes     | Yes    
6 | openSUSE-11.2-Non-Oss_1 | openSUSE-11.3-Non-Oss | Yes     | Yes    
7 | openSUSE-11.3-Oss       | openSUSE-11.3-Oss     | Yes     | Yes    
8 | openSUSE-11.3-Update    | openSUSE-11.3-Update  | Yes     | Yes  

The only thing installed from the VideoLan repository is libdvdcss, and from the Emulators is NES, SNES, and PS emulators, and wine (fixes some problems with StarCraft II).

htpc:~ # cat /etc/modprobe.d/50-sound.conf
# u1Nb.GDpQEAJ8ayE:GA-EP45-DS5 Motherboard

alias snd-card-0 snd-hda-intel
options snd slots=snd-hda-intel
# u1Nb.GDpQEAJ8ayE:GA-EP45-DS5 Motherboard

I did also try changing this to be model=intel-alc889a and model=6stack-dig, but still no joy.

dmesg output after an /etc/init.d/alsasound restart

<snip>
[27577.513774] HDA Intel 0000:00:1b.0: PCI INT A disabled
[27577.542401] snd: Not freed snd_alloc_kmalloc = 600
[27577.542404] snd: kmalloc(72) from ffffffffa0f4092a not freed
[27577.542406] snd: kmalloc(528) from ffffffffa0f4092a not freed
[27577.632583] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[27577.632769] HDA Intel 0000:00:1b.0: irq 31 for MSI/MSI-X
[27577.632813] HDA Intel 0000:00:1b.0: setting latency timer to 64
[27577.652034] hda_codec: ALC889A: BIOS auto-probing.
[27577.652039] ALSA patch_realtek.c:1523: SKU: Nid=0x1d sku_cfg=0x4005e601
[27577.652043] ALSA patch_realtek.c:1525: SKU: port_connectivity=0x1
[27577.652046] ALSA patch_realtek.c:1526: SKU: enable_pcbeep=0x0
[27577.652048] ALSA patch_realtek.c:1527: SKU: check_sum=0x00000005
[27577.652051] ALSA patch_realtek.c:1528: SKU: customization=0x000000e6
[27577.652054] ALSA patch_realtek.c:1529: SKU: external_amp=0x0
[27577.652057] ALSA patch_realtek.c:1530: SKU: platform_type=0x0
[27577.652059] ALSA patch_realtek.c:1531: SKU: swap=0x0
[27577.652062] ALSA patch_realtek.c:1532: SKU: override=0x1
[27577.652067] ALSA hda_codec.c:4619: autoconfig: line_outs=4 (0x14/0x15/0x16/0x17/0x0)
[27577.652070] ALSA hda_codec.c:4623:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[27577.652073] ALSA hda_codec.c:4627:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[27577.652076] ALSA hda_codec.c:4628:    mono: mono_out=0x0
[27577.652078] ALSA hda_codec.c:4631:    dig-out=0x1e/0x0
[27577.652081] ALSA hda_codec.c:4632:    inputs:
[27577.652083] ALSA hda_codec.c:4638: 
[27577.652085] ALSA hda_codec.c:4640:    dig-in=0x1f
[27577.653401] ALSA patch_realtek.c:1580: realtek: No valid SSID, checking pincfg 0x4005e601 for NID 0x1d
[27577.653405] ALSA patch_realtek.c:1596: realtek: Enabling init ASM_ID=0xe601 CODEC_ID=10ec0885
[27577.657628] input: HDA Intel Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10

Trying any variation of aplay or speaker-test gives no errors, and

aplay -vv /usr/share/sounds/alsa/Front_*

I even see the volume bar moving at the bottom, but no sound.

Hopefully, I just missed something obvious, but I don’t see it. Maybe another pair of eyes will notice something I have missed.

My thought, since it seems to work for dvd and some other media, is that the digital output is working, but something is wrong with the analog. But, I don’t know enough to say that this is definitely the problem.

Hope someone sees something,
elserj

So that is lots of information there. Could I trouble you to try one other application? It is called mmcheck, a script file you can download and check for all multimedia files that are installed. Something I suggest when some things work while others do not.

MMCHECK - Check Your Multimedia in 10 Steps - Script File, as proposed by RedDwarf

Message #40 contains the most recent version of mmcheck. Check it out and let us know of the results.

Thank You,

Thanks for you reply. I tried the mmcheck script and aside from the fact that I had manually installed the 64-bit flash-player and disabled the rpm, it didn’t find anything wrong. Just in case, I did change back to the rpm, but it didn’t change anything.

Let me know if there is any other info you need.

elserj

If your system seems to go through the motions of working, but no sound (You have the mixing auto loading for instance) you have got to ask yourself if perhaps there is an issue with your speakers or the cable from your computer. Aside from a level control muted (like when using the headphone output which might get muted when set for “internal” speakers), you got to look through all of the mixer channels to make sure something is not missing. You have posted many of the things my start script looks for. Have you used start?

S.T.A.R.T. - SuSE Terminal Audio Reporting Tool

I didn’t put it in my original post, but yes, I did try the start script. I didn’t put it because the things it does, I did manually, like the aplay and speaker-test commands.

http://img822.imageshack.us/img822/1824/kmixsnapshot.th.png](http://img822.imageshack.us/i/kmixsnapshot.png/)

As far as I can tell, all the mixer volumes seem to be fine. The only ones not included above are all inputs, not output.

I don’t think there is a problem with the speakers or the cable as sound works just fine from vlc or xbmc, ie. on dvds, mp3s, or ripped videos.

elserj

Is this a KDE PC ? I’m guessing YES.

In your “zypper lr” output you have a ‘multimedia’ repository. What is that ?? Can you please provide the PRECISE URL of that repository ? That leaves me with trepidation, as the only multimedia repository that I know of in the OBS is very cutting edge and it will often break a user’s sound if they update from that repository.

If you are using KDE, what backend have you chosen for sound? You can see that by looking under:
KMenu (ie start menu) > Configure Desktop > Multimedia > Backend.
Is xine at the top of the list ? Gstreamer at the top ?

If xine is at the top, what have you done if anything, to try and tune xine (using the application xine-ui which will provide an ‘xine’ gui/front-end) ?

Yes, it is a KDE pc.

The multimedia repo is download.opensuse.org/repositories/multimedia:/audio:/KMP/openSUSE_11.3_Update. I only added it after my sound stopped working to add the alsa-driver-kmp-desktop rpm. When I had similar symptoms under 11.2, installing/reinstalling that seemed to fix it, but not this time.

To be clear, my sound broke before adding that, but I have left it enabled in case an update to alsa-driver-kmp-desktop fixes my issue.

I am using the xine backend, I just tried the gstreamer but it didn’t make a difference.

I have not made any changes to the xine config. I tried playing a file with xine and got no sound. But, the same file in vlc has sound. I did just notice something while doing this though, if I change the audio channel in vlc to be the AC3 one, it works, but I get no sound with AAC. I am not an expert on this, but doesn’t that mean that something is messed up in the mixer? Doesn’t AC3 go as passthru to my receiver, so my receiver is doing the decoding, while AAC is decoded on the computer? Don’t know if that helps, just trying to put out as much info as I can.

I really appreciate you guys helping me with this.

Have you installed the Packman packaged version of libxine1 ? Have you installed ‘xine-ui’ ?

Hmm, the plot thickens. I can play the exact same mp3 via xbmc just fine, but get no sound playing it in vlc. However, I have no menu navigation sounds in xbmc either. Also, I noticed that I can play both the AAC and AC3 streams in xbmc. This kind of makes sense to me as xbmc has its own audio/video player, not relying on the system’s.

More pieces to the puzzle I guess.

rpm -qa | grep xine
libxine1-1.1.19-2.pm.48.8.x86_64                                                                                                                                      
libxine1-gnome-vfs-1.1.19-2.pm.48.8.x86_64
libxine1-codecs-1.1.19-2.pm.48.8.x86_64
phonon-backend-xine-4.4.2-1.6.x86_64
xine-ui-0.99.6-1.pm.4.1.x86_64
xinetd-2.3.14-149.1.x86_64
kdebase4-runtime-xine-4.4.4-3.1.2.x86_64

Then launch xine. Right click on the xine window and select ‘settings’ > ‘setup’ > ‘gui’ and change the permissions to ‘master of the known universe’. Close xine and restart xine.

Then again select ‘settings’ > ‘setup’ > ‘audio’ and in ‘audio driver to use’ change it to ‘oss’ (which selects the alsa emulation of the oss driver). Then appy that, exit xine, and restart your desktop. Does that help ?

Note also, if you can not get sound to play in xine, then sound will NOT play in your browser nor your desktop startup if xine is the backend to your desktop.

Frankly, in my view, this is a very bad approach. You should immediately disable the multimedia repository.

I won’t debate this, … just note that many times those alsa drivers as packaged by the alsa packager are broken such that one’s sound is COMPLETELY broken, and sometimes it can take weeks or more before a fix appears. Is that what you want ? If it is then keep it enabled and correspond directly with that packager when things are broken, because I can’t help in such cases.

Now there is a problem with consistency here, with unknown to me consequences.

Your versions of alsa-plugins-1.0.23-1.9.x86_64, alsa-tools-1.0.23-1.8.x86_64,
alsa-oss-32bit-1.0.17-29.2.x86_64, alsa-tools-devel-1.0.23-1.8.x86_64, alsa-utils-1.0.23-1.8.x86_64, alsa-tools-gui-1.0.23-1.8.x86_64, alsa-devel-1.0.23-2.12.x86_64
alsa-1.0.23-2.12.x86_64, alsa-oss-1.0.17-29.2.x86_64, alsa-plugins-32bit-1.0.23-1.9.x86_64, libasound2-1.0.23-2.12.x86_64 and alsa-firmware-1.0.23-1.2.noarch are ALL INCONSISTENT with your version of alsa-driver-kmp-desktop-1.0.23.20101210_k2.6.34.7_0.5-1.1.x86_64

IMHO if you are going to update alsa-driver-kmp-desktop, and if you do so and have funny sound effects, you should also update those other alsa applications. You have not and that could also be a problem.

Have you seen this guide that I wrote (specifically the example images in that guide I posted for updating the many alsa apps): SDB:Alsa-update - openSUSE

One final thought. What version KDE ? If KDE-4.4.4 then what I noted above is applicable. If any other KDE version then forget what I advised, as I can not help in a non-standard KDE version case.

Sorry for the late response, I went to bed before your last few replies (it was 1 am here).

Tried changing the xine config to use oss as you requested, no change in sound, except that I got a popup saying that the alc889a analog had failed, and was falling back to digital.

Changed it back to alsa, again no change.

I followed your advice and changed all the alsa rpms (and libasound2) to the OBS versions as outlined on SDB:Audio troubleshooting - openSUSE to match the alsa-driver-kmp-desktop, but it still didn’t work. Should I change them all back to the original opensuse ones and remove the alsa-driver-kmp-desktop?
This is my current alsa rpm list:

justin@htpc:~> rpm -qa | egrep "alsa|asound"
alsa-tools-gui-1.0.23-11.2.x86_64
alsamixergui-0.9.0rc1-746.1.x86_64
libasound2-1.0.23-78.1.x86_64
alsa-driver-kmp-desktop-1.0.23.20101211_k2.6.34.7_0.5-1.1.x86_64
alsa-devel-1.0.23-78.1.x86_64
pyalsa-1.0.22-1.8.x86_64
libasound2-32bit-1.0.23-78.1.x86_64
alsa-1.0.23-78.1.x86_64
alsa-tools-1.0.23-11.2.x86_64
alsa-firmware-1.0.23-8.1.noarch
alsa-oss-1.0.17-56.2.x86_64
alsa-plugins-32bit-1.0.23-33.6.x86_64
alsa-tools-devel-1.0.23-11.2.x86_64
alsa-oss-32bit-1.0.17-56.2.x86_64
alsa-plugins-pulse-1.0.23-33.6.x86_64
alsa-utils-1.0.23-39.1.x86_64
alsa-plugins-1.0.23-33.6.x86_64

And yes, it is a standard KDE 4.4.4 install. I did just try installing Gnome to see if it was KDE specific, but had no sound there either.

It seems weird to me that the sound was working totally fine for weeks, and then stopped. I know that when it stopped, I wasn’t doing any updates or anything to the settings. I did notice that I was just doing some web browsing, etc and it was working, then I may have heard a “squelch”, then noticed my sound was gone. If you know of anything to grep through the logs for that might help, I would love to hear it. I don’t think it is a hardware problem though, as it works fine in some apps but not others. Also, this same thing used to happen to me sometimes on the same computer running 11.2, but I was always able to fix it by installing/reinstalling alsa and the alsa-driver. This is the first time this has happened to me since I did a zypper dup to 11.3, but it was working fine after the upgrade for a couple weeks.

I see from some looking around, that some people have been able to fix things by adding an asound.conf file. Do you think that might help me? If so, what should I put in it?

Again, I really appreciate your help.

If there is no error, I recommend you leave the xine setting at oss. The error is not natural.

Not just yet. Leave it as this.

So you are saying it worked in 11.2. Then you did a zypper dup to 11.3, and it stopped at that time? Or after?

Are you certain the hardware is not broken ? Plug in a headset and see if that gives sound.

Do not mess with asound.conf.

What is your criteria for stating sound does not work? Try each of the following in a terminal, first as a regular user and then with root permissions:

  • first:
 speaker-test -Dplug:front -c2 -l5 -twav
  • second, try again:
speaker-test -c2 -l5 -twav
  • third:
speaker-test -c2 -D hw:0,0 -t wav -l3
  • fourth, this next command has a volume meter at the bottom of its output with a changing number of #'s and %'s to show volume levels so run this command and tell me if the number of #'s and %'s are changing:
aplay -vv /usr/share/sounds/alsa/Front_*
  • fifth: and also:
aplay -vv /usr/share/sounds/alsa/test.wav

Do any of those give an indication of sound ?

I’m sorry if I wasn’t clear enough. I was saying that I had similar problems in 11.2, but could always fix them by reinstalling everything alsa related. Once I did the zypper dup to 11.3, all was working just fine, even without the added alsa-driver-kmp-desktop rpm, for a couple of weeks.

More info here, I did the zypper dup on Nov 13, sound was working fine until Nov 27, which according to /var/log/messages, was the first time since the upgrade that I did a sudo /etc/init.d/alsasound restart. Doing an rpm -qa --last shows that no packages were installed between Nov 22 and Dec 1, so it doesn’t seem to have been caused by an update.

Are you certain the hardware is not broken ? Plug in a headset and see if that gives sound.

If I plug a headset into the front jack, I do get sound from all tests, with no reboots or restarting alsa, so that seems promising. If the hardware was broken, wouldn’t I not get any sound via the optical out? Since sound does work in vlc/xbmc, doesn’t that indicate a software problem?

Do not mess with asound.conf.

You’re the expert here, but I was able to get audio out on another computer (Acer Revo 3700) via Nvidia HDMI by creating an /etc/asound.conf file. Of course, in that case, the computer never had sound to start with, so that was a different situation.

What is your criteria for stating sound does not work? Try each of the following in a terminal, first as a regular user and then with root permissions:

  • first:
 speaker-test -Dplug:front -c2 -l5 -twav
  • second, try again:
speaker-test -c2 -l5 -twav
  • third:
speaker-test -c2 -D hw:0,0 -t wav -l3
  • fourth, this next command has a volume meter at the bottom of its output with a changing number of #'s and %'s to show volume levels so run this command and tell me if the number of #'s and %'s are changing:
aplay -vv /usr/share/sounds/alsa/Front_*
  • fifth: and also:
aplay -vv /usr/share/sounds/alsa/test.wav

Do any of those give an indication of sound ?

Again, sorry if I wasn’t clear enough, but these are the tests I’ve been using. As I stated before, all give no errors, but no sound via the optical out (which does get sound out in vlc/xbmc) with either a regular user or root. I had not tested before with headphones, but all tests do output sound via headphones connected to the front jack. I do see the #'s and %'s indicating sound on the aplay tests in either case.

As I have yet to see an actual error message, it is acting like I have something muted, but in post #5, I showed my kmix, and I see nothing muted. The only channels I don’t have set as visible in kmix are Front Mic Boost, Capture 1,2,3 and Input Source 1,2,3.

However, I noticed that in alsamixer, I see 2 that I don’t see in kmix. They are S/PDIF and S/PDIF default PCM (unless they are labeled as iec958 in kmix?). They aren’t muted, but I can’t change the volume at all, maybe that is normal. Well, here is a screenshot of alsamixer:
http://img502.imageshack.us/img502/3586/alsamixerv.th.png](http://img502.imageshack.us/i/alsamixerv.png/)

I’m tempted to do a reinstall to see if that works, but I would like to avoid that for 4 reasons:

  1. It is such a Windows solution to fix stuff by reinstalling.
  2. I have a 4TB software raid on here I don’t want to redo. I have backups, but that would suck if something was messed up during the reinstall that I lose the data on there. I know that in theory it should be fine, but you never know.
  3. As this computer is hooked up to our main TV, the only times I get to work on it locally are when my family isn’t watching TV or movies on it. That is why my responses are sporadic, I only get so much time on it to play around.
  4. Even if a reinstall temporarily fixed it, I could run into this again, and have to do it all again. I would much rather find a real solution so that I can learn.

If I get a chance to tomorrow, I will try the coaxial out rather than the optical to see if that makes a difference. If that fixes it, I might just call it good. I hope I have an extra coax in on my receiver, can’t remember right not why I went with the toslink…

YES!!! A bit more googling came up with the solution! All I had to do was run

iecset audio on 

as root. This site gave me the solution:
https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#S.2FPDIF_Output_Does_Not_Work

A google search on “iecset audio on” led me to this page:
TuxCoder: Solving Digital Audio Playback Issues in Linux which describes my exact problem (sound works in xbmc but not much else).

Apparently my google-fu was not strong enough initially to find that. I have never seen that command before. Won’t forget it now. :wink:

Should I go back to the opensuse alsa rpms and remove alsa-driver-kmp-desktop since it doesn’t seem to fix it? It seems to me that if it works with the default ones, I should go back to those in case there were unintended consequences from the bleeding edge files.

Great. Glad to read this works. I’ve never heard of this before, but I confess it was only on your very last post that it became clear to me that your sound worked with headphones, but the optical did not work.

I’ll have to give that a read later today or this week. I’m pretty busy today trying to sort a problem with a friend’s laptop.

I would remove them if I were you and try to roll back. The ‘risk’ with these current cutting edge updates is the next kernel update will break your sound, as those rpms are built to a specific kernel version.