Problem with VLC and ALSA ("Potential ALSA version problem: please update alsa-lib")

Hello. I am running openSUSE 11.3 KDE x64. I have installed codecs per this guide. I have also installed VLC 1.1.0 from the Packman repository.

My output from the ALSA diagnostic script: http://www.alsa-project.org/db/?f=8b43d875b05694481e4f5c8cd6b99e504b255c6b.

The error message VLC is showing:

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

Sound in VLC does work even when this message is displayed though. The problems I have experienced (consistently):

If I start VLC while no other audio playback is in progress, it works well.

If I set Amarok to play back an MP3, then launch a movie in VLC, audio in both Amarok and VLC will still work, but I will get the ALSA error message as shown above.

If I start VLC first, then Amarok will not begin playing any tracks untill I have stopped playback in VLC. No error messages are displayed.

A package named “alsa” is installed from the openSUSE-11.3-Oss with version number 1.0.23-2.12-x86_64. This package contains a file called alsa-lib.

Any ideas how this can be fixed? It is not a critical problem. VLC does work, and I can also use Kaffeine, but it would still be nice to get VLC working without error messages.

Edit: Apologies, forgot a few points:

rpm -qa ‘alsa’:
alsa-1.0.23-2.12.x86_64
alsa-plugins-32bit-1.0.23-1.9.x86_64
alsa-utils-1.0.23-1.8.x86_64
alsa-plugins-pulse-32bit-1.0.23-1.9.x86_64
alsa-oss-1.0.17-29.2.x86_64
alsa-oss-32bit-1.0.17-29.2.x86_64
alsa-plugins-1.0.23-1.9.x86_64
alsa-plugins-pulse-1.0.23-1.9.x86_64

rpm -qa ‘pulse’:
pulseaudio-utils-0.9.21-9.2.x86_64
pulseaudio-0.9.21-9.2.x86_64
libxine1-pulse-1.1.18.1-1.37.x86_64
pulseaudio-module-zeroconf-0.9.21-9.2.x86_64
libpulse0-32bit-0.9.21-9.2.x86_64
pulseaudio-module-bluetooth-0.9.21-9.2.x86_64
alsa-plugins-pulse-32bit-1.0.23-1.9.x86_64
pulseaudio-module-gconf-0.9.21-9.2.x86_64
libpulse-mainloop-glib0-0.9.21-9.2.x86_64
pulseaudio-module-x11-0.9.21-9.2.x86_64
libpulse0-0.9.21-9.2.x86_64
libpulse-browse0-0.9.21-9.2.x86_64
pulseaudio-module-lirc-0.9.21-9.2.x86_64
alsa-plugins-pulse-1.0.23-1.9.x86_64

rpm -q libasound2:
libasound2-1.0.23-2.12.x86_64

uname -a:
Linux linux-n5dn.site 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/modprobe.d/50-sound.conf:
options snd slots=snd-hda-intel

u1Nb.gGJwngGnwiB:82801I (ICH9 Family) HD Audio Controller

alias snd-card-0 snd-hda-intel

I believe what you are seeing is vlc’s reaction to another device which for one reason or another is not sharing the audio device.

This happened to me once. Only once. But when this happenend I restarted the alsa sound driver with:

su -c 'rcalsasound restart'

and restarted my mixer with

kmix

and I played the identical video again with vlc and the problem disappeared.

My suspicion is by restarting the sound device with ‘rcalsasound restart’ I broke the hold of what ever application had seized the audio device. Next time (if there is a next time) it happens I may use the command

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

to see what devices (if any) have seized the audio device.

Not sure how to interpret the output of that command. But as I said the only problem is the error message in itself (and that Amarok can’t start playing a song if VLC is playing a video). Anyway, my output to the command is:

Nothing (that I have launched) running:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 17205 ivar 20u CHR 116,6 0t0 3915 /dev/snd/controlC0
pulseaudi 17205 ivar 26u CHR 116,6 0t0 3915 /dev/snd/controlC0
kmix 17251 ivar 11u CHR 116,6 0t0 3915 /dev/snd/controlC0

Amarok running:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 17205 ivar mem CHR 116,3 3912 /dev/snd/pcmC0D0p
pulseaudi 17205 ivar 20u CHR 116,6 0t0 3915 /dev/snd/controlC0
pulseaudi 17205 ivar 26u CHR 116,6 0t0 3915 /dev/snd/controlC0
pulseaudi 17205 ivar 32u CHR 116,3 0t0 3912 /dev/snd/pcmC0D0p
kmix 17251 ivar 11u CHR 116,6 0t0 3915 /dev/snd/controlC0

VLC running:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 17205 ivar 20u CHR 116,6 0t0 3915 /dev/snd/controlC0
pulseaudi 17205 ivar 26u CHR 116,6 0t0 3915 /dev/snd/controlC0
kmix 17251 ivar 11u CHR 116,6 0t0 3915 /dev/snd/controlC0
vlc 17396 ivar mem CHR 116,3 3912 /dev/snd/pcmC0D0p
vlc 17396 ivar 13r CHR 116,2 0t0 3647 /dev/snd/timer
vlc 17396 ivar 14u CHR 116,3 0t0 3912 /dev/snd/pcmC0D0p

Both VLC and Amarok running (here VLC is wont to give the error message, but VLC will still have sound). Note that Amarok must be started first here, as Amarok will not start playing something if VLC is already playing something:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 17205 ivar mem CHR 116,3 3912 /dev/snd/pcmC0D0p
pulseaudi 17205 ivar 20u CHR 116,6 0t0 3915 /dev/snd/controlC0
pulseaudi 17205 ivar 26u CHR 116,6 0t0 3915 /dev/snd/controlC0
pulseaudi 17205 ivar 33u CHR 116,3 0t0 3912 /dev/snd/pcmC0D0p
kmix 17251 ivar 11u CHR 116,6 0t0 3915 /dev/snd/controlC0

Is it strange that VLC is not listed in the last case, but both VLC and Amarok are still able to play audio?

If I set VLC to use “Simple DirectMedia Layer audio output” as the output module in VLC the error message does not appear (at least not in the cases outlined in my original post). Will this make my laptop explode sometime in the future, or is it an acceptable solution?

Hello!

I have the same problem. VLC starts mostly two times with sound, but sometimes not even once, sometimes three or four times, until I get repeatedly the above mentioned ALSA error and no more sound seems to be working.

Logging out and back on again seemed to fix it for another two times of VLC video experience and then again the same error.

I tried VLC with Default, ALSA, Pulseaudio, SDL and OSS audio output, with no success.

So, now the strange thing:

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

shows two main blockers:
lsof: WARNING: can’t stat() fuse.gvfs-fuse-daemon file system /home/bianca/.gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
xdg-scree 7512 luttztfz 12r CHR 116,2 0t0 35767 /dev/snd/timer
xdg-scree 7512 luttztfz 13u CHR 116,6 0t0 35830 /dev/snd/pcmC0D0p
xdg-scree 7512 luttztfz 14u CHR 116,10 0t0 35928 /dev/snd/controlC0
xprop 7530 luttztfz 12r CHR 116,2 0t0 35767 /dev/snd/timer
xprop 7530 luttztfz 13u CHR 116,6 0t0 35830 /dev/snd/pcmC0D0p
xprop 7530 luttztfz 14u CHR 116,10 0t0 35928 /dev/snd/controlC0

which xdg-screensaver

/usr/bin/xdg-screensaver

which xprop

/usr/bin/xprop

whatis xdg-screensaver

xdg-screensaver (1) - command line tool for controlling the screensaver

whatis xprop

xprop (1) - property displayer for X

Could the screensaver be blocking the audio device?!?

Anyway, thank you very much for workaround using “rcalsasound restart”. In KDE I made a small shell script, that invokes this as current user with kdesu:

#!/bin/sh
kdesu -c ‘alsasound restart’
kmix

This way kmix is started as current user (as opposed to running the whole scipt as root user) and kdesu is more GUI friendly than su.

Anyway, I would be happy if this issue were fixed once and for all, without the workaround.

Cheers,
Linux User #330250

Yes it could be blocking audio. Other users have reported this.

I’m currently on vacation in Asia (Vietnam, followed by Thailand) and since I’m on vacation my internet access will be very random and intermittent, so I may not look at this thread again for a long time.

I was having the same problem and this fixed it for me… Im guessing it was my browser since I was getting audio through that earlier!

Thanks oldcpu and Quantumboredom
:wink:

Have this issue too on all my opensuse11.2 installations (home PC x86_64, laptop x86_64, work PC x86)
kill -9 PID is my “workaround”…

Yup, same as rom-ale…

kill -KILL PID, where PID is the PID for xprop
or ksysguard can be used.