Can't change profile of Bluetooth headphones

  • Open
  • quality assurance status badge
Details
2 participants
  • Matthew Leach
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Matthew Leach
Severity
normal
M
M
Matthew Leach wrote on 4 Jan 2020 14:30
(address . bug-guix@gnu.org)
87o8vjs61n.fsf@mattleach.net
Hi Guix!

I have a pair of Bluetooth headphones that I I've paired and connected to
my guix machine. They show up in the 'configuration' tab of
pavucontrol. By default the profile is 'Headset Head Unit (HSP/HFP)'.

When I try and change the profile to 'High Fidelity Playback (A2DP Sink)'
this fails and the headphones are stuck in the HSP profile.

I see the following line in `/var/log/debug' when attempting to switch
profiles:

Toggle snippet (3 lines)
W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected

It looks as though this may have something to do with pulseaudio running
as the GDM user: [0]. My current work-around for this is:

Toggle snippet (3 lines)
$ sudo killall pulseaudio && pulseaudio

R
R
Ricardo Wurmus wrote on 4 Jan 2020 22:33
(name . Matthew Leach)(address . matthew@mattleach.net)(address . 38915@debbugs.gnu.org)
87lfqm3o06.fsf@elephly.net
Hi Matthew,

Toggle quote (23 lines)
> I have a pair of Bluetooth headphones that I I've paired and connected to
> my guix machine. They show up in the 'configuration' tab of
> pavucontrol. By default the profile is 'Headset Head Unit (HSP/HFP)'.
>
> When I try and change the profile to 'High Fidelity Playback (A2DP Sink)'
> this fails and the headphones are stuck in the HSP profile.
>
> I see the following line in `/var/log/debug' when attempting to switch
> profiles:
>
> --8<---------------cut here---------------start------------->8---
> W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected
> --8<---------------cut here---------------end--------------->8---
>
> It looks as though this may have something to do with pulseaudio running
> as the GDM user: [0]. My current work-around for this is:
>
> --8<---------------cut here---------------start------------->8---
> $ sudo killall pulseaudio && pulseaudio
> --8<---------------cut here---------------end--------------->8---
>
> to make pulseaudio run as my user.

For what it’s worth: if you have a setup that doesn’t require pulseaudio
it is possible to use bluez-alsa (running bluealsa as a daemon) and
configure it to use the a2dp profile. I’m using this on a headless
“server” in the living room to send music to bluetooth speakers.

Toggle quote (2 lines)
The second workaround requires writing a configuration file to the gdm
user’s home directory. Is this something that we could do in the gdm
service configuration?

--
Ricardo
M
M
Matthew Leach wrote on 5 Jan 2020 21:04
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 38915@debbugs.gnu.org)
877e25oejn.fsf@mattleach.net
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (2 lines)
> Hi Matthew,

Hi Ricardo,

Thanks for your reply.

Toggle quote (30 lines)
>
>> I have a pair of Bluetooth headphones that I I've paired and connected to
>> my guix machine. They show up in the 'configuration' tab of
>> pavucontrol. By default the profile is 'Headset Head Unit (HSP/HFP)'.
>>
>> When I try and change the profile to 'High Fidelity Playback (A2DP Sink)'
>> this fails and the headphones are stuck in the HSP profile.
>>
>> I see the following line in `/var/log/debug' when attempting to switch
>> profiles:
>>
>> --8<---------------cut here---------------start------------->8---
>> W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected
>> --8<---------------cut here---------------end--------------->8---
>>
>> It looks as though this may have something to do with pulseaudio running
>> as the GDM user: [0]. My current work-around for this is:
>>
>> --8<---------------cut here---------------start------------->8---
>> $ sudo killall pulseaudio && pulseaudio
>> --8<---------------cut here---------------end--------------->8---
>>
>> to make pulseaudio run as my user.
>
> For what it’s worth: if you have a setup that doesn’t require
> pulseaudio it is possible to use bluez-alsa (running bluealsa as a
> daemon) and configure it to use the a2dp profile. I’m using this on a
> headless “server” in the living room to send music to bluetooth
> speakers.

Ideally I'd like to use pulseaudio as I have multiple streams that I
send to my bluetooth speaker. Nevertheless, I tried to give bluez-alsa a
go but I failed to kill pulseaudio. It would always start back up as the
GDM user.

Toggle quote (7 lines)
>
>> [0]: https://wiki.debian.org/BluetoothUser/a2dp#Refused_to_switch_profile_to_a2dp_sink:_Not_connected
>
> The second workaround requires writing a configuration file to the gdm
> user’s home directory. Is this something that we could do in the gdm
> service configuration?

Ideally i'd like to stop GDM running pulseaudio as I can test out your
solution above and it may fix this issue. I'm unsure how to modify GDMs
configuration, however.
--
Matt
M
M
Matthew Leach wrote on 5 Jan 2020 21:05
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 38915@debbugs.gnu.org)
871rscp9c7.fsf@mattleach.net
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (2 lines)
> Hi Matthew,

Hi Ricardo,

Thanks for your reply.

Toggle quote (30 lines)
>
>> I have a pair of Bluetooth headphones that I I've paired and connected to
>> my guix machine. They show up in the 'configuration' tab of
>> pavucontrol. By default the profile is 'Headset Head Unit (HSP/HFP)'.
>>
>> When I try and change the profile to 'High Fidelity Playback (A2DP Sink)'
>> this fails and the headphones are stuck in the HSP profile.
>>
>> I see the following line in `/var/log/debug' when attempting to switch
>> profiles:
>>
>> --8<---------------cut here---------------start------------->8---
>> W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected
>> --8<---------------cut here---------------end--------------->8---
>>
>> It looks as though this may have something to do with pulseaudio running
>> as the GDM user: [0]. My current work-around for this is:
>>
>> --8<---------------cut here---------------start------------->8---
>> $ sudo killall pulseaudio && pulseaudio
>> --8<---------------cut here---------------end--------------->8---
>>
>> to make pulseaudio run as my user.
>
> For what it’s worth: if you have a setup that doesn’t require
> pulseaudio it is possible to use bluez-alsa (running bluealsa as a
> daemon) and configure it to use the a2dp profile. I’m using this on a
> headless “server” in the living room to send music to bluetooth
> speakers.

Ideally I'd like to use pulseaudio as I have multiple streams that I
send to my bluetooth speaker. Nevertheless, I tried to give bluez-alsa a
go but I failed to kill pulseaudio. It would always start back up as the
GDM user.

Toggle quote (7 lines)
>
>> [0]: https://wiki.debian.org/BluetoothUser/a2dp#Refused_to_switch_profile_to_a2dp_sink:_Not_connected
>
> The second workaround requires writing a configuration file to the gdm
> user’s home directory. Is this something that we could do in the gdm
> service configuration?

Ideally i'd like to stop GDM running pulseaudio as I can test out your
solution above and it may fix this issue. I'm unsure how to modify GDMs
configuration, however.
--
Matt
?