pulseaudio - pactl called from systemd service always reports "pa_context_connect() failed connection refused"

I've setup a systemd service file to perform some pactl operations at system startup for a test process. While the commands work fine when performed from a terminal I always get "pa_context_connect() failed connection refused" when running the same script from the systemd service by starting the service. I'm also using the 'User=' directive in the service file to ensure that the auto-login user matches the user used to run the service commands.I've read that this is somehow related to the pulseaudio session not being valid in the environmentles...Read more

Look up pulseaudio sink-input index by property

The output of both pactl list sink-inputs and pacmd list-sink-inputs contains a Properties section:Properties: media.name = "ALSA Playback" application.name = "ALSA plug-in [snapclient]" native-protocol.peer = "UNIX socket client" native-protocol.version = "29" application.process.id = "6393" application.process.user = "root" application.process.host = "xxxxxx" application.process.binary = "snapclient" application.language = "C" application.process.machine_id = "8dadf95c2f504864bc0f8b3ab149cbe0" application.proc...Read more

pulseaudio: auto switch sink when headphones connected

I'm running XUbuntu 16.04. Previously I had speakers connected to analog line-out, and sound would automatically switch over to headphones when they were plugged in. This was all happening on one output device (motherboard audio).I've now got a new monitor with built-in speakers, but no analog connection, so I'm getting audio over DisplayPort from my Radeon R9 270. I'd like pulseaudio to switch existing streams and new streams to the headphone port on the motherboard audio when I plug in the headphones, and back to the DP audio port on the GPU ...Read more

pulseaudio - Stream system audio through mpd

I use mpd to stream music to my phone (connected to Hi-Fi) via http.Yet, this only works for songs in my mpd database. I oftentimes want to play stuff in my browser and would like that to be streamed over mpd, too.Is there a way to route the pulse audio output to mpd instead of the speakers?...Read more

pulseaudio - Ubuntu Audio Static Distortion [Intel 82801AA-ICH]

Ubuntu Audio Static Distortion [Intel 82801AA-ICH]Audio: After a few minutes the audio output becomes static distorted, (System Wide with all Audio Applications VLC etc. But especially noticeable with YouTube’s Audio/Video playback), sounding as though something is causing it to be overdriven into what is called ‘Clipping’, (But even at low volume levels). If I click on the Volume Icon on the top right of the Ubuntu screen, and then click on the ‘Sound Settings’ item of that drop down menu below the Volume Slider, Opening the Sound Settings GUI...Read more

pulseaudio is producing errors in syslog

To get audio working I find that every time I boot the computer I have to execute the command:pulseaudio --startWhile seeking ways to get this started automatically at boot time I examined the syslog file after a fresh reboot and before executing the above command. What I see is:Jan 4 04:57:59 ubuntu indicator-sound[1818]: volume-control-pulse.vala:735: unable to get pulse unix socket: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.PulseAudio1 was not provided by any .service filesJan 4 04:57:59 ubuntu pulseaudio.pulseaud...Read more

kubuntu - PulseAudio not using default sink

I have a mini-HP PC with Kubuntu 18.04 installed, It has some crappy built-in speakers and HDMI ports. I want all my audio to always go through the active HDMI port, but for some reason, with some applications, PulseAudio ALWAYS wants to put the audio through the built-in speakers.Index 0 is the default:$ pacmd list-sinks | grep -e 'name:' -e 'index:' * index: 0 name: <alsa_output.pci-0000_0a_00.1.hdmi-stereo-extra1> index: 1 name: <alsa_output.pci-0000_0a_00.6.analog-stereo>But when I run certain applications:$ pa...Read more

pulseaudio - mpd to remote dlna

I currently use an mpd with 4 configured outputs, wired to speakers in the ceilings as home-made "multiroom" audio system.I would like to add wireless speakers, e.g. one like this.The question is:How can I tell mpd that there is an output which is in fact remote a dlna/upnp (even aiyplay would be fine) ip-device ?Is it possible at all ?Edit 1:I found a way, though through pulseaudio and not dlna (which could be a use for one of my Raspberry Pis)....Read more

pulseaudio - Multiple problems with alsamixer after opening up laptop (no problems in other OSs)

This randomly started happening today. Yesterday I opened up my laptop to clean it out. I also disconnected the CMOS battery cable by mistake.When I open alsamixer in a terminal, the following things happen when I try to control the channels:Controlling the 'PCM' channel is the only way for me to change the volume. Using the up/down arrow keys when selecting the master channel, it changes the numbers but doesn't actually change the volume. Even weirder: controlling the master volume mutes it instead. It also mutes the headphone channel, but not...Read more

pulseaudio - synchronizing alsa volume to all pulse audio sinks

I control my computer's audio using key bindings linking XF86 audio key presses to amixer commands. This works well, unless I am listening through a non-alsa sink such as bluetooth-connected headphones. In this case, the volume is controlled through pulse audio and my key bindings no longer work. Is there a simple way to reflect changes in alsa volume to all sinks known by pulse audio (e.g., such that a -5% change in the master alsa volume would also be applied to all pulse audio sinks)?...Read more

pulseaudio - Automatically switch sound output device to Bluetooth headset & force to A2DP profile on connection

Using Mint 17 + MATE here. My bluetooth headset (Plantronics Backbeat Go2) is connected just fine with my system, but there are several manual steps I have to take to make this work that I would very much like to have automated:After every reboot I have to run pactl load-module module-bluetooth-discover in the terminal to get the device to connect at all. I tried putting this in a shell script to run on start up, but no dice :(My headset connects automatically with no issues, but it always defaults to Telephony Duplex or even Off instead of A...Read more

pulseaudio - audio play not starting at beginning

When I run a audio file with like mpg321 or aplay or sox or even in TTS's (Text to speak) audio only outputs correctly from the second time I reproduce the audio file...per example in Text to speech: If write "Hello World!" it only speaks "orld" or if I write "you are a good boy" it only speaks "a good boy"... Why?How can I fix this?in TTS's this happens with all TTS: espeak, Google Api, VoiceRSS Api, etc... and happens in my old raspberry (Raspbian) too , not only in my Ubuntu (14.04.1 LTS)I guess is because audio engine or something like that...Read more

pulseaudio - pulse_output failed to play: suspended

I have mpd running as a system service and as user mpd. Since mpd is a system service and pulse audio is session-based, I have to stream music from mpd to the currently active pulse session daemon. This is done using the module-native-protocol-tcp module configured with auth-anonymous=1 auth-cookie-enabled=0 listen=0.0.0.0 (loose, I know, but for testing purposes) The output in mpd.conf looks like this:audio_output { type "pulse" ...Read more