[Latitude 2120] bluetooth is disabled after suspend/resume

Bug #823467 reported by Jeff Lane 
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Fedora
Invalid
Undecided
bluez (Debian)
New
Unknown
bluez (Ubuntu)
Fix Released
Medium
Keng-Yu Lin
Oneiric
Fix Released
Medium
Keng-Yu Lin
gnome-bluetooth (Ubuntu)
Invalid
Medium
Unassigned
Oneiric
Invalid
Medium
Unassigned
linux (Ubuntu)
Invalid
Medium
Unassigned
Oneiric
Invalid
Medium
Unassigned

Bug Description

Testing Oneiric Alpha 3 on a Dell Latitude 2120. Prior to suspend/resume testing, tests ran that verified that the bluetooth controller was detected and that I could connect and use a bluetooth mouse. After suspend/resume, these tests are conducted again to verify that bluetooth still functions.

In this case, bluetooth fails to work after suspend/resume. The bluetooth icon in the indicator area shows that bluetooth is on. However, if you access the menu, there are no options available (as though bluetooth was disabled.)

I then open the properties dialog and it shows Bluetooth as being disabled. I tried using the slider to turn bluetooth back on but it just jumps back to off and never turns bluetooth back on.

Nothing I've been able to do so far has brought bluetooth back

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-3.0.0-8-generic 3.0.0-8.10
ProcVersionSignature: Ubuntu 3.0.0-8.10-generic 3.0.1
Uname: Linux 3.0.0-8-generic i686
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC269VB Analog [ALC269VB Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC269VB Analog [ALC269VB Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ubuntu 1386 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf6dfc000 irq 46'
   Mixer name : 'Realtek ALC269VB'
   Components : 'HDA:10ec0269,102804a5,00100100'
   Controls : 14
   Simple ctrls : 9
Date: Tue Aug 9 14:02:50 2011
HibernationDevice: RESUME=UUID=5f260aea-daa2-47cc-92b2-31114e3c8ef6
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386 (20110803.1)
MachineType: Dell Inc. Latitude 2120
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-8-generic root=UUID=08fbc92a-95f3-46a5-b5ea-ea48d3df5663 ro quiet splash initcall_debug vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-8-generic N/A
 linux-backports-modules-3.0.0-8-generic N/A
 linux-firmware 1.56
SourcePackage: linux
StagingDrivers: brcmsmac rts_pstor brcmutil
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/06/2010
dmi.bios.vendor: Dell Inc.
dmi.bios.version: W06
dmi.board.name: DOE3C2
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrW06:bd10/06/2010:svnDellInc.:pnLatitude2120:pvr:rvnDellInc.:rnDOE3C2:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude 2120
dmi.sys.vendor: Dell Inc.

Revision history for this message
Jeff Lane  (bladernr) wrote :
tags: added: blocks-hwcert
Ara Pulido (ara)
Changed in linux (Ubuntu):
assignee: nobody → Chris Van Hoof (vanhoof)
importance: Undecided → Medium
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris Van Hoof (vanhoof) wrote :

Keng-yu this one seems to be similar to Bug #823615

Changed in linux (Ubuntu):
assignee: Chris Van Hoof (vanhoof) → Keng-Yü Lin (lexical)
Revision history for this message
Keng-Yu Lin (lexical) wrote :

No the same model in hand atm. I tried Latitude 2110 it has the same bug too.

affects: bluez → bluez (Ubuntu)
Changed in bluez (Ubuntu):
status: New → Confirmed
Keng-Yu Lin (lexical)
Changed in bluez (Ubuntu):
importance: Undecided → Medium
Keng-Yu Lin (lexical)
Changed in gnome-bluetooth (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Keng-Yu Lin (lexical) wrote :

You can disable and then enable it again. This brings the bluetooth back.

I think the bug is different than what I saw before.

After the resume, the command `hcitool scan` can find the remote discoverable bluetooth devices, which means kernel is working well.

Besides this, after stopping the bluetoothd by `sudo service bluetooth stop`, the applet is not gray.

This is more likely a bug in bluez and/or gnome-bluetooth.

Changed in bluez (Ubuntu):
assignee: nobody → Keng-Yü Lin (lexical)
status: Confirmed → In Progress
Revision history for this message
Keng-Yu Lin (lexical) wrote :

the debugging result is much as bug 824144. When there is a breakpoint in src/manager.c:manager_find_adapter_by_id, bluetooth works good after resume. (needs several continues in gdb)

Revision history for this message
Keng-Yu Lin (lexical) wrote :

Bug 822705 is reported for the bug that bluetooth-applet is not greyed out even if the bluetooth hardware is disabled.

Revision history for this message
Keng-Yu Lin (lexical) wrote :

bluetoothd start log:

bluetoothd[1924]: src/rfkill.c:rfkill_event() RFKILL event idx 0 type 1 op 0 soft 0 hard 0
bluetoothd[1924]: src/rfkill.c:rfkill_event() RFKILL event idx 1 type 2 op 0 soft 0 hard 0
bluetoothd[1924]: src/rfkill.c:rfkill_event() RFKILL event idx 2 type 2 op 0 soft 0 hard 0
bluetoothd[1924]: src/rfkill.c:rfkill_event() RFKILL event idx 3 type 1 op 0 soft 0 hard 0
bluetoothd[1924]: plugins/hciops.c:init_known_adapters()
bluetoothd[1924]: plugins/hciops.c:init_device() hci0
bluetoothd[1924]: Listening for HCI events on hci0
bluetoothd[1924]: plugins/hciops.c:init_device() child 1925 forked
bluetoothd[1924]: plugins/hciops.c:read_local_features_complete() Got features for hci0
bluetoothd[1924]: plugins/hciops.c:read_local_version_complete() Got version for hci0
bluetoothd[1924]: plugins/hciops.c:read_bd_addr_complete() hci0 status 0
bluetoothd[1924]: plugins/hciops.c:read_bd_addr_complete() Got bdaddr for hci0
bluetoothd[1924]: plugins/hciops.c:read_local_name_complete() hci0 status 0
bluetoothd[1924]: plugins/hciops.c:read_local_name_complete() Got name for hci0
bluetoothd[1924]: plugins/hciops.c:read_tx_power_complete() hci0 status 0
bluetoothd[1924]: plugins/hciops.c:update_ext_inquiry_response() hci0
bluetoothd[1924]: plugins/hciops.c:child_exit() child 1925 exited
bluetoothd[1924]: HCI dev 0 up
bluetoothd[1924]: plugins/hciops.c:device_devup_setup() hci0
  manager_find_adapter_by_id 352 0
bluetoothd[1924]: src/adapter.c:btd_adapter_ref() 0x20f6fea8: ref=1
bluetoothd[1924]: plugins/hciops.c:hciops_read_bdaddr() hci0
bluetoothd[1924]: src/sdpd-database.c:sdp_init_services_list()
bluetoothd[1924]: plugins/hciops.c:hciops_add_uuid() hci0
bluetoothd[1924]: plugins/hciops.c:update_service_classes() hci0 value 0
bluetoothd[1924]: plugins/hciops.c:hciops_add_uuid() hci0
bluetoothd[1924]: plugins/hciops.c:update_service_classes() hci0 value 0
bluetoothd[1924]: plugins/service.c:register_interface() path /org/bluez/1924/hci0
bluetoothd[1924]: plugins/service.c:register_interface() Registered interface org.bluez.Service on path /org/bluez/1924/hci0

Revision history for this message
Keng-Yu Lin (lexical) wrote :
Download full text (4.4 KiB)

suspend/resume log:

bluetoothd[1924]: HCI dev 0 down
  manager_find_adapter_by_id 352 0
bluetoothd[1924]: plugins/hciops.c:hciops_stop_discovery() index 0
bluetoothd[1924]: audio/manager.c:state_changed() /org/bluez/1924/hci0 powered off
bluetoothd[1924]: audio/telephony.c:telephony_exit()
bluetoothd[1924]: audio/headset.c:telephony_deinit() Telephony deinitialized
bluetoothd[1924]: Adapter /org/bluez/1924/hci0 has been disabled
bluetoothd[1924]: src/adapter.c:set_mode_complete()
bluetoothd[1924]: src/rfkill.c:rfkill_event() RFKILL event idx 0 type 1 op 2 soft 0 hard 0
bluetoothd[1924]: HCI dev 0 unregistered
bluetoothd[1924]: Stopping hci0 event socket
  manager_find_adapter_by_id 352 0
bluetoothd[1924]: Unregister path: /org/bluez/1924/hci0
  manager_set_default_adapter 254 id=-1
  manager_find_adapter_by_id 352 -1
bluetoothd[1924]: src/adapter.c:adapter_remove() Removing adapter /org/bluez/1924/hci0
bluetoothd[1924]: src/device.c:device_remove() Removing device /org/bluez/1924/hci0/dev_DC_2C_26_BD_0D_FD
bluetoothd[1924]: input/manager.c:input_remove() path /org/bluez/1924/hci0/dev_DC_2C_26_BD_0D_FD
bluetoothd[1924]: input/device.c:device_unregister() Unregistered interface org.bluez.Input on path /org/bluez/1924/hci0/dev_DC_2C_26_BD_0D_FD
bluetoothd[1924]: src/device.c:btd_device_unref() 0x20f73ad0: ref=1
bluetoothd[1924]: src/device.c:btd_device_unref() 0x20f73ad0: ref=0
bluetoothd[1924]: src/device.c:device_free() 0x20f73ad0
bluetoothd[1924]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10005
bluetoothd[1924]: audio/manager.c:avrcp_server_remove() path /org/bluez/1924/hci0
bluetoothd[1924]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10004
bluetoothd[1924]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10003
bluetoothd[1924]: audio/manager.c:audio_adapter_unref() 0x20f70360: ref=2
bluetoothd[1924]: audio/manager.c:a2dp_server_remove() path /org/bluez/1924/hci0
bluetoothd[1924]: audio/avdtp.c:avdtp_unregister_sep() SEP 0x20f71248 unregistered: type:0 codec:0 seid:1
bluetoothd[1924]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10002
bluetoothd[1924]: audio/manager.c:audio_adapter_unref() 0x20f70360: ref=1
bluetoothd[1924]: audio/manager.c:headset_server_remove() path /org/bluez/1924/hci0
bluetoothd[1924]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10000
bluetoothd[1924]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10001
bluetoothd[1924]: audio/manager.c:audio_adapter_unref() 0x20f70360: ref=0
bluetoothd[1924]: src/adapter.c:btd_adapter_unref() 0x20f6fea8: ref=5
bluetoothd[1924]: src/adapter.c:btd_adapter_unref() 0x20f6fea8: ref=4
bluetoothd[1924]: serial/manager.c:proxy_remove() path /org/bluez/1924/hci0
bluetoothd[1924]: src/adapter.c:btd_adapter_unref() 0x20f6fea8: ref=3
bluetoothd[1924]: network/manager.c:network_server_remove() path /org/bluez/1924/hci0
bluetoothd[1924]: network/server.c:path_unregister() Unregistered interface org.bluez.NetworkServer on path /org/bluez/1924/hci0
bluetoothd[1924]: src/adapter.c:btd_adapter_unref() 0x20f6fea8:...

Read more...

Revision history for this message
Keng-Yu Lin (lexical) wrote :

comment #5 is a false positive case. The breakpoint prevents the bluetooth from suspending. So the bluetoothd is not really in the sleep in that case.

Revision history for this message
Keng-Yu Lin (lexical) wrote :

Somewhat, in the resume stage, bluez has trouble to initialise the bluetooth adapter.

I put modified bluez package (version 4.96-0ubuntu5~kengyu2) in my ppa (https://launchpad.net/~lexical/+archive/bluez/) for test.

It contains a workaround/patch to force the initialisation. And it makes the bluetooth works on my Latitude 2110 (the only similar Dell I can approach) after the resume.

But it would be a better idea to take more effort inspecting the real cause.

Revision history for this message
Keng-Yu Lin (lexical) wrote :

More testing for triaging the bug:

  Installed the 3.1-rc4 mainline kernel on Oneiric, the bug is seen.
  Installed the bluez 4.96 (the one in Oneiric) on Natty-installed machines, the bug is bought there. The bluetooth works good with the old bluez in Natty.

Changed in linux (Ubuntu):
status: Confirmed → Invalid
Keng-Yu Lin (lexical)
Changed in linux (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Keng-Yu Lin (lexical) wrote :

Can one having the machine test the bluez (4.96-0ubuntu5~kengyu2 ) from https://launchpad.net/~lexical/+archive/bluez/ ?

Changed in gnome-bluetooth (Ubuntu):
status: Confirmed → Invalid
Changed in linux (Ubuntu):
assignee: Keng-Yü Lin (lexical) → nobody
Changed in bluez (Ubuntu):
status: In Progress → Incomplete
Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.0.0-11.18)

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel currently in the release pocket than the one you tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

Thank you for your help.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.0.0-11.18
Revision history for this message
Ayan George (ayan) wrote :

Tested on a Dell 2120 -- the bluetooth stack survives 10 suspend/resume cycles.

Revision history for this message
Keng-Yu Lin (lexical) wrote :

The patch is confirmed to fix the issue. I also test on other machines in hands without the issue and it does not cause any malfunction.

Please consider include the attached patch for Oneiric. A binary package is also available in my ppa (https://launchpad.net/~lexical/+archive/bluez)

The issue is block the certification of this bug and bug 824144.

Keng-Yu Lin (lexical)
Changed in bluez (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Keng-Yu Lin (lexical) wrote :

Re-sent the patch as an RFC form upstream.

Changed in bluez (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Keng-Yu Lin (lexical) wrote :

I would like to nominate the patch as an SRU for Oneric atm:

Impact:
  The bluetooth does not work after resume. The test is a standard step and performed in Canonical's OEM QA and Certification process. So it will cause much troublesome.

Development Fix:
  Oneiric is still under the development until the release in hours.

Stable Fix:
  init_adapter() is not called due to missing HCI commands of read_bd_addr, read_local_version, read_local_features, and read_local_name on some machines. The patch forces init_adapter() to be called in the resume code path.

Test case:
  The patch is tested and confirmed to fix for Dell Latitude 2120 and EeePC 1001 PXD (bug 824144)

Regression Potential:
  I also installed and tested the patched bluez package on Thinkpad X200 and X220. Both does not have the issue. The bluez works well on those machines too.

Revision history for this message
Keng-Yu Lin (lexical) wrote :

sponsoring needed.

Revision history for this message
Martin Pitt (pitti) wrote :

Keng-Yü Lin, is there an upstream bug for this patch?

Revision history for this message
Martin Pitt (pitti) wrote :

For the record, this doesn't affect a ThinkPad X201, but I can replicate it on a Dell Mini 10v, so I can also test this there.

I sponsored the patch now, needs ubuntu-sru review now.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Jeff, or anyone else affected,

Accepted bluez into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in bluez (Ubuntu Oneiric):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Graham Hawkins (grahamhawkins) wrote :

My Acer Aspire One & 050d:016a Belkin Components Bluetooth Mini Dongle were afflicted by this bug.
I've updated the bluetooth packages from proposed, and the problem is no longer evident.

Revision history for this message
MNLipp (mnl) wrote :

I can confirm that the package "bluez" from oneiric-proposed fixes the problem on a HP 6730b as well. Thanks a lot!

Revision history for this message
Martin Pitt (pitti) wrote :

With the bluez package in -proposed:

 * bluetooth still works properly on my Thinkpad X201 (worked before as well)
 * on my Dell Mini 10 I got this bug, and it's fixed with the proposed update.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bluez - 4.96-0ubuntu4

---------------
bluez (4.96-0ubuntu4) oneiric-proposed; urgency=low

  * Drop 04-Fix-bluetooth-hid2hci.rules.patch,
    05-Fix-typo-from-deamon-to-daemon.patch: They are upstream and not applied
    in series.
  * Add 04-Fix-disabled-after-resume.patch: Fix disabled bluetooth after
    resuming. Thanks to Keng-Yü Lin for the patch! (LP: #823467)
 -- Martin Pitt <email address hidden> Thu, 13 Oct 2011 08:19:11 +0200

Changed in bluez (Ubuntu):
status: In Progress → Fix Released
Changed in bluez (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu):
status: Incomplete → Invalid
Changed in linux (Ubuntu Oneiric):
status: Incomplete → Invalid
Revision history for this message
Jacques (jacques-eavr) wrote :

Hi,

I have OO 64 bits on a EEEPC 1015PX with the latest updates (bluez 4.96-0ubuntu4) and i still have this bug.

My workaround is to add this file in /etc/pm/sleep.d/ :

cat 99_bluetooth_WA

#!/bin/sh

# Action script that restarts BT on EEE PC
# platform to work around a bug
#
# Copyright: Copyright (c) 2009 Michael Vogt
# License: GPL-2
#

PATH=/sbin:/usr/sbin:/bin:/usr/bin

case "${1}" in
        hibernate)
          # nothing
                ;;
        resume|thaw)
  /etc/init.d/bluetooth restart
                ;;
esac

Changed in bluez (Debian):
status: Unknown → New
Changed in fedora:
importance: Unknown → Undecided
status: Unknown → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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