Sound problem on Opensuse KDE 64 bit

Hi
Recently I replaced Kubuntu 10.04 32 bit on my laptop with Opensuse KDE 64 bit.

The laptop is Samsung r580 with an Intel i5 processor and a Nvidia Geforce video card.

When I was using Kubuntu with it all the hardware worked fine and I didn’t have any problems with it.

All of my hardware including my video card and wireless internet seems to be working with Opensuse, but sometimes sound stops working unexpectedly.

If I try to play a video with VLC when sound stops working VLC gives me this message:

Potential ALSA version problem:
VLC failed to initialize your sound output device (if any).
Please update alsa-lib to version 1.0.24 or higher to try to fix this issue.

I have the packages alsa, alsa-firmware, alsa-oss, alsa-plugins and alsa-utils installed.

I’ve also installed all the available updates for my system.

Please help me fix my problem.

@oldcpu will probably expect you to have done this and posted it here:

If that that does not help you get your basic sound working, please post in this “multimedia” sub-forum, providing in your post the following information:

  • provide the URLs (of a summary webpage) that are created by running the diagnostic script noted here:
    SDB:AudioTroubleshooting - openSUSE - Script to run to obtain detailed information. On openSUSE-11.1 and newer that will ask you to run the script /usr/sbin/alsa-info.sh and after the script finishes it will give you a URL to pass to the support personnel. Please post here the output URL. Just the URL. You may need to run that script twice (the first time with root permissions to update in the /usr/sbin directory, and the second time to get the URL).
  • in a terminal, or xterm, or konsole, type: rpm -qa ‘alsa#and post output here
  • in a terminal, or xterm, or konsole, type: rpm -qa ‘pulse#and post output here
  • in a terminal, or xterm, or konsole, type: rpm -q libasound2 #and post output here
  • in a terminal, or xterm, or konsole, type: uname -a #and post output here
  • for openSUSE-11.1 or earlier, in a terminal, or xterm, or konsole, type: cat /etc/modprobe.d/sound #and post output here
  • for openSUSE-11.2 or later, in a terminal, or xterm, or konsole, type: cat /etc/modprobe.d/50-sound.conf #and post output here

Hi

Here’s the url: http://www.alsa-project.org/db/?f=e15f5b1f1f3a40a29b374d9c063d9a288ecce674

And here are the outputs of the commands:

rpm -qa ‘alsa

alsa-utils-1.0.21-3.1.x86_64
alsa-1.0.21-3.2.x86_64
alsa-oss-1.0.17-25.2.x86_64
alsa-plugins-1.0.21-3.3.x86_64
alsa-firmware-1.0.20-3.2.noarch

rpm -qa ‘pulse

libxine1-pulse-1.1.18.1-1.pm.38.3.x86_64
libpulse0-0.9.21-1.2.1.x86_64

rpm -q libasound2

libasound2-1.0.21-3.2.x86_64

uname -a

Linux linux-ndl1 2.6.31.12-0.2-desktop #1 SMP PREEMPT 2010-03-16 21:25:39 +0100 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/modprobe.d/50-sound.conf

options snd slots=snd-hda-intel

u1Nb.hlCmkkcL1mD:5 Series/3400 Series Chipset High Definition Audio

alias snd-card-0 snd-hda-intel

I confess I have not see that error before. I just checked the alsa web page and alsa 1.0.24 does not even exist yet !! What a strange message from vlc advising an update to vapourware. Is that a typo ?

Typically, when sound works, and then does not work, it is because some other application has seized the audio device and refuses to share it.

What you could do is learn a bit more about the files that are open when an application is using the audio device so as to understand the sound state when sound is not functioning. You can do that with the “lsof” (list of open files) command, because applications that play sound MUST open some files associated with the audio device. And that way by examining the open files when this happens, you can confirm if indeed my assessment is correct that an application has seized the audio device.

The way to do that is to run this command:

 lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*

(note the “snd/*” is different from the rest) and run that command on these occasions:

  1. after PC 1st boots with no audio playing
  2. when successfully playing audio with some application,
  3. when audio unexpectedly stops working and refuses to play
    In EACH case save the output to a text file. Label the file (or add some text) so you know what app was playing when the command run and output saved). Keep that file. Then after complete (when audio does not work, and also after you restart the sound) compare all the files. And then deduce if any any application is accessing the audio device when sound does not work.

I also suspect that when sound does not work, you could go to YaST to restart the sound device, or you could type:

su -c 'rcalsasound restart'

and enter root password, and restart your mixer (kmix in kde) and that will do the same to restarting sound and clearing any inappropriate lock on your audio device.

… also, vlc is not a good application for testing sound functionality. Note also that there are at least 2 suppliers for vlc and they are not compatible with each others packaging. It is typically recommended by myself and others on this forum not to mix applications from vlc with those from packman packagers, as that will cause problems with audio (and sometimes video) playing. Hence only use libdvdcss from videolan, and get all your other multimedia applications from Packman packagers. If you have a mix of videolan and packman packaged applications, I recommend you switch the source of the videolan packaged applications instead to packman packaged applications. You can always tell a packman packaged application by the ‘pm’ in the file version.

… also, vlc is not a good application for testing sound functionality. Note also that there are at least 2 suppliers for vlc and they are not compatible with each others packaging. It is typically recommended by myself and others on this forum not to mix applications from vlc with those from packman packagers, as that will cause problems with audio (and sometimes video) playing. Hence only use libdvdcss from videolan, and get all your other multimedia applications from Packman packagers. If you have a mix of videolan and packman packaged applications, I recommend you switch the source of the videolan packaged applications instead to packman packaged applications. You can always tell a packman packaged application by the ‘pm’ in the file version.

I was wondering about this, but the OP is supposed to have followed the multi-media guide.
I would agree with comment about VLC too. I generally use smplayer for all my needs.

Thanks for getting in on this Lee BTW.:slight_smile:

Thanks for helping me

I did what you said but there was no extra application open when sound stopped working.

Also the VLC I have installed is the one from the Packman repo.

Here are the files you asked me to create:

1 (After booting)

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
knotify4 1741 sixtyfour 12u CHR 116,6 0t0 4714 /dev/snd/controlC0
kmix 2084 sixtyfour 10u CHR 116,6 0t0 4714 /dev/snd/controlC0

2 (When playing a video with audio with VLC)

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
knotify4 1741 sixtyfour 12u CHR 116,6 0t0 4714 /dev/snd/controlC0
kmix 2084 sixtyfour 10u CHR 116,6 0t0 4714 /dev/snd/controlC0
vlc 5153 sixtyfour mem CHR 116,3 4689 /dev/snd/pcmC0D0p
vlc 5153 sixtyfour 12r CHR 116,2 0t0 4474 /dev/snd/timer
vlc 5153 sixtyfour 13u CHR 116,3 0t0 4689 /dev/snd/pcmC0D0p
vlc 5153 sixtyfour 14u CHR 116,6 0t0 4714 /dev/snd/controlC0
xdg-scree 5188 sixtyfour 12r CHR 116,2 0t0 4474 /dev/snd/timer
xdg-scree 5188 sixtyfour 13u CHR 116,3 0t0 4689 /dev/snd/pcmC0D0p
xdg-scree 5188 sixtyfour 14u CHR 116,6 0t0 4714 /dev/snd/controlC0
xprop 5198 sixtyfour 12r CHR 116,2 0t0 4474 /dev/snd/timer
xprop 5198 sixtyfour 13u CHR 116,3 0t0 4689 /dev/snd/pcmC0D0p
xprop 5198 sixtyfour 14u CHR 116,6 0t0 4714 /dev/snd/controlC0

3 (When sound stopped working)

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
knotify4 1741 sixtyfour 12u CHR 116,6 0t0 4714 /dev/snd/controlC0
kmix 2084 sixtyfour 10u CHR 116,6 0t0 4714 /dev/snd/controlC0
xdg-scree 5188 sixtyfour 12r CHR 116,2 0t0 4474 /dev/snd/timer
xdg-scree 5188 sixtyfour 13u CHR 116,3 0t0 4689 /dev/snd/pcmC0D0p
xdg-scree 5188 sixtyfour 14u CHR 116,6 0t0 4714 /dev/snd/controlC0
xprop 5198 sixtyfour 12r CHR 116,2 0t0 4474 /dev/snd/timer
xprop 5198 sixtyfour 13u CHR 116,3 0t0 4689 /dev/snd/pcmC0D0p
xprop 5198 sixtyfour 14u CHR 116,6 0t0 4714 /dev/snd/controlC0

Have you tried smplayer? Just to compare?!

Very useful infrmation here, Proves very helpful to me.

The problem here, I believe, is your xdg-screensaver and xprop, possibly both launched by vlc ??? have seized the audio device and are refusing to let it go and they are refusing to share the audio device.

If it is vlc that is launching these two applications, then IMHO you may need to tune vlc such that it does NOT launch these.

I can’t recall from above, did you try:

su -c 'rcalsasound restart' 

and enter root password when prompted, to see if by restarting alsa you can break the grip of xdg-screensaver and xprop on your audio device?

Hi
When sound stopped working I did the command su -c ‘rcalsasound restart’
and then sound temporarily started working again.

I tried playing a video with smplayer but I got no sound, but when I played the same video with other video players (VLC, Gnome mplayer and Kaffeine) I got sound.

But soon sound stopped working with all video players and when I tried to play the previous video with VLC again I got the VLC error message again.

What audio output mode do you have selected in smplayer?

What is the output of the specified lsof command, when audio stops NOT after playing with vlc but with Gnome mplayer? Or when audio stops NOT after play with vlc but with Kaffeine? Please try to be precise.

Yes, again I believe, is your xdg-screensaver and xprop, possibly both launched by vlc ??? have seized the audio device and are refusing to let it go and they are refusing to share the audio device. Hence I think your vlc (or your desktop) is mis-configured.

I have the pulse audio output selected in smplayer.

Yes VLC is launching xdg-screensaver and xprop.

How do I stop VLC from doing this?

Set audio to alsa in smplayer

I have the same problem. The error is apparently not a typo. Here is a link to a changelog page for vcl: Download VLC Media Player 1.1.0 RC1 - Change Log - FileHippo.com

What I have been doing is to run alsaconf (yes, I know it won’t work in 11.2) and then kill it when it can’t find the sound card. That will force the sound driver to unload. I have tried using rmmod -f to force removal of the driver, but it seems to hang the sound system altogether and I end up having to reboot.
After running alsaconf and quitting it, I then modprobe the sound driver. It will work fine until the next time I open and close VLC.

The best workaround I can think of for now is to simply roll back to an earlier version of VLC.

Typically typing:

su -c 'rcalsasound restart'

will accomplish the same. You will also need to restart your mixer afterward in that case.

Hi

Thank you all for your replies.

I’ve selected alsa as the audio output in smplayer and now it works.

Thanks for the VLC changelog link.

Does anyone know when this problem with VLC will be fixed?

Good to know things are better.
Personally I have had no issues with VLC, unless I just haven’t noticed (I don’t use it much, preferring smplayer). But I assume the issue has be raised @Packman who does the packaging.
I always find VLC works quite well, but it seems to be in a constant flux, hence my pref to smplayer.
I am using VLC quite a bit in 11.3 mind you and it’s been a rock for me there. The fix will arrive at some point, but fortunately, in Linux we have plenty of choice in the mean time.

wrt VLC being in constant flux, I have to agree with caf4926 here. I think the reason is VLC uses ffmpeg for its codecs. However ffmpeg is in constant flux and hence ffmpeg is causing the same problem back on VLC.

ffmpeg being in constant development flux has its good points and bad points, but I think it can be annoying to the packagers, as when ffmpeg changes (which it does often) it affects MANY other applications which often need to be recompiled and repackaged.

I have been keeping track of this on the videolan wiki as well. They insist it is caused by a known alsa bug and alsa-lib 1.0.24 is required to fix it. They also state that alsa upgrade is available from the alsa tree, although I have searched high and low with no luck in finding it.
They do state that switching to pulse audio is a fix, but I have had very bad luck with pulse in my system.
My solution was to force a downgrade of VLC to version 1.0.6 and that has taken care of it.
Once VLC has a lock on alsa, it won’t let go, even to it’s self. If you close VLC and re-open it, the error occurs. Even KDE audio fails. The only way to get things working is to force alsa to restart.
For now, I will just stay with the older version of VLC and wait until alsa-1.0.24 becomes widely available.

Sorry, I should have included a link to the videolan forum: http://forum.videolan.org/viewtopic.php?f=13&t=77875