Bug 10343 - vlc audio broken - connection refused
Summary: vlc audio broken - connection refused
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
Depends on:
Blocks:
 
Reported: 2013-05-29 14:40 CEST by Frank Griffin
Modified: 2014-07-17 19:07 CEST (History)
3 users (show)

See Also:
Source RPM: vlc
CVE:
Status comment:


Attachments
vlc error popup (18.55 KB, image/png)
2013-05-29 14:42 CEST, Frank Griffin
Details
screenshot of KDE device popup (66.41 KB, image/png)
2013-05-31 14:17 CEST, Frank Griffin
Details

Description Frank Griffin 2013-05-29 14:40:34 CEST
I first encountered this on my desktop, but now it's happening on a laptop as well.  I inquired about this on the dev ML, and someone responded that they weren't having the problem, but with two machines now involved, it has to be a bug.

Attempting to play any sort of movie in VLC opens the film with no audio,and a popup saying that the device "default" cannot be used because a connection was refused.  I'll attach a screenshot.

I'm using pulseaudio, just as installed.  This is a recent fresh cauldron install (just prior to MGA3 release), updated daily.

Reproducible: 

Steps to Reproduce:
Comment 1 Frank Griffin 2013-05-29 14:42:27 CEST
Created attachment 4066 [details]
vlc error popup
Comment 2 Frank Griffin 2013-05-29 15:05:09 CEST
Some followup.

This affects only vlc.  Videos played under firefox are fine.

Googling shows that this problem is pretty widespread, but all the posts marked "SOLVED" involve uninstalling pulseaudio and forcing the use of alsa.  It also seems to be related to vlc 2.0 versus 1.13, with claims that a lot of plugins for 1.13 didn't make it to 2.0.  Possibly we have a missing requires on vlc for pulse systems ?
Manuel Hiebel 2013-05-29 19:37:55 CEST

Keywords: (none) => Triaged
CC: (none) => fundawang, shlomif

Comment 3 Shlomi Fish 2013-05-29 19:41:46 CEST
Hi Franks,

does this also happen to you with draksound configured not to use pulseaudio (which I always do)? Furthermore, can you try it in a new UNIX user account? (i.e add a new user, and login as it)?

Regards,

-- Shlomi Fish
Comment 4 Shlomi Fish 2013-05-29 20:06:27 CEST
Hi Frank,

here's what I found:

1. After I enabled Pulseaudio, then if I logged in in tty3 as my credentialys, and typed startx, then sound in VLC is working.

2. If I did "systemctl start prefdm.service" and logged in using that, then sound also worked.

3. Sound *did not* work in VLC if I typed "kdm" from a root console and logged in using that. I got an error in the console and when googling it found an Arch Linux bug report about it.

4. mplayer fell back on the OSS sound.

Regards, 

-- Shlomi Fish
Comment 5 Frank Griffin 2013-05-29 20:21:16 CEST
If I tried from an ID other than mine which had previously been used, I did not get the popup, but neither did I get any sound in either VLC or Kaffeine.  DragonPlayer worked.

If I tried from an ID which had never previously been logged on, everything worked.

I only get the popup, though, on my own ID.  However, DragonPlayer gives sound under my ID as well.

I get these results with either GDM or KDM.
Comment 6 Shlomi Fish 2013-05-29 20:38:33 CEST
(In reply to Frank Griffin from comment #5)
> If I tried from an ID other than mine which had previously been used, I did
> not get the popup, but neither did I get any sound in either VLC or
> Kaffeine.  DragonPlayer worked.

By "If I tried" you mean "When I tried", right?

> 
> If I tried from an ID which had never previously been logged on, everything
> worked.

If so, then this is likely a local user configuration problem. You can try inspecting the output of «strace -f -o vlc.strace vlc» (without the « and ») to see where the problem is.

> 
> I only get the popup, though, on my own ID.  However, DragonPlayer gives
> sound under my ID as well.

OK. Dragonplayer may be using the OSS interface. What does mplayer from the commandline with a path to the file give you?

> 
> I get these results with either GDM or KDM.

OK.

Regards,

-- Shlomi Fish
Comment 7 Frank Griffin 2013-05-29 21:56:15 CEST
(In reply to Shlomi Fish from comment #6)
> (In reply to Frank Griffin from comment #5)

> 
> By "If I tried" you mean "When I tried", right?

Quite so :-)

 
> If so, then this is likely a local user configuration problem. You can try
> inspecting the output of «strace -f -o vlc.strace vlc» (without the « and »)
> to see where the problem is.

Nothing really jumps out at me from the strace, except that a fork to run "/usr/bin/pulseaudio --start --log-target=syslog" completes with RC 1.

I tried running this from the command line standalone, and also got RC 1.  So I tried running "/usr/bin/pulseaudio --start --log-target=(filename)", and (filename) contained:


W  [pulseaudio] sink.c: Default and alternate sample rates are the same.
E  [pulseaudio] socket-server.c: bind(): Address already in use
E  [pulseaudio] module.c: Failed to load module "module-esound-protocol-unix" (argument: ""): initialization failed.
E  [pulseaudio] main.c: Module load failed.
E  [pulseaudio] main.c: Failed to initialize daemon.
E  [pulseaudio] main.c: Daemon startup failed.

I tried renaming both ~/.config/pulse and ~/.config/vlc, but the popup persists.

> OK. Dragonplayer may be using the OSS interface. What does mplayer from the
> commandline with a path to the file give you?

No sound, with similar complaints to vlc but more detailed:

[ftg@ftgme2 mm]$ mplayer ./MagicianInPark.wmv
MPlayer SVN-13.r35916.2.mga4.tainted-4.7.2 (C) 2000-2013 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing ./MagicianInPark.wmv.
libavformat version 54.63.104 (external)
ASF file format detected.
[asfheader] Audio stream found, -aid 1
[asfheader] Video stream found, -vid 2
VIDEO:  [WMV3]  320x240  24bpp  1000.000 fps  224.0 kbps (27.3 kbyte/s)
Load subtitles in ./
==========================================================================
Requested video codec family [wmv9dmo] (vfm=dmo) not available.
Enable it at compilation.
Requested video codec family [wmvdmo] (vfm=dmo) not available.
Enable it at compilation.
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 54.92.100 (external)
Selected video codec: [ffwmv3] vfm: ffmpeg (FFmpeg WMV3/WMV9)
==========================================================================
==========================================================================
Trying to force audio codec driver family libmad...
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 22050 Hz, 2 ch, floatle, 32.0 kbit/2.27% (ratio: 4006->176400)
Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
[AO_ALSA] alsa-lib: pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

[AO_ALSA] Playback open error: Connection refused
Failed to initialize audio driver 'alsa'
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
Failed to initialize audio driver 'oss'
No such audio driver 'esd'
No such audio driver 'arts'
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
[AO_ALSA] alsa-lib: pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

[AO_ALSA] Playback open error: Connection refused
AO: [pulse] Init failed: Connection refused
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
[JACK] cannot open server
ao_nas: init(): Can't open nas audio server -> nosound
[AO SDL] Samplerate: 22050Hz Channels: Stereo Format floatle
[AO SDL] Unsupported audio format: 0x1d.
[AO_ALSA] alsa-lib: pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

[AO SDL] Unable to open audio: No available audio device
DVB card number must be between 1 and 4
AO: [null] 22050Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 320x240 => 320x240 Planar YV12  [zoom]
A:  11.5 V:  11.5 A-V:  0.011 ct: -0.037 250/250  5%  0%  0.3% 0 0 

Exiting... (Quit)
Comment 8 Shlomi Fish 2013-05-31 11:52:55 CEST
Hi Frank,

(In reply to Frank Griffin from comment #7)
> (In reply to Shlomi Fish from comment #6)
> > (In reply to Frank Griffin from comment #5)
> 
> > 
> > By "If I tried" you mean "When I tried", right?
> 
> Quite so :-)
> 
>  
> > If so, then this is likely a local user configuration problem. You can try
> > inspecting the output of «strace -f -o vlc.strace vlc» (without the « and »)
> > to see where the problem is.
> 
> Nothing really jumps out at me from the strace, except that a fork to run
> "/usr/bin/pulseaudio --start --log-target=syslog" completes with RC 1.
> 
> I tried running this from the command line standalone, and also got RC 1. 
> So I tried running "/usr/bin/pulseaudio --start --log-target=(filename)",
> and (filename) contained:
> 
> 
> W  [pulseaudio] sink.c: Default and alternate sample rates are the same.
> E  [pulseaudio] socket-server.c: bind(): Address already in use
> E  [pulseaudio] module.c: Failed to load module
> "module-esound-protocol-unix" (argument: ""): initialization failed.
> E  [pulseaudio] main.c: Module load failed.
> E  [pulseaudio] main.c: Failed to initialize daemon.
> E  [pulseaudio] main.c: Daemon startup failed.
> 
> I tried renaming both ~/.config/pulse and ~/.config/vlc, but the popup
> persists.
> 
> > OK. Dragonplayer may be using the OSS interface. What does mplayer from the
> > commandline with a path to the file give you?
> 
> No sound, with similar complaints to vlc but more detailed:
> 
> [ftg@ftgme2 mm]$ mplayer ./MagicianInPark.wmv
> MPlayer SVN-13.r35916.2.mga4.tainted-4.7.2 (C) 2000-2013 MPlayer Team
> mplayer: could not connect to socket
> mplayer: No such file or directory
> Failed to open LIRC support. You will not be able to use your remote control.
> 
> Playing ./MagicianInPark.wmv.
> libavformat version 54.63.104 (external)
> ASF file format detected.
> [asfheader] Audio stream found, -aid 1
> [asfheader] Video stream found, -vid 2
> VIDEO:  [WMV3]  320x240  24bpp  1000.000 fps  224.0 kbps (27.3 kbyte/s)
> Load subtitles in ./
> ==========================================================================
> Requested video codec family [wmv9dmo] (vfm=dmo) not available.
> Enable it at compilation.
> Requested video codec family [wmvdmo] (vfm=dmo) not available.
> Enable it at compilation.
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> libavcodec version 54.92.100 (external)
> Selected video codec: [ffwmv3] vfm: ffmpeg (FFmpeg WMV3/WMV9)
> ==========================================================================
> ==========================================================================
> Trying to force audio codec driver family libmad...
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> AUDIO: 22050 Hz, 2 ch, floatle, 32.0 kbit/2.27% (ratio: 4006->176400)
> Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
> ==========================================================================
> AO: [pulse] Init failed: Connection refused
> Failed to initialize audio driver 'pulse'
> [AO_ALSA] alsa-lib: pulse.c:243:(pulse_connect) PulseAudio: Unable to
> connect: Connection refused
> 
> [AO_ALSA] Playback open error: Connection refused
> Failed to initialize audio driver 'alsa'

OK, this seems ominous. Just a question - do your users belong to the "audio" group? What does «grep -P '^audio:' /etc/group» from the command line say?

Regards,

-- Shlomi Fish
Comment 9 Frank Griffin 2013-05-31 14:13:24 CEST
Arggh.  I'd gotten used to replying to the bugs mail, and forgot there was actually a bug for this.  My last response didn't connect here, so here 'tis:

On 05/31/2013 05:52 AM, Shlomi Fish wrote:
>
> OK, this seems ominous. Just a question - do your users belong to the "audio"
> group? What does «grep -P '^audio:' /etc/group» from the command line say?
>
>
They don't, but they never have (the only one in the audio group is mythtv).

However, now I'm getting a popup from KDE whenever a removable volume is recognized, presenting a list of devices that KDE wants to delete because they are no longer present, and the audio ones are in the list.

*****************

I'll attach the screenshot of the popup.
Comment 10 Frank Griffin 2013-05-31 14:17:31 CEST
Created attachment 4085 [details]
screenshot of KDE device popup
Comment 11 Shlomi Fish 2013-05-31 14:32:23 CEST
Do you get sound with VLC on LXDE and/or IceWM instead of the KDE 4 desktop?

Regards,

-- Shlomi Fish
Comment 12 Frank Griffin 2013-06-11 17:19:38 CEST
(In reply to Shlomi Fish from comment #11)
> Do you get sound with VLC on LXDE and/or IceWM instead of the KDE 4 desktop?
> 
> Regards,
> 
> -- Shlomi Fish

No sound, but no popup either, on either LXDE or IceWM.

I forgot and responded to the ML again.  Here's the latest:

> Here's some more interesting stuff from syslog.  Any hints here ?
>
> Jun 11 09:01:50 ftgme2 pulseaudio[7472]: [pulseaudio] module.c: Failed
> to load module "module-esound-protocol-unix" (argument: ""):
> initialization failed.
> Jun 11 09:01:50 ftgme2 pulseaudio[7472]: [pulseaudio] main.c: Module
> load failed.
> Jun 11 09:01:50 ftgme2 pulseaudio[7472]: [pulseaudio] main.c: Failed to
> initialize daemon.
> Jun 11 09:01:50 ftgme2 pulseaudio[7469]: [pulseaudio] main.c: Daemon
> startup failed.

Ahh yes.

Maybe. It's not 100% conclusive tho'.

The typical issue with not being able to load that module is that
someone else is already listening on the /tmp/.esd-601/socket socket
(where 601 is your $UID)

Normally the only think listening here is PA itself (i.e. another
instance). So what would typically happen is that two PA deamons try to
startup at the same time (perhaps one via autospawn and another via XDG)
and the slightly slower one fails only when loading this module.

In that case it *should* be a harmless error that has no consequence,
but obviously it looks suspicious so we can't rule it out completely.

One thing to check is if the ESD socket folder/file is somehow now owned
by root rather than your user. You can also try commenting out the esd
module completely in the default.pa (it's pretty useless these days as
I'm not really sure of any important ESD client apps and, in fact, we
don't even ship a libesd anyway!). I should likely disable it by default
(kinda surprised I don't!)


AS a side note, the whole autospawn stuff isn't ideal. Suffice to say
I'll be *very* happy when we use systemd for the user session and we can
use it's socket based activation stuff and forget about the whole
autospawn stuff in PA itself. That should make things more robust (in
theory at least!).


Col
Comment 13 Frank Griffin 2013-06-11 17:27:14 CEST
(In reply to Frank Griffin from comment #12)
> One thing to check is if the ESD socket folder/file is somehow now owned
> by root rather than your user.

Nope.  Everything in there is owned by the user.

> You can also try commenting out the esd
> module completely in the default.pa (it's pretty useless these days as
> I'm not really sure of any important ESD client apps and, in fact, we
> don't even ship a libesd anyway!). I should likely disable it by default
> (kinda surprised I don't!)

There is no occurrence of "esd" in either /etc/pulse/default.pa or /etc/pulse/system.pa.
Frank Griffin 2013-06-11 17:27:58 CEST

CC: (none) => mageia

Comment 14 Frank Griffin 2013-12-05 16:52:08 CET
This is still happening in current cauldron.  I've deleted ~/.xine, ~.gstreamer*, ~/.cache/gstreamer*, and ~/.local/vlc, all without effect.

I also hooked the home directory up to a fresh install.  Still happens.
Comment 15 Frank Griffin 2014-07-17 19:07:11 CEST
Not sure what fixed this; I'm guessing the new KDE.  But it is fixed, and the annoying KDE popups asking me if I want KDE to "forget" half my devices (including audio) which I was getting every time I loaded a DVD are gone as well.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.