pulseaudio not launched when loggin as root

Bug #549074 reported by Nicola Bonelli
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Expired
Undecided
Unassigned
Nominated for Lucid by Nicola Bonelli

Bug Description

After upgrading from karmic, for some reasons pulseaudio (per-session daemon mode) is not launched (?) on login as root. If launched manually it works properly.

Logging as other users it is launched as expected.

/etc/default/pulsaudio:

PULSEAUDIO_SYSTEM_START=0
DISALLOW_MODULE_LOADING=1

/etc/pulse/client.conf has no autospawn = no set.

Tags: lucid
Revision history for this message
Philip Muškovac (yofel) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage. I have classified this bug as a bug in Pulseaudio.

When reporting bugs in the future please use apport, either via the appropriate application's "Help -> Report a Problem" menu or using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

affects: ubuntu → pulseaudio (Ubuntu)
Philip Muškovac (yofel)
tags: added: lucid
Revision history for this message
Daniel T Chen (crimsun) wrote :

Attach all modified conffiles in /etc/pulse and ~/.pulse

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
Nicola Bonelli (nicola-bonelli) wrote :

Daniel, I'm using the default ones...

I don't know if this can help but /etc/xdg/autostart/pulseaudio.desktop which aims to launch pulseaudio by means of start-pulseaudio-x11 fails.

I'm able to run pulseaudio manually, not via start-pulseaudio-x11.

Here's what happens:

root@valhalla:~$ start-pulseaudio-x11
Connection failure: Connection refused

root@valhalla:~$ bash -x start-pulseaudio-x11
+ set -e
+ '[' -z '' ']'
+ '[' x:0.0 '!=' x ']'
+ /usr/bin/pactl load-module module-x11-publish display=:0.0
Connection failure: Connection refused

Revision history for this message
Daniel T Chen (crimsun) wrote :

Upstream says that it's a very bad idea to run pulse as root. What's the specific use case for doing so?

Revision history for this message
Nicola Bonelli (nicola-bonelli) wrote :

I'm not running pulseaudio in system mode. Instead I'm running it as per-user daemon as suggested. The point is that logging as root pulseaudio is not launched.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Please provide an strace.

Revision history for this message
Nicola Bonelli (nicola-bonelli) wrote :

If I run pulseaudio manually it works. The point is that is not automatically launched when the user root log in.

The script supposed to run it is start-pulseaudio-x11... it fails at the line 26:

/usr/bin/pactl load-module module-x11-publish "display=$DISPLAY" > /dev/null
with the error connection refused.

I have attached the strace of pactl...

Revision history for this message
Nicola Bonelli (nicola-bonelli) wrote :
Revision history for this message
Nicola Bonelli (nicola-bonelli) wrote :

The bug I've been reporting is the #551589 (https://bugs.launchpad.net/ubuntu/+source/gnome-media/+bug/551589).

Revision history for this message
Chemtox (chemtox) wrote :

I got the same error after upgrading to Lucid, with a normal user, but I had autospawn disabled. Enabling it back made it all good (jackd works without having to kill pulseaudio now).

Did you check your ~/.pulse/client.conf?

Revision history for this message
Nicola Bonelli (nicola-bonelli) wrote :

I have no ~/.pulse/client.conf for root user. Anyway I confirm the bug is also present after installing Lucid from scratch (not only after upgrading).

Revision history for this message
Jack D (jdonohue654-ubuntu) wrote :

I can confirm this bug as well when running X as root. But it is not a problem when X is run as any "normal" user.

I did a bit of sleuthing tonight, and the underlying problem is: For a regular user, when X is initiating:

1. first, the gnome-settings-daemon makes the following call:

/bin/bash /usr/bin/pulseaudio --start --log-target=syslog

2. Then, later in the X start-up sequence, x-session-manager calls:

/bin/sh /usr/bin/start-pulseaudio-x11 (as defined in /etc/xdg/autostart/pulseaudio.desktop)

But, for the root user, the step #1 is never happening (i.e., gnome-settings-daemon never attempts to start the pulseaudio process). So step #2 fails with a connection refused.

I don't know enough about gnome or gnome-settings-daemon to know why it isn't starting pulse for root. Hopefully someone with a good background in gnome can say why it starts pulseaudio for regular users but not root.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for pulseaudio (Ubuntu) because there has been no activity for 60 days.]

Changed in pulseaudio (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.