LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   pulseaudio not starting (https://www.linuxquestions.org/questions/linux-newbie-8/pulseaudio-not-starting-4175513049/)

GeoHex 08-02-2014 01:25 AM

pulseaudio not starting
 
I am trying to use skype, which requires pulseaudio. I compiled pulseaudio, and installed it. When starting pulseaudio I get the following error messages:
ash-4.2# /etc/rc.d/rc.pulseaudio start
E: [pulseaudio] core-util.c: Failed to create secure directory (/var/lib/pulse/.config/pulse): No such file or directory
Starting pulseaudio...
W: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/pulse/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/pulse/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/pulse/.pulse-cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/pulse/.pulse-cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/pulse/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/pulse/.config/pulse/cookie': No such file or directory
No protocol specified
E: [pulseaudio] client-conf-x11.c: xcb_connection_has_error() returned true
E: [autospawn] core-util.c: Failed to create secure directory (/var/lib/pulse/.config/pulse): No such file or directory
W: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
E: [pulseaudio] main.c: Failed to acquire autospawn lock

what am I doing wrong?

Shadow_7 08-02-2014 06:20 PM

There's generally additional groups beyond "audio" that a user needs to be in for pulse to work. And depending on the version it can be quirky if the rate of the hardware isn't set to 48kHz. Try adding the user to the "pulse" and/or "pulse-access" groups first.

Is there some reason that you compiled it versus using a distros package? For all of ubuntu's faults, the one thing they do well is pulseaudio by default. If you're looking for a quick fix for a potentially temporary problem.

GeoHex 08-03-2014 01:10 AM

I am sorry, but I forgot to mention the distro. I am using Slackware 14.1, and there is no repo of compiled packages. I downloaded the slackbuild script, and the source file, and built the package.

argeloos 08-04-2014 05:48 AM

Errors starting pulseaudio in Slackware 14
 
I have the same problem (also trying to get Skype to work)

Code:

slackware14:/etc/rc.d# sh ./rc.pulseaudio restart
E: [pulseaudio] core-util.c: Failed to create secure directory (/var/lib/pulse/.config/pulse): No such file or directory
pulseaudio is not running.
E: [pulseaudio] core-util.c: Failed to create secure directory (/var/lib/pulse/.config/pulse): No such file or directory
Starting pulseaudio...
W: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/pulse/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/pulse/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/pulse/.pulse-cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/pulse/.pulse-cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/pulse/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/pulse/.config/pulse/cookie': No such file or directory
No protocol specified
E: [pulseaudio] client-conf-x11.c: xcb_connection_has_error() returned true
E: [autospawn] core-util.c: Failed to create secure directory (/var/lib/pulse/.config/pulse): No such file or directory
W: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
E: [pulseaudio] main.c: Failed to acquire autospawn lock

Seems to me I have to resolve this before I can continue, or am I wrong?

Shadow_7 08-04-2014 11:52 AM

A fairly recent versioning change moved the configs from ~/.pulse* to ~/.config/pulse/. You might check to see if you have both sets and remove the one you don't use, i.e. not listed in that output. Or remove them both if you've done no customizations to let pulse create the ones it wants. You'll also need an appropriate .asoundrc in a lot of cases.

argeloos 08-04-2014 12:33 PM

OK, removed ~/.pulse* and ~/.config/pulse/

Looked at http://www.freedesktop.org/wiki/Soft.../PerfectSetup/

edited .asoundrc

Code:

pcm.!default {
    type pulse
    # If defaults.namehint.showall is set to off in alsa.conf, then this is
    # necessary to make this pcm show up in the list returned by
    # snd_device_name_hint or aplay -L
    hint.description "Default Audio Device"
}
ctl.!default {
    type pulse
}

and /etc/pulse/default.pa

Code:

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev/hal support)
load-module module-detect
.endif

start pa

Code:

slackware14:/etc/rc.d# sh ./rc.pulseaudio start
E: [pulseaudio] core-util.c: Failed to create secure directory (/var/lib/pulse/.config/pulse): No such file or directory
Starting pulseaudio...
W: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/pulse/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/pulse/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/pulse/.pulse-cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/pulse/.pulse-cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/pulse/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/pulse/.config/pulse/cookie': No such file or directory
No protocol specified
E: [pulseaudio] client-conf-x11.c: xcb_connection_has_error() returned true
E: [autospawn] core-util.c: Failed to create secure directory (/var/lib/pulse/.config/pulse): No such file or directory
W: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
E: [pulseaudio] main.c: Failed to acquire autospawn lock

no luck.

edit:

tried reboot as well, start pa (same as above). Probably not relevant (considering that pa did not start (not in ps aux)) but when I try sound in this config, with pa dead, I also get (even though the lib is present):

Code:

[AO_ALSA] alsa-lib: dlmisc.c:236:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
[AO_ALSA] Playback open error: No such device or address


cwizardone 08-04-2014 02:28 PM

In the Slackware forum there was a recent conversation about sound and PulseAudio. Look at pages 2 and 3,

http://www.linuxquestions.org/questi...mi-4175509353/

argeloos 08-05-2014 02:30 AM

Quote:

Originally Posted by cwizardone (Post 5214832)
In the Slackware forum there was a recent conversation about sound and PulseAudio. Look at pages 2 and 3,

http://www.linuxquestions.org/questi...mi-4175509353/



So, I looked at this post:
http://www.linuxquestions.org/questi...ml#post5206573

and followed the instructions, which were (seemingly) few:

Code:

slackware14:~$ cat .asoundrc
pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

slackware14:~$ cat /etc/rc.d/rc.local
#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.
#/sbin/modprobe snd-aloop
#/etc/rc.d/rc.timidity start


if [ -x /etc/rc.d/rc.pulseaudio ]; then
  /etc/rc.d/rc.pulseaudio start
fi

make /etc/rc.d/rc.pulseaudio executable, and reboot. That results in the same errors I got earlier, and that you [cwizardone] apparently also got. (I also tried booting without the lines in rc.local, which seemed superfluous after having made rc.pulseaudio executable).

btw I've got both
pulseaudio-5.0-i486-1_SBo
alsa-plugins-1.0.26-i486-1_SBo

Edit: tried the same after removing ~/.config/pulse


In the next post:
http://www.linuxquestions.org/questi...ml#post5206875

you [cwizardone] tell that the errors have gone away, but it's not clear to me how you achieved that. How was your setup different from the one I described above?

argeloos 08-05-2014 03:41 AM

I removed /etc/pulse and reinstalled pulseaudio-5.0-i486-1_SBo
No .asoundrc
/etc/rc.d/rc.pulseaudio is executable
No lines in rc.local
rebooted

No active pulseaudio

Then I started start-pulseaudio-x11 as user

Code:

W: [pulseaudio] authkey.c: Failed to open cookie file '/home/kapeebee/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authorization key '/home/kapeebee/.config/pulse/cookie': No such file or directory

Which means, only warnings, no errors.

Code:

slackware14:~$ ps aux | grep -i pulse
me  2480  0.2  0.0 111828  6704 ?        Sl  09:01  0:01 /usr/bin/pulseaudio --start
me  2484  0.0  0.0  13416  2468 ?        S    09:01  0:00 /usr/libexec/pulse/gconf-helper

Something is running.

I tried Skype. Instead of virtual device, it now has PulseAudio server (local) as sound devices, but still no sound in Skype.

I do have sound in other applications, but I suspect they talk directly to Alsa. Alsamixer shows my soundcard.
Add this.

Code:

slackware14:~$ cp SAVED-PA3.DOT.asoundrc .asoundrc
slackware14:~$ cat .asoundrc
pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

slackware14:~$ start-pulseaudio-x11
N: [pulseaudio] main.c: User-configured server at {62ed3c038cf4930c5bd1d7a300000020}unix:/tmp/pulse-VOG6lu89dpaF/native, which appears to be local. Probing deeper.

Regular sound was gone, but Alsamixer showed one PulseAudio Master which had to be enabled, which I did (hit M). Then I got sound.

But, I can no longer play two sound streams at the same time anymore (flash went crazy! and mplayer says: Audio device got stuck!). Now try Skype again. Skype has sound output. PulseAudio server (local)

Remaining problems: Skype doesn't allow me to select line in instead of mic, so it doesn't know I've got two very expensive microphones in my line in.

Skype doesn't see my webcam anymore. 4.2 both saw my webcam and allowed my to select line in, 4.3 is really crap.

Observation: even if I manage to tell Skype to use line-in, I still lost video. More important, I mix sound streams all the time, if pulseaudio can't do that, I only use it when I start Skype.

Can pulseaudio do what dmix normally does?

cwizardone 08-05-2014 03:28 PM

I removed the pulse start up instructions from rc.local, but left the ~./.asoundrc file and rebooted. It has worked ever since.

There is also this,

http://www.freedesktop.org/wiki/Soft.../PerfectSetup/

but it hasn't been update in quite a while.

Drakeo 08-05-2014 04:52 PM

I spent all day on this problem. and you need to install alsa-plugins from slackbuilds . and of course pulseaudio. then edit the /etc/pulse/default.pa
I just added the lines at the bottom.

Code:

load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop

reboot.
this is supposed to let alsa run pulseaudio. it is hit and miss. I did a full install of all the stuff needed to get 4.3 to run I got it to run but only capture my head phones for voice. the multi-lib slackware-64-14.1 multi-lib I had no issues. because skype does not affect my 64 bit programs.
I do not use .asoundrc I configure system wide from /etc/modprobe.d/sound.conf

Drakeo 08-05-2014 04:56 PM

skype has blocked 4.2 in the USA

argeloos 08-06-2014 04:22 AM

Quote:

Originally Posted by cwizardone (Post 5215681)
I removed the pulse start up instructions from rc.local, but left the ~./.asoundrc file and rebooted. It has worked ever since.

There is also this,

http://www.freedesktop.org/wiki/Soft.../PerfectSetup/

but it hasn't been update in quite a while.

Thanks for your reply. Yeah, I didn't use rc.local either. However, perhaps because I'm using Openbox, I needed to use start-pulseaudio-x11 as user.

argeloos 08-06-2014 04:23 AM

Quote:

Originally Posted by Drakeo (Post 5215760)

Code:

load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop


Thanks for this. I'll try it.

argeloos 08-06-2014 08:19 AM

Quote:

Originally Posted by argeloos (Post 5215274)
Remaining problems: Skype doesn't allow me to select line in instead of mic

To be able to select line in instead of mic with pulseaudio, one needs to install pavucontrol. In the tab Input Devices select Line in and unmute if necessary.

Sound quality of the input is awful, static, cracking sounds. I recall having read somewhere that pulseaudio does that often, and that there are measures to alleviate the problem... searching...


All times are GMT -5. The time now is 10:21 AM.