[pulseaudio-discuss] Hpw to start the pa server
Colin Guthrie
gmane at colin.guthr.ie
Wed Apr 14 01:53:09 PDT 2010
'Twas brillig, and Gene Heskett at 13/04/10 01:38 did gyre and gimble:
> On Monday 12 April 2010, Colin Guthrie wrote:
>> 'Twas brillig, and Gene Heskett at 12/04/10 20:29 did gyre and gimble:
>>> draksound, re-enabled, was on before by other means, and enabled user
>>> switching. No sound yet.
>>> pacmd.ls.out attached.
>>
>> Hmm, what is strange here is that it shows no streams at all - e.g. no
>> sink inputs. To back this up, all the sinks are in a suspended state.
>>
>> The volumes are all incredibly high - well over the 100% mark. How were
>> these volumes set? Most tools only allow volumes up to 150%.
>
> I _think_ it was paprefs that allowed me to go as high as 400%.
Ahh no, I think it was likely paman... it's evil :p Generally speaking
paman and padevchooser are obsolete... I should probably not ship them
really but some people do like them despite their evilness :p
>> FWIW, It's generally a bad idea to run PA on top of dmix.
>
> Thats the duplicate common sink for everything checked.
Hmm, not sure what you mean here.
>> It would be interesting to see the output of:
>> pulseaudio -vvv
> E: pid.c: Daemon already running.
> E: main.c: pa_pid_file_create() failed.
This error happens when the PA daemon is actually already running. Like
I said before it can be autospawned for you really quickly.
Usually running it like:
pulseaudio -k; pulseaudio -vvv
Will allow it to startup, but sometimes you need to run that command
several times.
> =================================
>> when a detection module is used - you seem to have disabled
>> module-udev-detect and manually configured your devices in these examples.
>
> Not that I know of. But the default.pa in /home/gene and the one in
> /etc/pulse differed, so I nuked the one in /home/gene, then copied the one in
> /etc/pulse to there, fixing the ownership of course.
Cool. That's not strictly needed, you can just trach the one from
/home/gene and the one from /etc/pulse will be used instead. Doesn't do
any harm but as PA is updated again it may go out of sync again, so
unless you have any specific modifications you need to make, it's
probably best not to have one in /home/gene at all.
> And now its totally dead again.
>
>> If possible, can you restore the auto detection (i.e. the default.pa as
>> shipped with the package)
>
> The package is not in /var/cache/urpmi. Might be on the install cd,
> what is its exact name?
If the one form /etc/pulse was the original one you're cool. You can
check if the system wide one has been modified by running rpm -V
pulseaudio. Otherwise you can find the pulseaudio package from
main/updates for 2010.0.
>> and provide the above output. (you may have to
>> run pulseaudio -k to kill the running PA daemon and if autospawning is
>> enabled, it may respawn again very quickly).
>
> [root at coyote init.d]# pulseaudio -k
> E: main.c: Failed to kill daemon: No such process
> [root at coyote init.d]# cd ../X11/xinit.d
> [root at coyote xinit.d]# . ./50pulseaudio
> Connection failure: Connection refused
> [root at coyote xinit.d]#
> Then I saw I was root, but
Pretty much every command needed for pulse is not generally meant to be
run as root. Your own user has access to the audio h/w via consolekit
and it's your own user who runs their own personal PA daemon.
>> I'm not sure if this well help with the sound playing issue as this
>> seems to be failing at the first hurdle - in that it cannot connect. Can
>> you explain your user setup. Are you just logging directly as root, or
>> logging in as a regular user then trying to play sound? Do really simple
>> clients like: paplay /usr/share/sounds/startup3.wav work?
>
> No such file. However:
> [gene at coyote sounds]$ paplay /usr/share/sounds/ia_ora-startup.wav
> Connection failure: Connection refused
If you run PA daemon as gene first, that would be the best test.
> And in /etc/X11/xiniit.d,
> [gene at coyote xinit.d]$ ./50pulseaudio
> Connection failure: Connection refused
Don't worry about the xinit.d stuff. Just ignore it. It's just for
starting PA on non compliant DEs (e.g. anything other than KDE or Gnome).
All it does is run pulseaudio anyway, so pulseaudio -vvv in it's own
terminal will be a better route for debugging.
> So I'm plumb back to square one.
The main problem seems to be confused. In one run of pulsaudio -vvv
above, we were unable to start PA as your user because it was already
running, but then later we try a simple paplay command and it fails to
connect (which is generally indicative of a problem in connecting to PA).
Can you do the following for me:
1) Enable PA in draksound and reboot.
2) Login.
3) ps aux | grep pulseaudio
4) paplay /usr/share/sounds/ia_ora-startup.wav
5) (in a separate terminal, leave running and retry until it starts
properly): pulseaudio -k; pulseaudio -vvvvv
6) paplay /usr/share/sounds/ia_ora-startup.wav
7) cat ~/.pulse/client.conf
8) cat /etc/pulse/client.conf
9) xprop -root | grep PULSE
10) env | grep PULSE
And put the details somewhere? Mostly in this mail but the big debug in
a pastebin is probably best.
> Now, because its so big, here is
> pulseaudio-vv, and I had to ctl+c it to get my shell back, noted
> at line 1277.
> =========================
> I: card.c: Created 0 "alsa_card.0"
> I: module.c: Loaded "module-alsa-card" (index: #4; argument: "device_id="0" name="0" card_name="alsa_card.0" tsched=yes ignore_dB=no card_properties="module-udev-
> detect.discovered=1"").
> I: module-udev-detect.c: Card /devices/pci0000:00/0000:00:06.0/0000:01:07.0/sound/card0 (alsa_card.0) module loaded.
> I: module-udev-detect.c: Found 1 cards.
> I: module.c: Loaded "module-udev-detect" (index: #5; argument: "").
OK, so module-udev-detect has found your card and added it. This is good.
> D: module-gconf.c: Loading module 'module-combine' with args '' due to GConf configuration.
> I: module-device-restore.c: Restoring volume for sink combined.
> I: sink.c: Created sink 0 "combined" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
> I: sink.c: device.class = "filter"
> I: sink.c: device.description = "Simultaneous Output"
> I: sink.c: device.icon_name = "audio-card"
Just to keep things simple, I'd load up paprefs and untick the box to
create a combined output (it's the last tab IIRC). Then the above sink
wont load which keeps our setup cleaner.
> I: module-combine.c: Device suspended...
> ^CI: main.c: Got signal SIGINT. <--I had to ctl+c it to get my shell back
OK, so PA has to stay running. Use another terminal/shell and leave PA
running in this one and enter your other debug in the new shell.
If PA isn't running, then clients wont be able to connect and then
you'll generally get "Connection refused" errors like you did above.
Hope this helps and better arms you for debugging :D
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss
mailing list