Bluetooth is completely broken on Ubuntu 8.10

Bug #306721 reported by Jeremy Visser
54
This bug affects 5 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: bluez

In Ubuntu 8.10, Bluetooth is completely broken. I can reproduce this from two fresh installs of Ubuntu 8.10, and from the live CD. I have tested this on three computers, with two different Bluetooth dongles, and one built-in Bluetooth device. No difference -- it is broken regardless.

    $ lsb_release -rd
    Description: Ubuntu 8.10
    Release: 8.10

    $ apt-cache policy bluez
    bluez:
      Installed: 4.12-0ubuntu5
      Candidate: 4.12-0ubuntu5
      Version table:
     *** 4.12-0ubuntu5 0
            500 http://apt.sunriseroad.net intrepid/main Packages
            100 /var/lib/dpkg/status

Bluetooth file sharing is broken. Attempting to pair devices with the GUI makes the remote device ask for a PIN code, then the local machine instantly fails with "Pairing with whatever-device failed".

Bluetooth audio is broken. I can reproduce this from, as I said, the live CD, with several different dongles. There are no updates to the bluez-* packages available to install.

When trying to add a Bluetooth headset (X5 Stereo), I first add the following to .asoundrc (or /etc/asound.conf):

    pcm.bluetooth {
        type bluetooth
        device "00:00:00:00:00:00" #obviously, I hid my bd address for privacy here
    }

Then attempt to play sound through it:

    $ oggdec -o - /usr/share/sounds/ubuntu/stereo/desktop-login.ogg | aplay -D bluetooth

This results in:

    ALSA lib pcm_bluetooth.c:1619:(bluetooth_init) BT_GETCAPABILITIES failed : Input/output error(5)
    aplay: main:583: audio open error: Input/output error

The same error occurs if I try loading the PulseAudio module-alsa-sink module:

    $ pactl load-module module-alsa-sink device=bluetooth

As I said, I can reproduce this with different dongles, different PCs on fresh installs or on live CDs. Also, I am following directions. Therefore, either the documentation is broken, or Ubuntu is broken.

Also, on one machine, I installed PulseAudio 0.9.13 on 8.10 from a PPA to see if PulseAudio → Bluetooth without ALSA in between would fix it. However, I got this error:

    module-bluetooth-device.c: BT_GETCAPABILITIES failed : Input/output error (5)
    module-bluetooth-device.c: Failed to get device capabilities

I can, however, scan for devices with hcitool:

    $ hcitool scan
    Scanning ...
        00:00:00:00:00:00 X5 Stereo v1.3
        00:00:00:00:00:00 moonwood
        00:00:00:00:00:00 Scrubb

Obviously, the BD addresses have been blanked out for privacy purposes. When actually running the command, the addresses are fine.

When attempting to run all the above commands as root, the exact same result occurs. Therefore, it is not a user/group problem.

Please note that it does not matter whether or not the Bluetooth dongle is present or not or whether the headset is switched on or off, or if I type in a phoney BD address -- the exact same "BT_GETCAPABILITIES failed" errors occur. Therefore, the problem is not with communication between the headset and PC -- the problem is occurring before the PC even communicates with the headset.

Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

Before some troll marks this as a duplicate, please note that all the other bugs similar to this are from people trying to do something similar, and the same Bluetooth bug happens to be occuring, but is not the central part of the problem, unlike this bug report.

If anything, all the so-called "duplicates" goes to show how widespread this problem actually is.

Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

I should also note that all the above commands work perfectly on Gentoo and Ubuntu 8.04.

description: updated
Revision history for this message
zeusOne (vaudano) wrote :

Same problem with Kubuntu 8.10

Revision history for this message
jsl4980 (james-ledwith) wrote :

I'm having the same problem. My Bluetooth device does not have a screen/keypad and I cannot input a PIN into the device. The GUI Bluetooth wizard does not allow me to change the PIN or enter a PIN on the GUI. Its impossible to pair with many devices - that's a complete show stopper for me.

Revision history for this message
phyz (phyz2010) wrote :

i'm also having this kind of problem too.The bluetooth applet can scanning any other bluetooth device however the pairing fails and it does'nt allow us to put the PIN.Beside,it seems like freezing when i try to set the visibility setting.

Revision history for this message
TankerKevo (tankerkevo) wrote :

Bluetooth is broken for me as well. Ubuntu 8.10 w/ Latest updates as of 12/21/08 at 8PM. After updating the stable updates and having no luck and updated using the Intrepid proposed repository and still had no luck. I've tried removing and re-installing just about every bluetooth package in Synaptic, still no luck.

I can see my USB bluetooth adapter inside the gnome-bluetooth tray program. I can also see the devices (Logitech keyboard w/ track pad, Sony PS3 Bluetooth Headset) listed when I place it in pairing mode, however it never provides my a key to enter.

Last week I was able to semi-use my bluetooth keyboard. It would pair and function, but if I left it alone for 10 min it would disconnect and I'd have to delete the device in the bluetooth applet and re-pair the device to the laptop (Dell 1525).

Both of these devices pair fine with the PS3 still, so I know it is not an issue with the hardware.

Revision history for this message
TankerKevo (tankerkevo) wrote :

P.S. My bluez version is 4.23.

Revision history for this message
TankerKevo (tankerkevo) wrote :

It seems like Bluetooth is fine in Kubuntu: http://kubuntuforums.net/forums/index.php?topic=3100328.0

From other posts I was thinking this was kernel related, but seems to be specifically affecting gnome.

Revision history for this message
Robie Basak (racb) wrote :

Could this be set to Importance: High please? Rationale: bluetooth is unusable in Intrepid.

I have the same problem. hcitool scan can always see my devices when bluetoothd is not running. When bluetoothd is running, then sometimes hcitool scan fails; stopping bluetoothd and hciconfig down then hciconfig up fixes it and the scan works again.

The GNOME applet is unable to find any devices. I can't seem to work the dbus interface directly since at least some of the dbus api seems to have changed (see below). However, having looked at the source I think that audio/manager.c:manager_find_device fails to find anything even if given an address.

I think the following are the same issue: bug #283777, bug #285412.

Also, when bluetoothd starts the kernel logs the following:
    pan0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.

>>> import dbus
>>> bus = dbus.SystemBus()
>>> manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager')
>>> bus_id = manager.ActivateService('audio')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/var/lib/python-support/python2.5/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/var/lib/python-support/python2.5/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/var/lib/python-support/python2.5/dbus/connection.py", line 607, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "ActivateService" with signature "s" on interface "org.bluez.Manager" doesn't exist

Changed in bluez:
status: New → Confirmed
Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

I have been under the impression that it was a kernel bug, but I backported the Bluetooth kernel modules from 2.6.28, which did not fix it.

Revision history for this message
Robie Basak (racb) wrote :

I've just booted 2.6.22-14-generic which is what I used to use on Hardy (it's from Gutsy but 2.6.24 on Hardy had other problems on my machine). It doesn't work - same error (with BT_GETCAPABILITIES).

It used to work with this kernel on Hardy.

So I don't think it's a kernel issue.

Revision history for this message
Jeremy Visser (jeremy-visser) wrote : Re: [Bug 306721] Re: Bluetooth is completely broken on Ubuntu 8.10

On Tue, 2008-12-23 at 04:43 +0000, Robie Basak wrote:
> So I don't think it's a kernel issue.

Interesting -- thanks.

I'm now beginning to think my title "Bluetooth is completely broken on
Ubuntu 8.10" is a bit inaccurate, as I just set up a Bluetooth PAN
between my Ubuntu machine and a Vista machine, which worked very well.

Unfortunately, everything else that I've tried is still broken. Maybe we
could make a list of things that are and aren't broken, to try and
narrow this down.

Obviously, "completely broken" seems too broad now.

Revision history for this message
Robie Basak (racb) wrote :

Jeremy,

Could you try something please?

sudo /etc/init.d/bluetooth stop
sudo mv /var/lib/bluetooth{,.bak}
sudo mkdir /var/lib/bluetooth
sudo /etc/init.d/bluetooth start

This will clear out all existing pairings and settings, but I think it might have sorted some problems out when I was debugging bluez. After doing this, the applet was able to discover new devices.

I wonder if it's just the upgrade path that's broken?

Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

On Thu, 2008-12-25 at 06:09 +0000, Robie Basak wrote:
> Could you try something please?
>
> This will clear out all existing pairings and settings, but I think it
> might have sorted some problems out when I was debugging bluez. After
> doing this, the applet was able to discover new devices.
>
> I wonder if it's just the upgrade path that's broken?

Hi Robbie,

I will certainly try the steps you have provided shortly. However, I
would like to re-emphasise that I can reproduce all the problems I
describe in the description from the Ubuntu live CD, which is, in
effect, a fresh install of Ubuntu.

Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

On Thu, 2008-12-25 at 06:09 +0000, Robie Basak wrote:
> Jeremy,
>
> Could you try something please?
>
> sudo /etc/init.d/bluetooth stop
> sudo mv /var/lib/bluetooth{,.bak}
> sudo mkdir /var/lib/bluetooth
> sudo /etc/init.d/bluetooth start
>
> This will clear out all existing pairings and settings, but I think it
> might have sorted some problems out when I was debugging bluez. After
> doing this, the applet was able to discover new devices.
>
> I wonder if it's just the upgrade path that's broken?
>

Revision history for this message
Robie Basak (racb) wrote :

On Thu, Dec 25, 2008 at 10:11:43AM -0000, Jeremy Visser wrote:
> However, I
> would like to re-emphasise that I can reproduce all the problems I
> describe in the description from the Ubuntu live CD, which is, in
> effect, a fresh install of Ubuntu.

Sorry Jeremy, I missed that. In that case it obviously won't help.

I think we might be looking at more than one bug, though I think they
they might be linked in some way.

I will look again at the problem soon.

Robie

Revision history for this message
A. Waschbuesch (andreas-waschbuesch) wrote :

Seems like bluez was severly b0rked. The latest bluez-release (compiled with gcc 4.3.2 / binutils 2.18.93-20081009) fixed all of the above mentioned (over here, that is):

http://www.bluez.org/bluez-425/

Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

I'm totally trying BlueZ 4.25 to see if it fixes anything. Thanks, Mr. Waschbuesch! :)

Revision history for this message
crashed (crashed) wrote :

 I can confirm that installation of BlueZ 4.25 completely solved my problem.

Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

Ubuntu Jaunty now has 4.25 packages in the repository: http://packages.ubuntu.com/search?keywords=bluez

So I downloaded the 4.25 packages and installed them onto my Intrepid system. No better.

Instead of a BT_GETCAPABILITIES error, I get a BT_GET_CAPABILITIES error (the API must have changed). That's all.

@crashed, did you compile BlueZ from source, or use the Jaunty packages? If you compiled from source, that would be indicative of a problem with Ubuntu's customisation of the packages.

Revision history for this message
A. Waschbuesch (andreas-waschbuesch) wrote :

As mentioned above: compiled from source.

Revision history for this message
Alendit (alendit) wrote :

Same here with Jaunty's 4.25 and 4.26 compiled from source :( In addition - in Ubuntu bluez upstream is divided in bluez bluez-alsa bluez-gstreamer libbluetooth3 etc - so you've got to override some files in order to install upstream package. I can't just remove mentioned packages with apt-get - quite some packages depend on them nautilus including.

How did you installed 4.25/26?

Revision history for this message
crashed (crashed) wrote :

Jeremy, Alendit

I installed BlueZ 4.25 (and then 4.26) from source as mentioned in README file placed in tarball.

Before installation I completely removed bluez packages from the system (in my case nautilus doesn't depend on bluez*:
crashed@epbyminw1962h:~/src/bluez-4.26$ apt-cache show nautilus
...
Depends: libatk1.0-0 (>= 1.20.0), libbonobo2-0 (>= 2.15.0), libc6 (>= 2.4), libcairo2 (>= 1.2.4), libeel2-2 (>= 2.24.0), libexempi3, libexif12, libgconf2-4 (>= 2.13.5), libglade2-0 (>= 1:2.6.1), libglib2.0-0 (>= 2.18.0), libgnome-desktop-2-7 (>= 1:2.23.90), libgnome2-0 (>= 2.17.3), libgnomecanvas2-0 (>= 2.11.1), libgnomeui-0 (>= 2.22.0), libgtk2.0-0 (>= 2.14.1), liblaunchpad-integration1 (>= 0.1.17), libnautilus-extension1 (>= 1:2.22.2), liborbit2 (>= 1:2.14.10), libpango1.0-0 (>= 1.21.6), librsvg2-2 (>= 2.18.1), libselinux1 (>= 2.0.59), libstartup-notification0 (>= 0.8-1), libx11-6, libxml2 (>= 2.6.27), nautilus-data (>= 1:2.24), nautilus-data (<< 1:2.25), shared-mime-info, gnome-control-center (>= 2.6), desktop-file-utils (>= 0.7), gvfs-backends
...

Now I'm facing another problem: command line hci utilities are working perfectly but gnome bluetooth-applet doesn't see the device (but it can be the problem of my omnibook module).

Revision history for this message
crashed (crashed) wrote :

Forgot to mention regarding the problem with bluetooth-applet that just few days ago everything worked perfectly including navigation in nautilus, file transfers, etc.

Revision history for this message
crashed (crashed) wrote :

Fixed my last problem by modifying /etc/init.d/bluetooth (change HCID from /usr/sbin/hcid to /usr/sbin/bluetoothd).

Now I can browse files on my Nokia phone, transfer file from/to device.

Revision history for this message
Robie Basak (racb) wrote :

Backporting the latest from jaunty for both pulseaudio and bluez has fixed the problem for me - thanks. It looks like there's been a bluez API change which pulseaudio has had to catch up with, too.

Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

No success here at all. In my O.P. I said it was working on Gentoo -- that was because it was still running BlueZ 3.36. Now I've updated my Gentoo system to BlueZ 4.28, and Bluetooth audio is completely broken on Gentoo as well. I guess this is not an Ubuntu-specific issue.

I think Ubuntu should completely roll back to BlueZ 3.36 for Jaunty for the sake of sanity. Suicide rates might go down worldwide.

Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

Okay, I updated my Intrepid system from BlueZ 4.25 to 4.30, and I got some working audio! I had to download the BlueZ source tarball and use the tests/simple-agent.py script to get a connection to the headset, since `hcitool cc` is broken.

After a connection was established, PulseAudio module-bluetooth-device and libasound_module_pcm_bluetooth worked to a degree (with very stuttery sound).

I couldn't get it working with 4.12 or 4.25, so Intrepid is still broken. 4.28 or later needs to be backported to Intrepid. (If it weren't for #336451, I would have built packages by now and uploaded them to a PPA.)

Revision history for this message
djronh (bigron-msn) wrote :

Booting with a earlier kernel than the default in 8.10 allowed me to pair a phone and transfer a song. This was the only system change and pc went from broken to working.

Revision history for this message
Nati (natikfir) wrote :

hey guys
you probably hearing that a lot "i am new to linux". i have the same problem described here and one of the solutions suggested here is to download BlueZ 4.25 so i did. one big problem i don't have any idea how to install it i read the readme file and still no idea.
can someone please help/direct me to a tutorial on how to install releases in linux i tried to search google but no luck.

thank you all

Nati

Revision history for this message
RoboJ1M (jim-neave) wrote :

Hi, likewise, my Belkin Bluetooth device (I believe it is an F8T013) does not work with any BlueZ after Ubuntu 8.04 (BlueZ 3?)
The device is detected, Bluetooth GNOME applet is started but it doesn't do anything.
hcitool scan produces timeout error.

It look like BlueZ 4 has a long LONG way to go.

Lucky for us they will be supporting 8.04 for quite a while.

Tested broken in:

8.10
9.04 Beta (9 days prior to official launch)

Regards,

Jim.

Revision history for this message
TankerKevo (tankerkevo) wrote :

I am happy to report that I have upgraded my HTPC to Jaunty 64 bit and am now using my Logitech PS3 Bluetooth keyboard. Setup and recognition of the device went flawlessly, and it recognizes the keyboard at login after a reboot with out any special modifications. Simply said, it just works now.

Revision history for this message
bigbrovar (bigbrovar) wrote :

am still having this issue, am using kubuntu 9.04 and bluetooth is completely broken out of the box, i cant use my bluetooth, i have little hope that this would be fixed. this is a K-ubuntu , not Ubuntu the favoured child.. bluetooth as being broken now in two subsequent releases of kubuntu, but who cares .,. after its kde :-(

Revision history for this message
bigbrovar (bigbrovar) wrote :

oh great i was just checking to see how important this bug is to the ubuntu team .. guess what .. their still undecided 2 years and going .. and there say ubuntu and kubuntu are treated equally .. yeah right

Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

As of Ubuntu 9.10, all these problems are now fixed. Bluetooth pairing and file transfer is reliable, and even using a Bluetooth headset works out-of-the-box with the GUI, without needing to install additional packages.

This is mainly due to upstream fixes in PulseAudio and BlueZ.

Changed in bluez (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Murz (murznn) wrote :

Bluetooth headset didn't work out of the box on Karmic fresh install, see bug https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/437649

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.