Thread (1 message) 1 message, 1 author, 2018-10-27

[Bug 200039] BT advertising packet wakes up the system from S3 and suspend-to-idle

From: <hidden>
Date: 2018-10-27 19:22:26

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help