8

On my Ubuntu 12.04, the audio server encounters occasional crashes, so that I'm forced to reboot the system in order to have it play audio.

Alsamixer looks ok, nothing is muted. Moreover, I tried

sudo pkill -9 pulseaudio

and then:

pulseaudio -D

which gave me

E: [pulseaudio] main.c: Daemon startup failed.

Can you help me understand what's wrong?

  • Could you try again with the -v option to pulseaudio? E.g. pulseaudio -v -D. The final error should come after some other errors. – gertvdijk Jul 14 '13 at 11:58
  • I've done this and it's the same: pulseaudio -v -D E: [pulseaudio] main.c: Daemon startup failed. – martina Jul 14 '13 at 13:03
3

Pulseaudio will run on a per-user basis in a default setup. Therefore we do not need root permissions to kill it.

The command to restart/reset a running pulseaudio sound server from a terminal is simply issueing

pulseaudio -k

By doing to the sound server will autospawn and restart immediately in a default setting. You will always get an error if you try to run pulseaudio twice.

To run pulseaudio from command line to read possible errors you will have do temporarily disable the autospawning (see this article for details on how to do this).

Sometimes bad user setting are responsible for a malfunctioning pulseaudio sound server. We may then try to rename the settings directory ~/.pulse (or ./config/pulse in newer releases) before we restart pulseaudio. This directory will then be recreated with default settings.

  • Well, ok, I used the -k command to reset it, to no avail. I have: > pulseaudio -k and it says nothing. Now I did: > ps -e | grep pulseaudio and it gives me: > E: [pulseaudio] pid.c: Daemon already running. > E: [pulseaudio] main.c: pa_pid_file_create() failed. Moreover, it can be useful to add that the audio works if I use headphones, while it does not with the computer usual speakers. – martina Jul 14 '13 at 16:40
  • 1
    It may have somehow picked up your headphones as default audio sink. Did you try to rename/delete the ~/.[/config/]pulse directory? To list available sinks you can issue pacmd list-sinks - are your speakers present? – Takkat Jul 14 '13 at 18:31
  • 1
    Giving that list command I get two things: 2 sink(s) available, and they are: name: <alsa_output.pci-0000_00_1b.0.analog-stereo> 09:00:37 PM and name: <alsa_output.pci-0000_01_00.1.hdmi-stereo>. I guess they are the two speakers of the computer? – martina Jul 14 '13 at 19:02
  • Yeah sounds good. Also check what profile your internal card uses pacmd list-cards when speakers work, and when speakers dont work headphones work. This may give you additional hints on what might be the issue. (hard to debug remotely I am afraid) – Takkat Jul 14 '13 at 19:15
0

I had a similar error once, what worked for me was editing the default.pa file, at /etc/pulse. Somehow, the first line was !/usr/bin/pulseaudio -nF, and instead of #!/usr/bin/pulseaudio -nF, so upon editing it, pulseaudio worked fine.

  • I have this first line commented (with the hashtag). Do you mean I should uncomment it? – martina Jul 14 '13 at 13:05
  • no, it should be commented, the error i had was that there was no comment, so upon rectifying that, it was sorted – Projjol Jul 14 '13 at 15:37
  • Well, I have it correctly commented. Uncommenting it has resulted in the audio icon up near the clock not working. – martina Jul 14 '13 at 16:31
0

What worked for me was moving ~/.config/pulse to ~/.config/pulseold. Re-installed my base system and seems that pulseaudio kept crashing trying to use my old configs.

0

I had this problem - after playing around with it, I've figured out how to fix it, although I'm still not sure what's wrong with it.

First find the card and device you want and manually export the PULSE_SINK variable:

$> aplay -l

**** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog] Subdevices: 1/1
Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 0/1 Subdevice #0: subdevice #0

$>export PULSE_SINK=plughw:0,3
$>killall pulseaudio 
Now you should be able to start pulse.
$> pulseaudio --start

If not, check /etc/pulse for broken symbolic links and rm -rf ~/.config/pulse.

Thereafter make the default to where you want, check

$>pacmd list-cards

After you find which output you want then, make it the default:

$> pacmd set-card-profile 0 output:hdmi-stereo

Works for me, on Ubuntu 16.04.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.