![]() |
13.1 "VLC failed to initialize your sound output device" if opened after Firefox
Hello,
I've been having a recurring problem on Slackware64 13.1. If I open VLC (or any other media player available for Slackware) before I open Firefox, then my sound works 100% and there's never any problem, however, if I open Firefox first, and there happens to be a flash video loading, then any other media player (mplayer-plugin, Amarok or VLC) will fail to play sound. VLC tells me: Quote:
I've been using Slackware64 for a few months now, I'm on my first ever install and for the most part I'm loving it. Been working through the little things that have been annoying me, and for the most part I've managed to find solutions either by reading the Slackbook, by browsing LQ or by doing a quick Google search. However, I can't seem to find any reference to this specific problem anywhere and I'm not sure what I should do. I'll give the output to any command you might find useful. Thanks for any help you can give. |
Which plugins/addons are you using in Firefox?
Installing alsa-lib from source should be easy... scripts should be available. You can provide more verbose output (or through debug packages). Post /var/log/user.log (relevant parts) |
I've got mplayer-plugin and Flash player 10 installed, both using slackbuilds.org, and I've got Greasemonkey, Adblock Plus, and Compact menu addons installed. Though the problem has existed for as long as Flash has been installed.
Here is the output of vlc -v Code:
VLC media player 1.1.0-rc The Luggage (revision exported)Also, I don't think updating to alsa-lib 1.0.24 will work, since on the alsa official site, the latest software source release is listed as 1.0.23. |
Go to system settings --> multimedia and fix the problem
|
Configure your software to use ALSA output. If it goes for OSS it will try to block the card, which is impossible if there is already another audio app running.
|
By the way, let me post my ~/.asoundrc file here: This is on EeePC 1005HA. The "convert_mic" device is created to workaround a problem of this computer's Intel HDA card when using certain software, so you probably won't need it, therefore you can use noconvert_mic instead.
Code:
pcm.convert_mic { |
Edit: Deleted double post.
|
Sorry to be a pain, but I want to be as clear as possible about this so that I can at least avoid human error. In my experience I'm the most detrimental thing to my system's stability, so please forgive my caution :)
@ amani: I've tried going into System Settings > Multimedia, but I can't find a way of changing whether something uses alsa or OSS, and the order of the sound cards seems to be correct already, with "HDA Intel (STAC92xx Analog)" preferred over "HDA Intel, INTEL HDMI 0 (HDMI audio output)" and "Esound (ESD)" - with the second option making no sound when tested, and the latter falling back to "HDA Intel (STAC92xx Analog)." If there is a way of fixing this problem through System Settings in KDE, I can't figure it out. @ IIgar: in VLC > Tools > Preferences > Audio, "Output module" is already set to "ALSA audio output" and "Device" is set as "HDA Intel: STAC92xx Analog (hw:0,0)" - with the other options being "HDA Intel: INTEL HDMI 0 (hw:0,3)" and "HDA Intel: STAC92xx Digital (hw:0,4)." Does this sound OK? I don't currently have a ~/.asoundrc, should I make one as normal user or as root? And if I do this, would I need to point alsa to it manually, because if that's the case, I'm not entirely clear how to do that and I don't want to do anything that could make it harder to solve this problem in future. |
Just create that .asoundrc file in your home directory (I think /etc/asound.conf is the global file if you want). You shouldn't need to do anything after that -- the new settings should take effect immediately (but you should restart your audio apps, of course).
|
OK, I did what you said, creating .asoundrc as normal user using vim, including everything after "pcm.noconvert_mic", then I closed all audio apps and restarted x for good measure, but the problem is exactly as before. If I have mplayer-plugin running in FF, with no flash videos using sound, then all other sound apps work fine, and if I open VLC first and play a file, then sound works fine regardless of if flash is running or not. However, if I open FF, go to youtube (for example) play a video, then pause and try playing a file in VLC, I get the exact same error message and no sound in any other multimedia apps either (only flash will play audio, though skype, and notification sounds also work fine). Flash seems to be the problem, so might upgrading to 10.1 help?
|
If you only copied the part after noconvert_mic, you should replace the line
pcm "convert_mic" with pcm "noconvert_mic" If you didn't do that the .asoundrc script will give an error and won't take effect. Otherwise I don't understand why it's not working. This "dmix" solution has always worked for me. |
OK, I did what you said, having copied your scrips starting with pcm.noconvert_mic (leaving out the first section) and changed
pcm "convert_mic" to pcm "noconvert_mic" Leaving everything else exactly as written, closing all audio apps, restarting x, it seems to have made no difference whatsoever - if I open a flash video, no other audio apps work, either in FF or anywhere else. I also tried copying the entire script, from the start and making the same change, but that makes no difference either. I created the ~/.asoundrc as normal user, rather than su-ing to root, I assume that's correct seeing as it's in /home. Should I have done it as root? This is, literally, the only flaw left in a system that I'm otherwise extremely happy with, and it's not normally a big deal, I just make sure the first thing I do when I log into KDE is open a file with VLC, then everything works perfectly - it's just annoying. [edit] actually, your script seems to have made things worse - now if I open VLC first, I get zero audio in flash in FF :S [edit] oh, no. Even after deleting .asoundrc, the problem persists, now no flash videos play sound if VLC or mplayer is playing a file... I have no idea why that could possibly be. I'm properly confused. |
Uhh -- I'm confused as well. Does the Flash plugin use OSS or alsa? If it tries to use OSS then it will fail even with this fix. Sometimes old software using OSS is upgraded to use ALSA, so you may consider upgrading the plugin. However I doubt that this is necessary for Flash, because I've used this sort of fix for several years now and it always worked.
One more (admittedly hopeless) attempt: Does running Firefox as Code:
aoss firefoxEdit: Btw, when you use that asoundrc, configure your software to use the "default" output device. If you explicitly tell them to use the card (hw0) it won't owrk. |
OK, up until now, I've had things set to use hw0, so I'll try all the variations of your script with applications set to use default. If none of those work, I'll try "aoss firefox", and if that doesn't work, I think I'll uninstall flash 10 and upgrade to 10.1, since it doesn't seem likely that will make things worse. Plus, I've read on other forums that the new version of flash stops things from freezing up when you view videos in full screen, so even if it doesn't solve the sound problem, it'll be an improvement of some form :)
|
Good luck -- I'm about to set out for a week long trip, so this will probably be my last message for a while :).
|
| All times are GMT -5. The time now is 07:44 PM. |