Linux bluetooth development
 help / color / mirror / Atom feed
* Bug: bluetooth not working after suspend/resume
@ 2011-09-27  8:25 Keng-Yü Lin
  2011-09-27 13:52 ` etsang
  2011-10-13  1:35 ` [RFC] Bluez: Fix the adapter is not initialised after resume Keng-Yu Lin
  0 siblings, 2 replies; 7+ messages in thread
From: Keng-Yü Lin @ 2011-09-27  8:25 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]

Hi all:
  Since kernel.org/bugzilla is dead for a while, I sent the bug report
here in hope to get more insight.

  This is a long-lasting bug and happens across several distros with
different combinations of bluez/kernel verisions but shares much the
same symptom that bluetooth is not working after the resume. As seen
in the bug report below, it happens on a variety of different laptops
too.

  Redhat:
    https://bugzilla.redhat.com/show_bug.cgi?id=727106

  Debian:
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614929

  Ubuntu:
    https://launchpad.net/bugs/824144
    https://launchpad.net/bugs/824633
    https://launchpad.net/bugs/823467
    https://launchpad.net/bugs/822705

  Personally I did some investigation on the issue and found that
bluetoothd does not receive the HCI commands of read_bd_addr,
read_local_version, read_local_features, nor read_local_name. So in
bluez.plugins/hciops.c:device_devup_setup(), init_adapter() is not
called at resume.

  It can be further confirmed by the attached patch of bluez. It is
ugly but can work around the bug as reported in some of the bug
trackers above.

  I am looking for any advice to get it move on,  for the debugging
and the fixing.

  Thanks,
-kengyu

[-- Attachment #2: 06-Fix-disabled-after-resume.patch --]
[-- Type: text/x-patch, Size: 326 bytes --]

--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -2512,8 +2512,8 @@
 	hci_send_cmd(dev->sk, OGF_HOST_CTL, OCF_READ_STORED_LINK_KEY,
 					READ_STORED_LINK_KEY_CP_SIZE, &cp);
 
-	if (!dev->pending)
-		init_adapter(index);
+	DBG("dev->pending=%d", dev->pending);
+	init_adapter(index);
 }
 
 static void init_pending(int index)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-10-19 10:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27  8:25 Bug: bluetooth not working after suspend/resume Keng-Yü Lin
2011-09-27 13:52 ` etsang
2011-09-27 13:55   ` sunil.kumar5
2011-10-13  1:35 ` [RFC] Bluez: Fix the adapter is not initialised after resume Keng-Yu Lin
2011-10-13  7:35   ` Luiz Augusto von Dentz
2011-10-13 11:23     ` Luiz Augusto von Dentz
2011-10-19 10:30       ` Keng-Yü Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox