LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 08-07-2010, 10:01 AM   #1
RajahBrooke
Member
 
Registered: Jun 2010
Location: Warwickshire, England, UK
Distribution: Slackware 13.1
Posts: 45

Rep: Reputation: 22
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:
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.
Now, I'm happy to do that if it will actually fix the problem, though I'll have to figure out how seeing as I'm something of a n00b. The thing is that I've not really done anything to alsa except run alsaconf on my first boot, so I'm not sure if that's really the problem

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.
 
Old 08-07-2010, 10:14 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,758

Rep: Reputation: Disabled
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)
 
Old 08-07-2010, 10:32 AM   #3
RajahBrooke
Member
 
Registered: Jun 2010
Location: Warwickshire, England, UK
Distribution: Slackware 13.1
Posts: 45

Original Poster
Rep: Reputation: 22
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)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
Warning: call to signal(13, 0x1)
Error: call to XSetErrorHandler((nil))
Error: call to XSetIOErrorHandler((nil))
Blocked: call to setlocale(6, "")
Blocked: call to sigaction(17, 0x7f4323ac1b30, 0x7f4323ac1a90)
Error: call to XSetErrorHandler(0x7f4324be23a0)
Error: call to XSetIOErrorHandler(0x7f4324be2370)
Blocked: call to setlocale(6, "")
Warning: call to signal(13, 0x1)
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
(32627) KSycocaPrivate::openDatabase: Trying to open ksycoca from  "/var/tmp/kdecache-chris/ksycoca4"
Blocked: call to putenv("LANGUAGE=")
Warning: call to rand()
Blocked: call to signal(12, 0x7f4320630f10)
Warning: call to signal(13, 0x1)
Warning: call to rand()
Warning: call to rand()                                                                  
Warning: call to rand()                                                                  
Warning: call to sigaction(13, 0x7f4323abe210, (nil))                                    
Warning: call to rand()                                                                  
Warning: call to rand()                                                                  
Warning: call to rand()                                                                  
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
 m_el[mi_level] == NULL
 arrrrrrrrrrrrrg Up cannot escape itself
 m_el[mi_level] == NULL
 arrrrrrrrrrrrrg Up cannot escape itself
[0x952438] avcodec decoder warning: refusing to decode non validated subtitle codec
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Blocked: call to setlocale(1, "C")
Blocked: call to setlocale(1, "en_US")
Blocked: call to setlocale(1, "C")
Blocked: call to setlocale(1, "en_US")
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
[0x7f43140352a8] alsa audio output warning: audio device: default is already in use
[0x7f43140352a8] oss audio output error: cannot open audio device (/dev/dsp)
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
Blocked: call to sigaction(11, 0x7f430f4748a0, (nil))
Blocked: call to sigaction(7, 0x7f430f4748a0, (nil))
Blocked: call to sigaction(8, 0x7f430f4748a0, (nil))
Blocked: call to sigaction(3, 0x7f430f4748a0, (nil))
Warning: call to sigaction(14, 0x7f430f4748a0, (nil))
[0x7f43140352a8] main audio output warning: PTS is out of range (-9957), dropping buffer
[0x7f43140352a8] main audio output warning: PTS is out of range (-21907), dropping buffer
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
Warning: call to rand()
[0xbaf8d8] main video output warning: vlc_object_find_name(postproc) is not safe!
[0xbaf8d8] main video output warning: late picture skipped (258428 > -1592)
[0xbaf8d8] main video output warning: late picture skipped (218428 > -1592)
[0xbaf8d8] main video output warning: late picture skipped (178428 > -1592)
[0xbaf8d8] main video output warning: late picture skipped (58428 > -1592)
[0xbaf8d8] main video output warning: late picture skipped (98428 > -1592)
[0xbaf8d8] main video output warning: late picture skipped (18428 > -1592)
[0xbaf8d8] main video output warning: late picture skipped (30383 > -1319)
[0xbaf8d8] main video output warning: late picture skipped (16646 > -929)
[0xbaf8d8] main video output warning: late picture skipped (96646 > -929)
[0xbaf8d8] main video output warning: late picture skipped (56646 > -929)
[0xbaf8d8] main video output warning: late picture skipped (120069 > -890)
[0xbaf8d8] main video output warning: late picture skipped (160069 > -890)
[0xbaf8d8] main video output warning: late picture skipped (69 > -890)
[0xbaf8d8] main video output warning: late picture skipped (80069 > -890)
[0xbaf8d8] main video output warning: late picture skipped (40069 > -890)
It says that the sound device is already in use.

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.

Last edited by RajahBrooke; 08-07-2010 at 10:36 AM. Reason: added the bit about the alsa official site
 
Old 08-07-2010, 10:51 AM   #4
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,758

Rep: Reputation: Disabled
Go to system settings --> multimedia and fix the problem
 
Old 08-07-2010, 10:52 AM   #5
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
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.
 
Old 08-07-2010, 10:57 AM   #6
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
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 {
        type route
        slave {
                pcm "plughw:0"
                channels 2
        }
        ttable {
                0 {
                        1 1.0
                        1 1.0
                }
        }
}
pcm.noconvert_mic {
        type route
        slave {
                pcm "plughw:0"
        }
}

pcm.!default {
        type asym
        playback {
                pcm "swmixer"
        }
        capture {
                pcm "convert_mic"
        }
}

pcm.swmixer {
type dmix
ipc_key 1234
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
}
 
Old 08-07-2010, 10:57 AM   #7
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
Edit: Deleted double post.

Last edited by Ilgar; 08-07-2010 at 10:59 AM.
 
Old 08-07-2010, 11:36 AM   #8
RajahBrooke
Member
 
Registered: Jun 2010
Location: Warwickshire, England, UK
Distribution: Slackware 13.1
Posts: 45

Original Poster
Rep: Reputation: 22
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.
 
Old 08-07-2010, 11:46 AM   #9
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
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).
 
Old 08-07-2010, 12:09 PM   #10
RajahBrooke
Member
 
Registered: Jun 2010
Location: Warwickshire, England, UK
Distribution: Slackware 13.1
Posts: 45

Original Poster
Rep: Reputation: 22
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?

Last edited by RajahBrooke; 08-07-2010 at 12:13 PM.
 
Old 08-07-2010, 12:57 PM   #11
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
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.
 
Old 08-07-2010, 01:38 PM   #12
RajahBrooke
Member
 
Registered: Jun 2010
Location: Warwickshire, England, UK
Distribution: Slackware 13.1
Posts: 45

Original Poster
Rep: Reputation: 22
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.

Last edited by RajahBrooke; 08-07-2010 at 01:54 PM.
 
Old 08-07-2010, 02:06 PM   #13
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
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 firefox
any difference?

Edit: 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.

Last edited by Ilgar; 08-07-2010 at 02:08 PM.
 
Old 08-07-2010, 02:29 PM   #14
RajahBrooke
Member
 
Registered: Jun 2010
Location: Warwickshire, England, UK
Distribution: Slackware 13.1
Posts: 45

Original Poster
Rep: Reputation: 22
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
 
Old 08-07-2010, 03:50 PM   #15
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
Good luck -- I'm about to set out for a week long trip, so this will probably be my last message for a while .
 
  


Reply

Tags
alsa, firefox, vlc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"failed to execute child process" "Input/output error" fl.bratu Fedora 4 12-15-2008 05:03 AM
Mplayer sound error: "Could not open/initialize audio device -> no sound" GTBlackwell Linux - Software 9 06-11-2008 03:23 PM
xine "Audio output unavailable. Device is busy." - Firefox problem wild_oscar Linux - Software 1 01-12-2008 10:40 AM
"Failed to initialize the NVIDIA graphics device" WTH went wrong with driver install Ohmn Mandriva 3 06-29-2004 11:29 PM
another "device /dev/dsp can't be opened (device does not exist)" in DEBIAN, woody Kroppus Linux - Hardware 12 11-13-2003 01:23 PM


All times are GMT -5. The time now is 10:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration