The State of Bluetooth Headset in Linux

A few days ago, I bought a shiny Sony SBH80 bluetooth headset. This is my first bluetooth headset ever, so I thought I’d share my experience in setting it up.

Android

Yes, Android is Linux, just not the regular one πŸ™‚
I have a Nexus 5 phone and since it comes with KitKat, the headset is fully supported. Audio quality is superb (both for streaming music and making calls). The only annoyance I experienced is that the headset need to be disconnected from the phone first before connecting it with PC. When the connection with the PC is established, you can then reconnect it with the phone (yes, it supports multiple connections).

Gentoo

I’m running the unstable Gentoo Linux, so I always have the (relatively) latest packages available. I have BlueDevil 2.0_rc1 installed as part of my KDE desktop, along with BlueZ 5.18 as its dependency. BlueDevil easily established the connection with the headset but I couldn’t use it as audio output/sink.

After a quick research, I found out that BlueZ needs to have PulseAudio support to make use of the headset functionalities. I then rebuilt it (along with some multimedia packages) with PulseAudio support. After logging in back to KDE, the headset worked. All I needed to do was giving the headset the highest priority in KDE Phonon settings, so when it’s available, Phonon will use that as the output, otherwise it will revert back to the other available devices.

However, I couldn’t make the microphone work. After some digging, I found out that HSP & HFP support were removed from Bluez 5.0, so until oFono provide those profiles, there’s no way to use the microphone πŸ™

I was curious and downgraded BlueDevil, Bluez and some other packages to their previous versions that support HFP & HSP profiles. I also removed PulseAudio support from my system since it’s not required. I had to add the following lines to /etc/asound.conf to make the headset recognized by ALSA:

pcm.sbh80 {
        type plug
        slave {
                pcm {
                        type bluetooth
                        device xx:xx:xx:xx:xx:xx
                        profile "auto"
                }
        }
        hint {
                show on
                description "Sony SBH80"
        }
}

ctl.sbh80 {
        type bluetooth
}

After that, the headset worked as audio sink but the microphone was not working still. I then found out that to make use of the microphone, the audio sink service need to be disabled. Enabling only the HFP/HSP profile without A2DP profile with BlueDevil wasn’t possible, so I installed BlueMan and it worked!

However, the sound quality was terrible and often times, Phonon won’t switch to the headset when it’s availabe, and won’t revert back to the built-in sound card when it’s disconnected. Ouch!

I figured, if I added PulseAudio support, the switching should be smooth, and I did. For the most part, it worked, but there’s this delay when the system is making an event sound which was really annoying.

Finally, I reverted back to Bluez5 with PulseAudio support and ‘sacrificed’ the microphone (I don’t do audio chat that often and my built-in mic is working fine anyway). It’s not what I really wanted, but it’s the best option I got and I’m quite happy with it.

Standard

KMail vs. KPPP

If you’re using a dial-up connection via KPPP and KMail’s complaining about network connection not being detected, just fire up Akonadi Console and toggle your resources’ states from there. I’ve yet to find the solution for this but this trick should help you get your new mails.

Standard

KDE 4.8 Taskbar

I’m not really sure if this feature is part of KDE SC 4.8, but it’s so cool and I feel like I have to write about it here πŸ™‚

kde-taskbar-4.8

See the screenshot above? KDE’s default taskbar is now more powerful than ever! Right clicking on a taskbar item now gives you the ability to start a new instance of that application, and add a launcher of that application to the taskbar when it’s not running.

I know, it’s pretty similar to what Windows 7 offers, except (IMO) it’s waay cooler. In Windows 7, if you pinned an application to the taskbar, it will only show an icon, without the application name/window title, no matter the state of the application is (running or not). In KDE, well, you guessed it, if the application is not currently running, an icon will be added to the taskbar, and it will disappear when it’s launched.

If you really want Windows 7’s taskbar in KDE, you can install this plugin πŸ™‚

Standard