This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Bluetooth problems & phonon

Tags: None
(comma "," separated)
User avatar
latebeat
Registered Member
Posts
70
Karma
0

Bluetooth problems & phonon

Fri Feb 08, 2013 8:14 am
Hi all,

I have an issue with bluetooth. I don't know if I should post here or in the ubuntu forum but I'll start from here since I think it might be a kde issue.
So, I got a new pair of bluetooth headphones. It works great but the settings are never saved.

Here's what I got to do everytime I need to connect them:

Right click at the panel > bluetooth > right click and pair (so far so good as it pairs right away)

Then for some reason in my kmix settings, I've moved up the headphones at the top of the list so that they are the preferred medium. However, even after pairing they are gray and inactive in the list. In order to make them active I need to go in the audio hardware setup tab > bluetooth headset and choose manually profile > A2DP. I need to do this manually everytime. This setting is never retained. By contrast, my usb speakers are just plug and play. I have them at the top of the prority list, and kde switches to the audio profile automatically. This doesn't happen for the bluetooth headset due to the fact that the profile is always off. Is there any way I can automate this process? Where is this setting saved? What does it have to do with? Alsa? Phonon? Pulse? Bluetooth?

Here's a slideshow of what I mean:
https://www.dropbox.com/sh/g0vs9hvml8ysd07/c4FGkExQdG

thank you,
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Bluetooth problems & phonon

Fri Feb 08, 2013 9:45 am
Are you using Pulseaudio by any chance? If so, it is responsible for remembering that your headphones use/require the A2DP profile in order to be useful. I suspect Pulseaudio may be trying to use the HSP profile with your headphones - which if they do not have a microphone they may not support (which would explain why it ends up disabled).

I am puzzled as to why it does not remember that your device uses the A2DP profile however, as it does remember it successfully for my bluetooth headset (although mine supports the HSP profile as well).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
latebeat
Registered Member
Posts
70
Karma
0

Re: Bluetooth problems & phonon

Fri Feb 08, 2013 11:04 am
bcooksley wrote:Are you using Pulseaudio by any chance? If so, it is responsible for remembering that your headphones use/require the A2DP profile in order to be useful. I suspect Pulseaudio may be trying to use the HSP profile with your headphones - which if they do not have a microphone they may not support (which would explain why it ends up disabled).

I am puzzled as to why it does not remember that your device uses the A2DP profile however, as it does remember it successfully for my bluetooth headset (although mine supports the HSP profile as well).


I'm not really sure if I'm using pulse audio but judging from the fact that when I run the pulse audio service all my settings disappear and I get just the pulse audio server (which I'm not as you can see in the screenshot) I'm guessing I am not using pulse audio.
In the drop down menu as you can see from the screen shot I have selected A2DP but, yes HSP is an option I can select although like I'm showing in step no2 screenshot for some reason after every pairing the selected profile is OFF. Isn't that weird, huh?

Whenever I'm selecting A2DP is that setting written to a file or something ?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Bluetooth problems & phonon

Fri Feb 08, 2013 11:06 am
To the best of my knowledge, the Audio Hardware Setup tab only works when Pulseaudio is available. When you select A2DP there, Pulseaudio is supposed to be preserving those settings.

Can you try to reproduce this under a new user?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
latebeat
Registered Member
Posts
70
Karma
0

Re: Bluetooth problems & phonon

Tue Feb 12, 2013 10:16 am
bcooksley wrote:To the best of my knowledge, the Audio Hardware Setup tab only works when Pulseaudio is available. When you select A2DP there, Pulseaudio is supposed to be preserving those settings.

Can you try to reproduce this under a new user?


Ok so I tried this with a new user and it I have the same issue. Upon connection, the profile is set to OFF and I need to follow steps 1-4 from the screenshots to enable it manually.
So let me ask you, does your bt headset support A2DP? If it does do you mind testing that please? If you set yours to A2DP and disconnect and reconnect does it remember the settings?
And another question, are you able to use any of the bluetooth controls? My headset has controls like play pause etc. So far, no application responds to the buttons. I mean I didn't have high expectations about that, it's just that today I accidentally pressed the play button after having paused a video in umplayer and it worked! I mean just that works (resuming not even stopping) but it's a start!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Bluetooth problems & phonon

Wed Feb 13, 2013 5:47 am
Yes, my Bluetooth headset supports A2DP. Usually when I first connect it to my computer (on first setup) it configures itself to use HSP, which I immediately change to A2DP. After that it automatically uses A2DP on all subsequent connections.

The buttons on my headset (media next and media previous) also work fine, as long as the global shortcut association has been setup in the application (for Amarok, the defaults of "Media Next" and "Media Previous" are sufficient for it to work out of the box).

I'm not sure why you are having problems unfortunately. Only thing I could think of which is causing this behaviour is a bug in Pulseaudio. I am running version 1.1.0.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
latebeat
Registered Member
Posts
70
Karma
0

Re: Bluetooth problems & phonon

Wed Feb 13, 2013 7:58 am
bcooksley wrote:Yes, my Bluetooth headset supports A2DP. Usually when I first connect it to my computer (on first setup) it configures itself to use HSP, which I immediately change to A2DP. After that it automatically uses A2DP on all subsequent connections.

The buttons on my headset (media next and media previous) also work fine, as long as the global shortcut association has been setup in the application (for Amarok, the defaults of "Media Next" and "Media Previous" are sufficient for it to work out of the box).

I'm not sure why you are having problems unfortunately. Only thing I could think of which is causing this behaviour is a bug in Pulseaudio. I am running version 1.1.0.


It was just a matter of mapping the buttons.. it works great now! Thanks for that! As far as saving the a2dp, still now success but I guess it's no big deal, I'll just have to repeat the steps..
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Bluetooth problems & phonon  Topic is solved

Wed Feb 13, 2013 11:11 pm
If you are okay working with Konsole/CLI then you may want to take a look into "pactl" which may allow you to script the reconfiguration from None to A2DP.
Code: Select all
pactl set-card-profile <card> <profile-name>


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
latebeat
Registered Member
Posts
70
Karma
0

Re: Bluetooth problems & phonon

Thu Feb 14, 2013 2:49 am
bcooksley wrote:If you are okay working with Konsole/CLI then you may want to take a look into "pactl" which may allow you to script the reconfiguration from None to A2DP.
Code: Select all
pactl set-card-profile <card> <profile-name>


That worked great, thanks for the tip! I guess setting up this as a script is going to be faster than doing it manually every time
j_doe
Registered Member
Posts
2
Karma
0

Re: Bluetooth problems & phonon

Sat Apr 06, 2013 6:57 pm
I am having a similar problem using a bluetooth telephony headset, a Samsung HM1700. It attaches and is recognized as an audio device. The problem comes when I try to get the mic working. If it is set as an A2DP device, I get sound playing. If I then set it as an HSP/HFP device in phonon, I get no sound and it does not pick up sounds from the mic. I have gotten sound and the mic to work before using HSP/HFP, but not consistently.

All of the pulseaudio services appear to be running and it is recognized for A2DP, HSP and HFP. Any suggestions?
User avatar
latebeat
Registered Member
Posts
70
Karma
0

Re: Bluetooth problems & phonon

Sat Apr 06, 2013 7:15 pm
j_doe wrote:I am having a similar problem using a bluetooth telephony headset, a Samsung HM1700. It attaches and is recognized as an audio device. The problem comes when I try to get the mic working. If it is set as an A2DP device, I get sound playing. If I then set it as an HSP/HFP device in phonon, I get no sound and it does not pick up sounds from the mic. I have gotten sound and the mic to work before using HSP/HFP, but not consistently.

All of the pulseaudio services appear to be running and it is recognized for A2DP, HSP and HFP. Any suggestions?



try to delete pulse and pulse-cookie

Code: Select all
rm -r .pulse
rm -r .pulse-cookie


then restart bluetooth

Code: Select all
sudo /etc/init.d/bluetooth restart
sudo hciconfig kubuntu reset


Try this and setup the bluetooth device audio again, this worked for me when I had similar problems
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Bluetooth problems & phonon

Mon Apr 08, 2013 9:22 am
It seems that Pulseaudio is somehow failing to apply the correct audio profile.
Does the same issue occur if you use "pavucontrol" to change the audio profile of the bluetooth headset?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
tshearer
Registered Member
Posts
3
Karma
0

Re: Bluetooth problems & phonon

Tue Dec 10, 2013 2:47 pm
I'm having a similar problem, except in my case, although I can connect to the bluetooth device with no problem (it's detected as a headset), but later, it's not listed as an option in Kmix or Phonon. Any ideas of what I can do to solve it? (Kubuntu precise amd64)
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS

Re: Bluetooth problems & phonon

Tue Dec 10, 2013 3:55 pm
tshearer wrote:I'm having a similar problem, except in my case, although I can connect to the bluetooth device with no problem (it's detected as a headset), but later, it's not listed as an option in Kmix or Phonon. Any ideas of what I can do to solve it? (Kubuntu precise amd64)

You should upgrade your Kubuntu installation, as you are most likely running rather outdated KDE and Phonon versions, current is Kubuntu 13:10 with KDE 4.11.3. Without more details from you about the exact KDE software release you are using this is hard to tell, distribution numbers are not enough.


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
tshearer
Registered Member
Posts
3
Karma
0

Re: Bluetooth problems & phonon

Thu Dec 12, 2013 4:04 am
It turned out to be the bluetooth manager my system was using. I followed these instructions (http://www.tooleweb.ca/blog/?e=8&weblog ... r.#message) and am listening to audio via the bluetooth receiver as I type. Unlike Bluedevil, Blueman allows more configuration options, so I was able to set-up the device as A2DP. After doing that and pairing the device, I immediately got a notification that my Bluetooth Audio was ready to use, and the device magically appeared in Phonon and Kmix.

Thank God for that! I'd been looking for a solution for months, and was just about to give up.

Thanks for your feedback, and hopefully this will be able to help anyone else who stumbles upon the same problem!


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]