[Jaunty] regression: bluetooth headset playback quality - choppy every two-three minutes

Bug #399803 reported by Fredrik Wendt
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: bluez

I've been using a SonyEricsson headset since Ubuntu 7.10 to play music at work (from a ThinkPad T61) - it's been a great experience and a pleasure to listen to music using that headset.
This christmas I got (myself actually) an Acer Aspire One 110A and installed Ubuntu 8.10, plugged in a tiny bluetooth adapter, installed banshee and rhythmbox, paired up and off I went. It worked great but with a shorter range (failed to keep music playing while going to bathroom :)
However, I just recently updated to 9.04 and now playback has started to behave really bad. What happens is that it sounds just like I'm out of range - it gets choppy and after some time it fast forwards (skips frames) to get back in sync.

lsusb says:
  Bus 002 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

Looking at /var/log/syslog this is what I get after doing a /etc/init.d/bluetooth restart (I do that whenever I forget to turn playback off when leaving my desk and return after a few minutes):

Jul 15 15:41:44 acer bluetoothd[16817]: Bluetooth daemon
Jul 15 15:41:44 acer bluetoothd[16817]: Starting SDP server
Jul 15 15:41:44 acer bluetoothd[16817]: Starting experimental netlink support
Jul 15 15:41:44 acer bluetoothd[16817]: Failed to find Bluetooth netlink family
Jul 15 15:41:44 acer bluetoothd[16817]: bridge pan0 created
Jul 15 15:41:44 acer bluetoothd[16817]: Registered interface org.bluez.Service on path /org/bluez/16817/any
Jul 15 15:41:44 acer bluetoothd[16817]: HCI dev 0 registered
Jul 15 15:41:44 acer bluetoothd[16817]: HCI dev 0 up
Jul 15 15:41:44 acer bluetoothd[16817]: Starting security manager 0
Jul 15 15:41:44 acer bluetoothd[16817]: Registered interface org.bluez.SerialProxyManager on path /org/bluez/16817/hci0
Jul 15 15:41:44 acer bluetoothd[16817]: Registered interface org.bluez.NetworkPeer on path /org/bluez/16817/hci0
Jul 15 15:41:44 acer bluetoothd[16817]: Registered interface org.bluez.NetworkHub on path /org/bluez/16817/hci0
Jul 15 15:41:44 acer bluetoothd[16817]: Registered interface org.bluez.NetworkRouter on path /org/bluez/16817/hci0
Jul 15 15:41:44 acer bluetoothd[16817]: Registered interface org.bluez.Service on path /org/bluez/16817/hci0
Jul 15 15:41:44 acer bluetoothd[16817]: Registered interface org.bluez.Headset on path /org/bluez/16817/hci0/dev_00_18_13_DB_F4_0C
Jul 15 15:41:44 acer bluetoothd[16817]: Registered interface org.bluez.AudioSink on path /org/bluez/16817/hci0/dev_00_18_13_DB_F4_0C
Jul 15 15:41:44 acer bluetoothd[16817]: Registered interface org.bluez.Control on path /org/bluez/16817/hci0/dev_00_18_13_DB_F4_0C
Jul 15 15:41:44 acer bluetoothd[16817]: Registered interface org.bluez.Serial on path /org/bluez/16817/hci0/dev_00_18_13_DB_F4_0C
Jul 15 15:41:44 acer bluetoothd[16817]: Registered interface org.bluez.Input on path /org/bluez/16817/hci0/dev_00_18_13_DB_F4_0C
Jul 15 15:41:44 acer bluetoothd[16817]: Adapter /org/bluez/16817/hci0 has been enabled

Then, I start playback in banshee, music starts playing (sounds OK) and syslog shows

Jul 15 17:31:59 acer bluetoothd[16817]: link_key_request (sba=00:1B:DC:02:0F:7E, dba=00:18:13:DB:F4:0C)
Jul 15 17:32:00 acer bluetoothd[16817]: Can't open input device: No such file or directory (2)
Jul 15 17:32:00 acer bluetoothd[16817]: AVRCP: failed to init uinput for 00:18:13:DB:F4:0C

Just as I write this report and hit play above, I just got 1:17 minutes of OK playback, but then it started chopping and at 1:37 it was back in sync. I'm playing an ogg file that I've listened to (thousands of times - last.fm can confirm this), so there's nothing wrong with the file.

My comple .asoundrc:

pcm.bluetooth {
 type bluetooth
 device 00:18:13:DB:F4:0C # tiny
 #device 00:1B:DC:02:0F:7E # tiny nr 2
}

I've run "vmstat 1" in a console to see if there's something special happening but I can't find any pattern from that.

I'm running the standard kernel, all packages updated. My /boot/grub/menu.lst does include
# defoptions=enable_mtrr_cleanup mtrr_spare_reg_nr=1 quiet splash
which is related to MTRR registries bug(s) in kernel and intel.

I've reniced bluetoothd, pulseaudio and banshee to -10 (using htop) - no change.

I'm out of ideas on what to try. I'm willing to try most ideas as I'm getting crazy listening to people walk by in the corridor at the office ...

ceda@acer:~$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04
ceda@acer:~$ LANG=C apt-cache policy bluez gnome-bluetooth
bluez:
  Installed: 4.32-0ubuntu4.1
  Candidate: 4.32-0ubuntu4.1
  Version table:
 *** 4.32-0ubuntu4.1 0
        500 http://se.archive.ubuntu.com jaunty-updates/main Packages
        100 /var/lib/dpkg/status
     4.32-0ubuntu4 0
        500 http://se.archive.ubuntu.com jaunty/main Packages
gnome-bluetooth:
  Installed: 0.11.0-0ubuntu4
  Candidate: 0.11.0-0ubuntu4
  Version table:
 *** 0.11.0-0ubuntu4 0
        500 http://se.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status
ceda@acer:~$ aptitude search bluez
i bluez - Bluetooth tools and daemons
i bluez-alsa - Bluetooth audio support
p bluez-btsco - Bluez Bluetooth SCO tool
p bluez-compat - BlueZ 3.x compatibility binaries
i bluez-cups - Bluetooth printer driver for CUPS
i bluez-gnome - Bluetooth utilities for GNOME
i bluez-gstreamer - Bluetooth gstreamer support
p bluez-hcidump - Analyses Bluetooth HCI packets
p bluez-pcmcia-support - PCMCIA support files for BlueZ 2.0 Blueto
i bluez-utils - Transitional package
i A python-bluez - Python wrappers around BlueZ for rapid bl
v python2.5-bluez -
v python2.6-bluez -
ceda@acer:~$ aptitude search bluetooth
i bluetooth - Bluetooth support
i gnome-bluetooth - GNOME Bluetooth tools.
i gpe-bluetooth - Bluetooth connectivity tool for GPE
p kdebluetooth - KDE Bluetooth Framework
p libbluetooth-dev - Development files for using the BlueZ Lin
i libbluetooth3 - Library to use the BlueZ Linux Bluetooth
v libbluetooth3-dev -
p libmultisync-plugin-irmc-blueto - Adds Bluetooth support to the IrMC plugin
p libnet-bluetooth-perl - Perl Bluetooth interface
v python-bluetooth -

Revision history for this message
Alexander Sack (asac) wrote :

how do you setup your headset? using alsa or pulseaudio?

on the other front, your shorter range issue is probably due to your adapter (some out there are really crapware).

Revision history for this message
Fredrik Wendt (fredrik-wendt) wrote :

I start by pairing using the gnome toolbar applet.
I put the MAC address of my adapter in .asoundrc as outlined above.
I execute 'gconftool -t string -s /system/gstreamer/0.10/default/musicaudiosink "alsasink device=bluetooth"' to get music to my headset.

I'm guessing pulseaudio isn't in that chain?

Revision history for this message
Ulisses Furquim (ulissesf) wrote :

Pulseaudio isn't in that chain, you're right. You're using the bluetooth ALSA plugin directly.

Regarding the range there are classes of bluetooth adapters each being able to reach different ranges.

Is it possible for you to try Karmic with gnome-bluetooth (instead of bluez-gnome) and pulseaudio?

Revision history for this message
Fredrik Wendt (fredrik-wendt) wrote :

I'm well aware of the range, that's not a problem. The problem is that this setup worked perfectly from January until June, which is when I went on vacation and installed 9.04. I did however not touch my home directory - any .gnome/ directories or gconf settings you want me to clear/check?

Is there anyway I could figure out where in the chain the problem lies? Rhythmbox > gstreamer > alsa > bluez > radio > headset.

I can try karmic, it'll take some time for me to find the hours to install it (the SSD disk that came with the Aspire One isn't too fast on writing).

I'll also try my older (bigger and better) bluetooth adapter. I'll also try using wired headphones to make sure it runs without issues.

Revision history for this message
Ulisses Furquim (ulissesf) wrote :

Hi Fredrik,

I don't think there's something in your .gnome directories that might be causing this or could give us some hint.

When you installed 9.04 several components have changed, including the kernel. Something in the bluetooth stack in the kernel might be causing this or even in the btusb driver.

You can start debugging by running bluetoothd with "-d" command line switch and maybe also recompiling bluetooth ALSA plugin (included in bluez-alsa binary package) with debug output to see what's happenning. Besides that, hcidump logs might be helpful to capture with root user by running: "hcidump -X -V". This is for the bluetooth related parts as I'm guessing that's where the problem is.

It's a good idea to test other adapters and wired headphones before installing karmic. This might give us some clues before digging deeper into this problem.

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

This is reported against an old version of Ubuntu and many things has changed since then. Because of that we won't fix this issue however if this behavior repeats on a modern version please fill a bug report against it and we will take it from there.

Changed in bluez (Ubuntu):
status: New → Invalid
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.