You are not logged in.
hi xfce,
i use the xfce-pulseaudio-plugin in my panel (running xfce on updated debian buster). i would like for the keyboard volume controls to switch to controlling a bluetooth speaker when it is becomes connected, but this doesn't happen.
on successfully establishing a bluetooth connection, the controls do nothing, and if i click the pulseaudio plugin, the 'output device' displayed hasn't properly updated. it displays "Built-in Audio Analog Stereo", as the current audio sink when it is actually my bluetooth device. so to get my controls to work i have to open the plugin, hover over "Built-in Audio Analog Stereo" and then select my bluetooth device from the dropdown bullet menu that appears.
its only the controls that don't change. the audio output changes fine on establishment of the bt connection. and if i open 'audio mixer' (pavucontrol) from within the plugin it has correctly switched to the bluetooth device.
adjusting volume works there, or from the command line with "pactl set-sink-volume" too.
i looked at the posts here in the forum. this one seemed closest to my situation:
https://forum.xfce.org/viewtopic.php?id=13040.
i followed the advice there, editing the conf file and re-starting (and rebooting) and nothing changes by changing the setting.
but i did notice that if i remove all the files in ~/.config/pulse/, then the pulseaudio plugin works as expected, switches to the bluetooth devices, and my keyboard controls work. but this only works a single time only. if i power off my speaker and power it on again the plugin doesn't switch back to it.
Offline
Does just running this without deleting the files also make it work:
pulseaudio -k
Offline
no it doesn't.
the one-off working though, i think it works whether or not i load that module too.
Offline
no it doesn't.
the one-off working though, i think it works whether or not i load that module too.
just tested again: if i comment out that line from the default.pa conf file, deleting the files and running "pulseaudio -k" still fixes it once.
when i power on the speaker, the plugin switches, displays the speaker's volume and not the onboard one, etc.
Offline
BT issues are a weak point for me. I'm struggling to think of what to try next.
If I think of anything I'll post here. Otherwise, hopefully someone else will have better ideas.
Offline
This works for some models to get the MM keys working (from a completely non working state) so it may help in this case, although I'm not really expecting it to.
In the file /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common immediately above the section starting with [Element PCM] add this:
[Element Master]
switch = mute
volume = ignore
Save, exit, reboot and test.
Offline
huh actually,
the issue is that if i add load module-switch-on-connect in the default.pa confe file, save, then run pulseaudio -k, that module isn't loaded when pulseaudio starts up again... running pactl list modules shows it is not there.
but if i load it manually it fixes the issue.
i can add the command to a start up dot file, but it would also be ideal to know how to change the pulseaudio conf file...
it says this near the top of the file:
"# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)"
i figure i'm starting it in system mode and thats why this file has no effect? any idea of how to get its changes to take effect?
Offline
i have actually made other changes to /etc/pulse/default.pa while troubleshooting in the past...
not to mention why isn't module-switch-on-connect loaded by default...
Offline
If you're starting it in system mode, then make the changes to system.pa instead of default.pa
Offline
On a 19.x version of Mint, and probably therefore 18.x versions of Ubuntu, the module is loaded by default.
### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
.ifexists module-switch-on-connect.so
load-module module-switch-on-connect
.endif
That's from default.pa. In system.pa, you would have to manually add it as it's much more pared down.
Last edited by MrEen (2020-05-14 01:48:50)
Offline
thanks a lot for your help mreen.
strange but for me that line isn't in my default.pa. glad it is normally there though!
systemctl reports no pulseaudio.service so i guess i'm not running it in "system mode". i'm still not sure why it doesn't load the model that i add to default.pa, or if something then unloads it after the conf file is read, but loading the module on login seems to be working ok for me.
Offline
I'm curious as pulse audio has been pretty much hands off for me. If you right click on the plugin icon and select properties, under both tabs there is a check to allow MM keys. Are they both checked?
Siduction
Debian Sid
Xfce 4.18
Offline
yeah they're checked.
but just to be clear: the keys do normally work, and they work with my bluetooth device, but only /once/ i have left-clicked the plugin and changed the "output" to the bluetooth device (which is already the 'output' coz its already playing audio).
it works as expected once i get 'module-switch-on-connect' to actually load. putting it in my default.pa file doesn't load it. i'm not sure why my version of the file doesn't include it, and why edits to default.pa have no effect for me. that's a bit frustrating. but loading it in my ~/.xsessionrc does load it fine when i log in.
Last edited by mouseboot (2020-05-14 16:11:09)
Offline
For me, when I connect a BT device I have to select it from the "left click menu". It does not auto switch but is available once the connection has happened. I think that's by default because you could potentially have several available connections at any given time(BT,HDMI,speakers,etc). Being able to choose the output is a good thing.
Example: If I was connected to my home entertainment system via HDMI cable to the T.V. I could send the sound to it through the cable but I also have a sound bar which is BT. I send the video to the T.V. as normal but the sound via BT to the bar.(of course this is hypothetical). Likely though, in this scenario it would all likely just go through the HDMI but there may be another choice.
Siduction
Debian Sid
Xfce 4.18
Offline
sure, i understand. i'm not dissing being able to choose output! and i can see from what you say that it might not be good to enable it by default. still, seems like an option that is worth a gui checkbox.
but my problem was that the output does auto change to bluetooth (which is how i'd like it set up) but audio controls do not. so my bluetooth speaker is making me deaf while i have to fumble looking for the software controls coz the keyboard ones suddenly don't work when with onboard sound they always do.
and trying set the option to enable proper auto switching in the config file is ignored by my setup.
Offline
I haven't checked, but Debian, or even upstream from them, may have removed switch-on-connect being on by default. I have read of many issues with it, but can't keep track of the changes by Distro.
You also have a newer version of PulseAudio (12.2) than I've ever used. My daily driver is still on PulseAudio 8.0, and my next system that is already installed but not often booted to yet is 11.1. And 14.0 is already released!
Now add to that the kernel/ALSA devs are changing the audio driver at this time (been ongoing for months already) and I can safely say we're in for a bumpy ride with audio for a little while.
Your issue is certainly a PulseAudio issue. And I mean PulseAudio proper. I highly doubt the plugin has anything to do with it. I don't know the Debian forum at all, but it might be worth starting a thread there. Maybe before doing so, test by disabling the plugin in the panel, and use pavucontrol for volume changes and see where things stand. If you don't have it installed already, sometimes just installing pavucontrol without actually using it has fixed some niggly issues for people. I can't remember if pavucontrol was a dependency of the plugin or not.
Offline
Did I miss it? It's Debian you are using? I was using MX-19/Buster and now Siduction/Sid. In both cases Pulse Audio worked as expected. I am not hearing many complaints. The biggest one is to do with HDMI. Usually once people figure out which port they need to select it works. Can be confusing if you have multiple entries in the menu.
Siduction
Debian Sid
Xfce 4.18
Offline
Did I miss it? It's Debian you are using?
First sentence of the thread.
Offline
Ah!
Siduction
Debian Sid
Xfce 4.18
Offline
well, i'm happily sorted now.
but yeah, for me on buster that module doesn't appear in my conf file. and i just checked a siduction vm and it also doesn't appear in there. so mayb not a default one.
w my buster its entirely possible i messed sth a year ago when i didn't know what i was doing generally. but the siduction is plain untouched vm.
but hey, thanks for the help outs and information. it good to be able to learn a little more about where things are and how they work when something isn't going quite right.
thanks!
Offline
[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 613.5 KiB (Peak: 630.34 KiB) ]