Skip to main content

Terrible experience with bluetooth headsets and what to do about it

If you own a Bluetooth A2DP headset and any kind of personal computer, good chance is you tried connecting them together. Isn't it nice to watch movies and listen to music free from cluttering wires? Well, good chance is you hated that experience and if that was the reason for buying the headset, you might've even considered throwing it away (or using it only with your phone).

Why do they suck so much? Everything points to the fact that it's not a hardware problem. The same headset most likely will work flawlessly paired with an android device or even the same computer under a different operating system (windows users report huge difference between, like, 8.0 and 8.1, and not in favor of the latter, surprisingly, I think only mac users report good stuff about their macbooks and beats although I didn't try it myself so they might all be faking it :) ). And most likely it's not even the drivers or other low-level stuff, android and desktop linux has mostly the same driver stack in the kernel. My prime suspects are bluez (userland part of the bluetooth stack on most modern linux installations) and pulseaudio (audio manager thingy). ALSA (low-level sound thing) could also be at fault but I don't think it is. Those two are not, let's be frank here, examples of excellent software development although not open source at its worst either, to be honest, they mostly get the job done even if you might have a few troubles connecting devices and, say, ensuring your wireless input devices work before you log in to the system (for example, I own a bluetooth-capable mouse and I use included dongle instead, forever sacrificing a USB port for the sake of trouble-less experience), or you might do some tweaks and tricks to get rid of sound defects (haven't heard that one for a while, I suspect pulseaudio had so trouble performing when CPUs were largely single-core and constantly overloaded). And the combination of those two is a pure nightmare, whenever I try to pair a headset I expect to be fumbling and clicking various controls for at least a few seconds and even connecting an already paired device is almost never flawless (having to connect and disconnect things several times before they finally work is not new). Then, when all is done and seems to work, you a video and you suddenly want to kill someone. It lags so much it's almost never synced and even if you try to play with A/V synchronization and add some video delay it's next to impossible to done right because delay is variable. Something is not right with this world.

Compare this with android. You take the headset, you turn pairing mode on, open bluetooth settings, find the device you want and tap "pair". That's all, it works. If your phone and headset and both NFC-capable it be even easier: hold on close to the other, hear the bell sound, tap "allow" and you're all set. And it never suddenly disconnects, never lags or anything. From now on you most usually can just turn the headset on and don it whenever you feel like it and it will connect and start working almost immediately! Magic!

Now to the sad part. How to make the first more like the second? The short answer is I don't know but something should be done. There are some hardware hacks, like usb/bluetooth sound dongles which can do basically the same thing that dongle does for a mouse or keyboard: take up another port forever in exchange for more or less lack of bugs. Then android is mostly open-source and we just might be able to learn what they do differently and port that somehow to desktop linux. Or just work on fixing and optimizing bluez/pulseaudio (just clearly identifying the exact reason for these shortcomings would be a great start). Burning it all with fire is another possible solutions but I don't thing either of projects mentioned is deserving it, they just have a few bugs or possible deep design issues but otherwise they mostly get the job done and writing anything from scratch is likely to be more bothersome and introduce more new bugs.

If anybody has any context like code or developer discussion threads or bug reports I would really like to hear about it in comments. And I will update this post when/if I find any solution worth pursuing.

Popular posts from this blog

「この番組は、ご覧のスポンサーの提供でお送りします」Inference Labs

It's official, I have corporate sponsors now (which will hopefully be closer to strategic partnership soon, at least I'd like that). Thanks for the steaks and wine and equipment and all other resources for my distributed hacker team (I'm hoping for a cool demo for ETHOnline hackathon), and local Web3 meatup group I facilitate in Tbilisi (steaks and gas money for everyone participating in the ecosystem), and my Web3 community support army in training. A large bag of kudos for our general sponsor: Inference Labs! If anybody needs help onboarding into the decentralised world, reach me privately and we'll help you navigating the options, we have the expenses covered and good people for this (better points of contact are being established, things are being worked on, stay tuned). I should probably tell a few words about what we actually do at Inference Labs but things change so often I hope we're still bringing decentralized AI to the Web3 world when you read this (maybe...

New horizons

I originally started this blog with ideas of reviewing devices and services and hoping that eventually if it gets popular enough somebody starts sending me stuff to review. A lot has changed since, I stopped obsessing that much about new gadgets and got into vintage electronics, many of things that were new and interesting a few years ago are a commodity now. I thought about reviewing the phone I finally got to refreshing last year (S23 Ultra is ok upgrade for Note 8, I'm glad that new ultras will finally have flat screen again, I might upgrade next year or so just for that) but I don't really feel like it or think it would mean much for the readers. Most of my vintage electronics is at home where I haven't been for a couple years and it's not something I can currently do something about, I touched a soldering iron like once or twice this year. I might post something work-related once I get the hang of what I'm actually doing there and have some rough ideas wen dece...

Using virtualenv for more than Python projects

Sorry, it's not a complete instruction, just a thought. It occurred to me (some time ago) that Python's virtualenv is, essentially, a simplified version of system "prefix", it has bin, lib, include, and can have more stuff when needed. If you're willing to experiment (you'll probably have to set a few additional environment variables and/or build flags but that's no big deal), you can install various other tools there up until you have a complete system with its own compiler and complete set of libraries although it's much simpler to keep using system compiler and libraries only complimenting them when needed. Granted, prefixes are nothing new, people were using /opt (and their home directory) this way since the beginning of time. But with little help of virtualenv-wrapper or pyenv you can easily switch between them and isolate environments better. Binaries and stuff installed in virtualenv would override system defaults but only when venv is activat...