Bug 95470 - Per-user pulseaudio dbus module fails on 2nd user login
Summary: Per-user pulseaudio dbus module fails on 2nd user login
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: modules (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-18 04:58 UTC by rickfharris
Modified: 2018-07-30 09:54 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description rickfharris 2016-05-18 04:58:38 UTC
When per-user pulseaudio instance is started at xsession login, further login by same user breaks pulseaudio from appearing on dbus.

Steps to reproduce:

1. Login to xsession
2. Open xterm and issue: ~ $ qdbus | grep -i pulse
    Expected output should be similar to:
 org.PulseAudio1
 org.pulseaudio.Server

3. Logout and back into xsession
4. Open xterm and issue: ~ $ qdbus | grep -i pulse
    No output, pulseaudio is not present on dbus

Unloading/loading the module-dbus-protocol using pactl does succeed but unfortunately pulseaudio will still not appear on dbus.

Only workaround found so far is to pkill pulseaudio process and restart it at each login by changing line in /etc/xdg/autostart/pulseaudio.desktop from:
Exec=start-pulseaudio-x11
to be instead:
Exec=sh -c "pkill pulseaudio; start-pulseaudio-x11"

Thanks :)
Comment 1 Tanu Kaskinen 2016-05-18 11:21:35 UTC
Does the problem occur also if you wait for more than 20 seconds after logging out? I don't think we shut down immediately after logging out, which is a problem if dbus-daemon shuts down immediately, but we shouldn't stay around indefinitely either. 20 seconds is the default time we wait after the last client has disconnected. Synchronizing the starting and stopping of user services seems like something that the session manager should do.

Is the pulseaudio pid the same in both sessions, and is the dbus-daemon pid different?

Note that if you have multiple simultaneous sessions from the same user, and there's a separate dbus-daemon for each of them, that's not likely to ever work. (Your description doesn't sound like you're trying to have simultaneous sessions, though.)
Comment 2 rickfharris 2016-05-18 22:33:18 UTC
(In reply to Tanu Kaskinen from comment #1)
> Does the problem occur also if you wait for more than 20 seconds after
> logging out? I don't think we shut down immediately after logging out, which
> is a problem if dbus-daemon shuts down immediately, but we shouldn't stay
> around indefinitely either. 20 seconds is the default time we wait after the
> last client has disconnected. Synchronizing the starting and stopping of
> user services seems like something that the session manager should do.

No, if I wait >20 seconds before logging in again then pulseaudio appears on dbus with no problem on the 2nd login.

> Is the pulseaudio pid the same in both sessions, and is the dbus-daemon pid
> different?

Both pulseaudio and dbus-daemon pid's are different in each session.

> Note that if you have multiple simultaneous sessions from the same user, and
> there's a separate dbus-daemon for each of them, that's not likely to ever
> work. (Your description doesn't sound like you're trying to have
> simultaneous sessions, though.)

Right, not trying to have simultaneous session from same user.
Comment 3 rickfharris 2016-05-19 00:14:16 UTC
> Is the pulseaudio pid the same in both sessions, and is the dbus-daemon pid
> different?
Sorry I should clarify.
When the problem occurs (logout/login within 20 seconds), pulseaudio's pid stays the same and the dbus session pid changes.

When logout/login after waiting >20 seconds, both pulseaudio and dbus session pid's change.

Thanks :)
Comment 4 GitLab Migration User 2018-07-30 09:54:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/121.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.