"failed to attach device" in Linux

I’m attempting to use a keyboard and mouse with the bluetooth adapter I just purchased from Amazon ( http://www.amazon.com/gp/product/B009… ). I don’t have problems using it on Windows 7 with the included software, but on Linux it acts very flaky.
I plug in the adapter. Its light turns on. It shows up in lsusb, bluetoothd is running, and the bluetooth, hidp, and btusb modules are loaded. Blueman-applet is showing an icon in the tray. When I use blueman-assistant, it sees the mouse and keyboard. When I try to add one of them, it tells me something like “added device successfully, but failed to attach it”. In blueman-manager, the three bars beside the mouse and keyboard keep disappearing and reappearing. If I turn the devices off and on again, they can no longer be detected.
This happens whether the adapter is plugged into the front or back of the computer. The mouse and keyboard are less than 1 meter away from the adapter, and have new batteries.
I was able to use them with this adapter once, until I rebooted.

I’m using Arch Linux x86 with a custom kernel 3.10 (so I might have missed some module) and the Maté DE. The keyboard and mouse are confirmed working with Windows 7 and also Windows XP on a laptop with a built-in adapter.

Thanks for posting such good detail.

We know the hardware is working (with the successful datapoint on Windows) - so let’s try to figure out what’s happening differently on the Linux side.

First off, as you know every distro and kernel is different – especially with a custom compile – so that’s an aspect we may not be able to help with.

Normally, I’d focus in on how to reset the keyboard and mouse so they forget their current pairing, and are available again for discovery by the adapter on Linux. But since you mention using the keyboard and mouse with several systems, it sounds like you’ve already got that covered.

Focusing in on the kernel, there are some reports of a Bluetooth regression in kernel 3.10. It’s possible your version is in this range. Here’s a thread on that:
http://lkml.indiana.edu/hypermail/lin…

There’s a fix mentioned on the thread. Can you make sure your kernel version has the fix for this regression in 3.10?

If that’s not it, I don’t know of another cause - but it’s likely there’s something configuration specific that can be tracked down. Fortunately, your scenario is very common so there should be lots of help from the community.

Thanks!
Bernie

Unfortunately, I wasn’t able to find the final patch referenced in the thread (it just says it was attached to the email). The first patch given fails 8/8 hunks when I try to apply it.
I just have vanilla 3.10.0 plus tuxonice patches, so I assume it doesn’t have the bluetooth patch.
I’m patching it up to 3.10.1 (I’ll keep it separate from the current one) to see if that helps.

The same thing happens with 3.10.1. I suppose I’ll try 3.9.9, since that’s in my distro’s repo. If that works, I’ll try with my custom config.

I tried using Arch’s default linux 3.9.9. The same issue happens. This rules out the problem being caused by a regression in 3.10, right?

Ideas?

Yep, that would rule out that one regression in 3.10, I think.

I’m at a bit of a loss. It’s clear from the original post that you already did the most important debugging steps. The hardware works elsewhere, so it’s pointing to some kind of software problem.

Looking through the Linux Bluetooth documentation here:
https://wiki.archlinux.org/index.php/…

I think the high-level things you did in the UI should be sufficient (equivalent of something like “hcitool scan”). And, anyways, it seemed to connect and work intermittently.

Taking a different approach to it: On the Windows 7 machine that worked, did that have only USB 2.0 ports? And does this Linux box only have USB 3.0 ports?

USB 3.0 has known interference issues with 2.4Ghz devices:
http://www.intel.com/content/www/us/e…

But I’m grasping at straws a little. I’m not sure what’s the source of the unique problem on Linux. Let me know if there’s something specific you can think of, for us to help …

The Windows 7 and Arch Linux machines are the same one, and I only have USB 2.0 ports on it. I can’t currently think of anything that might help, and I wasn’t able to get any suggestions I haven’t tried and listed when I asked on #bluez@irc.freenode.net](mailto:#bluez@irc.freenode.net) .

Well, since I got it to use on Linux ~90% of the time, I returned it. So I consider this topic closed. Thanks for trying to help, Mr. Thompson.

Sorry I couldn’t identify what was different about this particular Linux setup.

We never want customers stuck with hardware that doesn’t meet their needs - refunds within 30 days are easy through Amazon. As you know, just visit http://amazon.com/returns

You’ll get an email from us asking for more detail on why, but if you have a public or private ticket like this open with us, we already have the background we need.

Again, my apologies,
Bernie