On Mon, 2017-05-22 at 13:01 -0700, Karl Stahl wrote: > Apparently the "xcb_connection_has_error()" message is caused by my > having SSHed to the device. If I run the same command on the device > directly, I don't get that message. My environment already had that > variable set as you suggested: > > $ echo $XDG_RUNTIME_DIR > /run/user/1000 > > In any case, I still get the "pa_context_connect() failed" message. > > Is pulseaudio running? Yes: > $ ps -ef | grep pulse > pi 1050 809 0 11:14 ? 00:00:54 /usr/bin/pulseaudio --daemonize=no > > $ PULSE_LOG=99 pactl info > xcb_connection_has_error() returned true > Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65496 > Trying to connect to /run/user/1000/pulse/native... > connect(): Resource temporarily unavailable (11) This is the problem. The socket exists, but connecting to it fails. Are you perhaps trying to use socket activation? In that case systemd creates the socket, but pulseaudio doesn't use it, because 5.0 doesn't support socket activation. Removing the .socket file should do the trick. Why are you trying to use systemd to manage the user instance, by the way? The old autospawning mechanism should work fine for automatically starting pulseaudio on demand. Raspbian disables autospawning at every boot by overwriting ~/.config/pulse/client.conf, though, so maybe that's why you're trying this alternative method... In that case, I would try to find what overwrites client.conf and disable that thing. -- Tanu https://www.patreon.com/tanuk