linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 200039] BT advertising packet wakes up the system from S3 and suspend-to-idle
Date: Sat, 27 Oct 2018 19:22:23 +0000	[thread overview]
Message-ID: <bug-200039-62941-RpWioEaUVH@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-200039-62941@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=200039

--- Comment #25 from Raghuram Hegde (raghuram.hegde@intel.com) ---
(In reply to AceLan Kao from comment #24)
> Setup 'HCI_AUTO_CONN_ALWAYS' flag and "Accept all advertisement" do not mean
> the advertising packet should wake up the system. We even powered off the
> paired device, but the system still be waken up by advertising packets from
> other random BT4 devices.
> 
> I got some questions for you and would like to figure out a feasible
> solution for the issue.
> 1. Do you have any idea about who decide to wake up the system when the
> advertising packet is received? Firmware or driver?
> 2. Do you know how windows handle this? Does the advertising packet wake up
> windows?
> 3. Is there any drawback if we remove 'HCI_AUTO_CONN_ALWAYS' flag when
> suspending?
> Thanks.


Quoting the below paragraph under section Suspend-to-Idle from Kernel
documentation (Documentation/admin-guide/pm/sleep-states.rst)
"The system is woken up from this state by in-band interrupts, so theoretically
any devices that can cause interrupts to be generated in the working state can
also be set up as wakeup devices for S2Idle."

The wakeup interrupts for the system in sleep state can be either enabled or
disabled in /proc/acpi/wakeup file.  
I suppose, the USB hub to which the BT controller is attached has the 'Status'
column set to 'enabled' for S-state S3.

Now, when an Advertisement packet is received by the BT controller during
active/passive scan, the Advertisement Report Event is sent to the Host via HCI
interface (USB transport layer). This HCI event is sent as a packet on the USB
bus. Now, the USB bus wakes up the system (remote-wakeup) from suspend.

You can give the following a try and check if the advertisement reports are
waking up the system from suspend:
Disable the interrupt source(device) in /proc/acpi/wakeup
Eg: If BT controller is attached to EHC2;  
echo EHC2 > /proc/acpi/wakeup [This will toggle the 'Status' column from
enabled <-> disabled]

-- 
You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2018-10-27 19:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-200039-62941@https.bugzilla.kernel.org/>
2018-10-08  7:19 ` [Bug 200039] BT advertising packet wakes up the system from S3 and suspend-to-idle bugzilla-daemon
2018-10-08  7:21 ` bugzilla-daemon
2018-10-08  7:31 ` bugzilla-daemon
2018-10-09 10:53 ` bugzilla-daemon
2018-10-15  7:07 ` bugzilla-daemon
2018-10-15  8:43 ` bugzilla-daemon
2018-10-15 10:53 ` bugzilla-daemon
2018-10-15 11:25 ` bugzilla-daemon
2018-10-16  1:26 ` bugzilla-daemon
2018-10-16  6:28 ` bugzilla-daemon
2018-10-17  5:27 ` bugzilla-daemon
2018-10-27 19:22 ` bugzilla-daemon [this message]
2018-10-29  3:14 ` bugzilla-daemon
2018-11-16 15:17 ` bugzilla-daemon
2018-11-16 15:27 ` bugzilla-daemon
2019-02-27 15:22 ` bugzilla-daemon
2019-03-19  9:35 ` bugzilla-daemon
2019-03-19  9:43 ` bugzilla-daemon
2019-03-19  9:45 ` bugzilla-daemon
2019-09-11  8:29 ` bugzilla-daemon
2019-09-11 11:24 ` bugzilla-daemon
2019-09-11 16:05 ` bugzilla-daemon
2019-09-11 16:18 ` bugzilla-daemon
2019-09-19 14:45 ` bugzilla-daemon
2022-05-14 22:33 ` bugzilla-daemon
2022-05-14 23:42 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-200039-62941-RpWioEaUVH@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).