New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 843650 link

Starred by 7 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jul 9
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocked on:
issue 851097



Sign in to add a comment

Bluetooth turned off by ARC

Project Member Reported by sonnysasaka@chromium.org, May 16 2018

Issue description

From user feedback: http://listnr/product/208/report/85449531645?dateRange=All
From the logs it appears that ARC++ initiates Bluetooth power off.
Need to investigate the source of this unexpected event.
 
Cc: dmargolis@google.com
Hi Daniel,

Could you help answering some questions to help us diagnose the root cause:
1. Were you aware that this happened more frequently after updating Chrome OS? This info will help us guess whether there is recent regression.
2. Were you aware whether the issue happened more frequently when your Pixelbook is not connected to power charger?
3. Were you aware whether the issue reproduced more frequently after suspend/resume (e.g. closing the lid and opening it again at some later time)?
4. Do you install Android apps on the Pixelbook?
1. No, I can't speak to this one way or another. I just got the Pixelbook. 
2. No. I normally plug into a USBC hub on my desktop with power+peripherals+monitor, but I can't tell at what point bluetooth is turned off.
3. I think yes. I have not seen this happen while I was using the device. 
4. Yes. 
Thanks, Daniel. I have found the root cause and will deliver the fix to stable channel.
Project Member

Comment 5 by bugdroid1@chromium.org, May 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d680078aa1a35778a523c23f2ea9a6d5243ac9cb

commit d680078aa1a35778a523c23f2ea9a6d5243ac9cb
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed May 16 22:29:34 2018

arc_bluetooth_bridge: Increase Android power intent timeout

Android takes 3-4 seconds to fulfill power state change, so the timeout
of 5 seconds is too close that the probability of the timeout hit is
high enough to happen to users. As a result, users often encounter
Bluetooth turned off by itself. This CL changes the timeout to 8 seconds
to provide safer buffer, if there is no response from Android after 8
seconds it is considered as lost (will never respond).

Future larger work is needed to avoid relying on timeout to make it more
robust, but at this moment we need a low-risk solution to be merged to
stable channel.

BUG= 843650 

Change-Id: I9aded127e3eb510ff58b1167900bda9546226aa5
Reviewed-on: https://chromium-review.googlesource.com/1062773
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Luis Hector Chavez <lhchavez@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559315}
[modify] https://crrev.com/d680078aa1a35778a523c23f2ea9a6d5243ac9cb/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.cc

Labels: Merge-Request-66
Labels: Merge-Approved-67
Labels: -Merge-Approved-67 Merge-Request-67
Project Member

Comment 9 by sheriffbot@chromium.org, May 16 2018

Labels: -Merge-Request-67 Merge-Review-67 Hotlist-Merge-Review
This bug requires manual review: We are only 12 days from stable.
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: pbath...@chromium.org
pbathini@ has done testing comparing before and after the fix. Unfortunately we couldn't even repro the bug with before the fix. But after the fix it didn't make it worse, so we have seen that the fix is safe.
More details about the fix:
According to the logs of several reporting users, the bug was caused by Chrome's timeout of 5 seconds to wait for Android response about Bluetooth power toggle event. In some rare cases, Android takes more than (but still close to) 5 seconds to respond to a power toggle event. So the safe fix for M67 is by increasing the timeout to 8 seconds, which statistically should provide confidence that the bug will happen very unlikely.
Since the "slow Android response" is very rare, repro attempt is very difficult. So rather than testing whether the large timeout fixes the bug, our test was to reduce the timeout and it was proven that reducing the timeout increases the likelihood that the bug happens. Therefore increasing the timeout is a safe fix.

Future larger work is needed to not rely on timeout, but for short-term fix the timeout increase is the practical one.

Hi, the feedback was reported for M66 so this isn't a M67 regression.  Is it impacting enough to be considered a P1?
It's not a direct regression. The problem happened more frequently recently because somehow Android side is getting slower overtime at responding to Bluetooth power toggle. So M67 has more probability of hitting this bug than M66. Recently there have been more reports about Bluetooth turned off by itself:
https://listnr.corp.google.com/product/208/reports?searchText=bluetooth%20turn%20off&filter=0&dateRange=All
Thanks.. I assume testing with an extended timeout (similar to the shorter one in #12) didn't result in unexpected results?
No, testing with an extended timeout didn't produce any different (or any unexpected) result.
Labels: -Merge-Request-66 Merge-Approved-67
Approving merge to M67 Chrome OS.
Project Member

Comment 18 by bugdroid1@chromium.org, May 29 2018

Labels: -merge-approved-67 merge-merged-3396
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/76433dfaab8634f5122e4ae28a0d8cd0eec70d4c

commit 76433dfaab8634f5122e4ae28a0d8cd0eec70d4c
Author: Miao-chen Chou <mcchou@chromium.org>
Date: Tue May 29 19:31:08 2018

arc_bluetooth_bridge: Increase Android power intent timeout

Android takes 3-4 seconds to fulfill power state change, so the timeout
of 5 seconds is too close that the probability of the timeout hit is
high enough to happen to users. As a result, users often encounter
Bluetooth turned off by itself. This CL changes the timeout to 8 seconds
to provide safer buffer, if there is no response from Android after 8
seconds it is considered as lost (will never respond).

Future larger work is needed to avoid relying on timeout to make it more
robust, but at this moment we need a low-risk solution to be merged to
stable channel.

BUG= 843650 
TBR=sonnysasaka@chromium.org

(cherry picked from commit d680078aa1a35778a523c23f2ea9a6d5243ac9cb)

Change-Id: I9aded127e3eb510ff58b1167900bda9546226aa5
Reviewed-on: https://chromium-review.googlesource.com/1062773
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Luis Hector Chavez <lhchavez@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#559315}
Reviewed-on: https://chromium-review.googlesource.com/1077076
Cr-Commit-Position: refs/branch-heads/3396@{#713}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
[modify] https://crrev.com/76433dfaab8634f5122e4ae28a0d8cd0eec70d4c/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.cc

Cc: qiyuh@chromium.org
Labels: -Merge-Review-67 Merge-Review-66
Fixing merge labels from #17
Project Member

Comment 21 by bugdroid1@chromium.org, May 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3ae77b818de998ef0c644f3ccb52b58af7bd9aab

commit 3ae77b818de998ef0c644f3ccb52b58af7bd9aab
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed May 30 17:40:05 2018

arc_bluetooth_bridge: Add logging for bluetooth turn on/off

Added more logs to investigate Bluetooth turned off by itself bug. This
will be useful to know the timings of the events to and from Android.

BUG= 843650 

Change-Id: Ie2d7a42d6a1b10c2f2ab579b94f652b39fcb4782
Reviewed-on: https://chromium-review.googlesource.com/1077756
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Luis Hector Chavez <lhchavez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562896}
[modify] https://crrev.com/3ae77b818de998ef0c644f3ccb52b58af7bd9aab/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.cc

Blockedon: 851097
Project Member

Comment 23 by bugdroid1@chromium.org, Jun 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/90237eeebcc0d1d45a88532a96b4b4df28eca7be

commit 90237eeebcc0d1d45a88532a96b4b4df28eca7be
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Mon Jun 11 22:52:54 2018

arc_bluetooth_bridge: Ignore Bluetooth turn off request from Android

With the current architecture, there is no way to reliably tell whether
a request from Android to turn off Bluetooth comes from a user or from
Chrome OS. So it's proposed to ignore silently any request to turn off
Bluetooth from Android due to the following:
1. On Chrome OS, Android system settings for Bluetooth and Airplane Mode
   is disabled. So there is no way for user to turn off Bluetooth from
   Android system settings on Chrome OS.
2. The only applications that use Android API to turn off Bluetooth are
   power saving apps, which don't make sense on Chrome OS anyway.

Bug:  851097 ,  843650 
Change-Id: I82c0d745fbd5b11437c05d827e79296ebe5bec5e
Reviewed-on: https://chromium-review.googlesource.com/1093465
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Luis Hector Chavez <lhchavez@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566185}
[modify] https://crrev.com/90237eeebcc0d1d45a88532a96b4b4df28eca7be/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.cc

Project Member

Comment 24 by bugdroid1@chromium.org, Jun 13 2018

Labels: merge-merged-3440
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/929ea5ceaf59528e9028bb2eb4ecc074a9406041

commit 929ea5ceaf59528e9028bb2eb4ecc074a9406041
Author: Miao-chen Chou <mcchou@chromium.org>
Date: Wed Jun 13 20:41:45 2018

arc_bluetooth_bridge: Ignore Bluetooth turn off request from Android

With the current architecture, there is no way to reliably tell whether
a request from Android to turn off Bluetooth comes from a user or from
Chrome OS. So it's proposed to ignore silently any request to turn off
Bluetooth from Android due to the following:
1. On Chrome OS, Android system settings for Bluetooth and Airplane Mode
   is disabled. So there is no way for user to turn off Bluetooth from
   Android system settings on Chrome OS.
2. The only applications that use Android API to turn off Bluetooth are
   power saving apps, which don't make sense on Chrome OS anyway.

TBR=sonnysasaka@chromium.org

(cherry picked from commit 90237eeebcc0d1d45a88532a96b4b4df28eca7be)

Bug:  851097 ,  843650 
Change-Id: I82c0d745fbd5b11437c05d827e79296ebe5bec5e
Reviewed-on: https://chromium-review.googlesource.com/1093465
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Luis Hector Chavez <lhchavez@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#566185}
Reviewed-on: https://chromium-review.googlesource.com/1099769
Cr-Commit-Position: refs/branch-heads/3440@{#347}
Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733}
[modify] https://crrev.com/929ea5ceaf59528e9028bb2eb4ecc074a9406041/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.cc

Status: Fixed (was: Started)
Status: Verified (was: Fixed)

Sign in to add a comment