Comment 24 for bug 213149

Flittermice (flittermice) wrote :

To clarify at first: It's 2019 and I am running Arch Linux with systemd...

... but I had exactly the same problem. My goal was simply to switch to another user (by Ctrl-Alt-Fx or by means of the display manager) and to keep my sound running.

I finally got it to work without having to play with system mode (dangerous, unsupported) or PolicyKit (don't know anything about that).

1. Add the $USER whose PulseAudio should keep playing to the "audio" group (usermod -aG audio $USER).
2. Enable lingering for the user, so that PulseAudio starts without being logged in (loginctl enable-linger $USER).

Should this work you can optionally share this user's PA to other users on the net by adding something to ~/.config/pulse/ For example:
load-module module-native-protocol-tcp auth-ip-acl=;

For the "client users" just add to ~/.config/pulse/client.conf:
default-server =

Maybe this works with Ubuntu, too?