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).
Steps:
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/default.pa. For example:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24
For the "client users" just add to ~/.config/pulse/client.conf:
default-server = 127.0.0.1
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).
Steps:
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/default. pa. For example: native- protocol- tcp auth-ip- acl=127. 0.0.1;192. 168.0.0/ 24
load-module module-
For the "client users" just add to ~/.config/ pulse/client. conf:
default-server = 127.0.0.1
Maybe this works with Ubuntu, too?