========== How to get pulseaudio forwarding to work in the SIPB office. Justin Dove (dove@mit.edu) Written: Mar 15 2014 Updated: Mar 24 2014 ========== ---------- I: Forwarding from lola-granola while logged in as sipb0 or sipbcert ---------- 1) Open "System Settings -> Sound" 2) Go to the "Output" tab 3) Select "Built-in Audio Analog Stereo on pulse@zygorthian-space-raiders" 4) Profit If this doesn't "just work", try the following: ---------- II: Forwarding from lola-granola as any user ---------- 1) Run "paprefs" from a terminal, or open "PulseAudio Preferences" 2) Go to the "Network Access" tab 3) Check the box for "Make discoverable PulseAudio network sound devices available locally" 4) Proceed with steps in Section I ---------- III: Forwarding from any linux machine on the same network as zsr (18.187.0.0/16) ---------- 1) Install "paprefs", e.g. on Debian and Ubuntu: sudo apt-get install paprefs (If you are trying to permanently install it on a cluster-configured machine, such as lola-granola, you'll need to break out of the chroot. If you don't understand how to do this and under what circumstances this is acceptable, please consult with a senior SIPB member.) 2) Proceed with steps in Section II Note: paprefs is actually just a convenience. If you don't want to install it, Sections III and II can be replaced by Section VI (1). ---------- IV: Someone reinstalled zsr! or Someone messed up the config! or It's still not working! or I want to use some other machine (not zsr) as the server ---------- 1) Don't panic. 2) Note: zsr, as of this writing, is configured to run pulseaudio as a system-wide daemon. These directions assume such operation. If you want to run pulseaudio as a session daemon, you'll have to make sure pulseaudio is run on the server after every restart; as a system-wide daemon, it will automatically run on startup. 3) Open the file "/etc/default/pulseaudio" and change the line: "PULSEAUDIO_SYSTEM_START=0" to "PULSEAUDIO_SYSTEM_START=1". This enables running a system-wide pulseaudio daemon at startup. 4) Create the necessary user and group: addgroup --system pulse adduser --system --ingroup pulse --home /var/run/pulse pulse addgroup --system pulse-access # Some distributions restrict access to the sound devices to a group audio adduser pulse audio # Add users (e.g. gutenbach) to the pulse-access group if necessary adduser gutenbach pulse-access 5) Add the following lines to "/etc/pulse/system.pa": load-module module-native-protocol-tcp auth-anonymous=1 auth-ip-acl=18.0.0.0/8 load-module module-zeroconf-publish (If you plan on running pulseaudio as a session daemon, instead of system-wide, you'll want to add those lines to "/etc/pulse/default.pa".) 6) Restart the computer. 7) Wait for it to completely boot. 8) Restart pulseaudio on any computers you are trying to send audio from (by running "pulseaudio -k", or logging out and logging back in, etc.). 9) If the computer you are sending audio from isn't configured, proceed to Section III (substituting zsr and it's LAN where appropriate). If you are truly setting this up from scratch, please heed the next section. ---------- V: It's working...but the audio is very choppy ---------- 1) On the server (e.g. zsr) open the file "/etc/pulse/daemon.conf" 2) Ensure that the following line appears, uncommented: default-sample-rate = 48000 3) Ensure that "default-sample-rate" isn't set anywhere else in the file. 4) Restart the server computer. 5) Wait for it to completely boot. 6) Restart pulseaudio on any computers you are trying to send audio from (by running "pulseaudio -k", or logging out and logging back in, etc.). 7) Note the following confirmed bug with respect to videos in web browsers: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1030559 In particular, as a commenter notes and I have confirmed, if you switch the audio output ("System Settings" -> "Sound" -> "Output") back to local output and then back to pulse@zsr again, while playing the video, it will fix it for the duration of the video. ---------- VI: It's STILL not working! or An update broke these directions! or for any other issues ---------- 1) paprefs is a convenience and doesn't *need* to be installed on the computer you are streaming audio from. Instead, on that computer, you can run "load-module module-zeroconf-discover" using pacmd, or you can add that line to "/etc/pulse/default.pa" (or "/etc/pulse/system.pa" if you are running a system-wide pulseaudio daemon on the computer you are streaming audio from) and restart pulseaudio. 2) Bear in mind that after any config change, you should restart the server computer (zsr), wait for it to completely boot, then restart pulseaudio on any computers you are trying to send audio from (by running "pulseaudio -k", or logging out and logging back in, etc.). 3) Read any error messages and logs. You might have to install some pulseaudio modules. 4) Use Google 5) Try the following docs, which I found helpful: http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/ http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/ https://wiki.archlinux.org/index.php/PulseAudio#Choppy.2C_overdriven_sound 6) Look for escape characters or other funkiness in the beginning of "/etc/pulse/system.pa" or elsewhere in that file or other configuration files. This has screwed us up before. Good luck!