Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-05-13 23:39:36

mouseboot
Member
Registered: 2019-11-15
Posts: 15

xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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

#2 2020-05-13 23:48:43

MrEen
Member
Registered: 2019-04-19
Posts: 180

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

Does just running this without deleting the files also make it work:

pulseaudio -k

Offline

#3 2020-05-14 00:04:56

mouseboot
Member
Registered: 2019-11-15
Posts: 15

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

no it doesn't.

the one-off working though, i think it works whether or not i load that module too.

Offline

#4 2020-05-14 00:09:15

mouseboot
Member
Registered: 2019-11-15
Posts: 15

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

mouseboot wrote:

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

#5 2020-05-14 00:19:33

MrEen
Member
Registered: 2019-04-19
Posts: 180

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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

#6 2020-05-14 01:01:09

MrEen
Member
Registered: 2019-04-19
Posts: 180

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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

#7 2020-05-14 01:06:14

mouseboot
Member
Registered: 2019-11-15
Posts: 15

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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

#8 2020-05-14 01:16:03

mouseboot
Member
Registered: 2019-11-15
Posts: 15

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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

#9 2020-05-14 01:42:41

MrEen
Member
Registered: 2019-04-19
Posts: 180

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

If you're starting it in system mode, then make the changes to system.pa instead of default.pa

Offline

#10 2020-05-14 01:46:31

MrEen
Member
Registered: 2019-04-19
Posts: 180

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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

#11 2020-05-14 13:53:34

mouseboot
Member
Registered: 2019-11-15
Posts: 15

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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

#12 2020-05-14 15:06:45

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 138

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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?
A0VMLSf.png

Offline

#13 2020-05-14 16:01:23

mouseboot
Member
Registered: 2019-11-15
Posts: 15

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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

#14 2020-05-14 16:31:49

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 138

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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.

Offline

#15 2020-05-14 16:43:53

mouseboot
Member
Registered: 2019-11-15
Posts: 15

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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

#16 2020-05-14 19:22:22

MrEen
Member
Registered: 2019-04-19
Posts: 180

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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

#17 2020-05-14 19:42:08

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 138

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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.

Offline

#18 2020-05-14 20:44:15

MrEen
Member
Registered: 2019-04-19
Posts: 180

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

eriefisher wrote:

Did I miss it? It's Debian you are using?

First sentence of the thread. smile

Offline

#19 2020-05-14 21:58:37

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 138

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

Ah!

Offline

#20 2020-05-15 13:50:54

mouseboot
Member
Registered: 2019-11-15
Posts: 15

Re: xfce pulseaudio plugin — volume keys dont change on bluetooth connect

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

Board footer

Powered by FluxBB