Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5923105ybh; Wed, 7 Aug 2019 13:53:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJYf7can1h5soa6aUeHmqY4mz3aCfbVKOWB1G2iPnF2SJc7l7KPifcbMI7eJV335qa7cWV X-Received: by 2002:a17:902:8490:: with SMTP id c16mr10223468plo.1.1565211196165; Wed, 07 Aug 2019 13:53:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565211196; cv=none; d=google.com; s=arc-20160816; b=n0kqTyeUzDmOKz+ucPscyMt1VF2YH+DHX6BeauHTsYnwIZuxOnGSRHqafN9AXiSZYp gVzvJljL4sRyY1wCQ8Cc+4sw2QzZL0jp/bO1ywBoesvPYi8zI3EO/iYeGPoGP9/m3ENh A+V1eyfIROGA95MeK3oiO+S+3cu2TH9bMLy2X0GHQHuvaZ/FEI5hrngFVh2PhYchiNYl XTcViX6IOUE6DscSa83u8saUR2aEUeQTJJLuUarM5v/mXXxg16WawtPwQnTs9SIhD5JJ 5iQo+yMj7lqBJ7ymAVFSnfw/2lu2Ee501joDqTO6t3VRa1B+zGpr/5oCjiBFjyBL+r9d 1N6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:to:from :dkim-signature; bh=yxC1wgo7gZD1B6ibqreylk1Z6555BwhCGlvkrfaF91c=; b=ha26FS+80N+xsyb39biU8+64k34jpI7Spl1fcgOVkHMvneseguU+YLNdTSdn2pal71 VsQH8XObvxs165D8KWGOusZT0aM5PSGzguxsXrTBnaRNdiUC6K4GX/ThP1/dqXWcuruX ujRYrBgXDewhMsGkwXQ75bx9781/6R8ow9433/WYCvLSQbfO4WQxBKgJDKckbfs6bsPj fHsBGiA/JHqhkUbs2GWd9f7ej5XPAsakx0KVtY447cun3VsRJzbVZ2DRVWph+GSuEZP1 ygdRvnRK+zcwKM29+Al1BbvD6ObhnXvns9Y0E0uNzLTmcvdpPrG8I5OYCu37lJPrvZb0 /t1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dell.com header.s=smtpout1 header.b=H3UdoIvG; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v1si43962247plb.381.2019.08.07.13.52.46; Wed, 07 Aug 2019 13:53:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@dell.com header.s=smtpout1 header.b=H3UdoIvG; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388400AbfHGUnV (ORCPT + 99 others); Wed, 7 Aug 2019 16:43:21 -0400 Received: from mx0a-00154904.pphosted.com ([148.163.133.20]:15766 "EHLO mx0a-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387953AbfHGUnV (ORCPT ); Wed, 7 Aug 2019 16:43:21 -0400 Received: from pps.filterd (m0170391.ppops.net [127.0.0.1]) by mx0a-00154904.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x77KFGCP004944 for ; Wed, 7 Aug 2019 16:43:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=smtpout1; bh=yxC1wgo7gZD1B6ibqreylk1Z6555BwhCGlvkrfaF91c=; b=H3UdoIvGqR8+KrCLy0dPv6Qg4H2ODWFo1r4q4uDiTQjqxMpMaf5fpWLpjAcjN+EgHAt3 ARBHffX6+DxJ6DE+PKU0T+CsUaKvymoWe4b+wy3pxI0UgOwRCRjq1PWFsYy7pccNM16T 8ENyD7jK4xmwCMH5Wpz4SL1CzU+ST807a36DVkLuvb+NLxoDcPFenj9zhJAe595imAh+ dMkoREpL0M8nVK/DzdurgKuMB62mOuOAP2ruOiZSMganDRav7g1nLWRKuCBYV/cFJhFJ WRAnliWyqD+L4wpdbn5aWiFjzyf5P5kprlYZ4eRkcoFAtwWPxXuG2sPFkWHWtpkh3FvB Rw== Received: from mx0b-00154901.pphosted.com (mx0b-00154901.pphosted.com [67.231.157.37]) by mx0a-00154904.pphosted.com with ESMTP id 2u7aqnq8mm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 07 Aug 2019 16:43:20 -0400 Received: from pps.filterd (m0144102.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x77KdABb036961 for ; Wed, 7 Aug 2019 16:43:19 -0400 Received: from ausxippc110.us.dell.com (AUSXIPPC110.us.dell.com [143.166.85.200]) by mx0b-00154901.pphosted.com with ESMTP id 2u833fau83-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Aug 2019 16:43:19 -0400 X-LoopCount0: from 10.166.132.129 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.60,349,1549951200"; d="scan'208";a="841198301" From: To: , Subject: RE: BT advertising packets and s2idle issue Thread-Topic: BT advertising packets and s2idle issue Thread-Index: AQHVRhqgVGNmeV2XRUeiYVQj/t6U86bwL+ZQ Date: Wed, 7 Aug 2019 20:43:17 +0000 Message-ID: References: <87sgqoewqv.fsf@kellner.me> In-Reply-To: <87sgqoewqv.fsf@kellner.me> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Enabled=True; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SiteId=945c199a-83a2-4e80-9f8c-5a91be5752dd; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Owner=Mario_Limonciello@Dell.com; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SetDate=2019-08-07T20:43:15.5083913Z; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Name=External Public; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Application=Microsoft Azure Information Protection; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Extended_MSFT_Method=Manual; aiplabel=External Public x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.18.86] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-07_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908070179 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908070179 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org > -----Original Message----- > From: Christian Kellner > Sent: Monday, July 29, 2019 9:33 AM > To: linux-bluetooth@vger.kernel.org > Cc: Limonciello, Mario > Subject: BT advertising packets and s2idle issue >=20 >=20 > [EXTERNAL EMAIL] >=20 >=20 > Hi all, >=20 > I have been wondering what to do about the bug that advertising packet > will wake systems from s2idle when a device was previously paired with > the HCI_AUTO_CONN_ALWAYS flag (kernel bug #200039[1]). I was thinking of > creating a patch for bluez that would create a "delay lock"[2] and > de-register any such device from the kernel before entering s2idle, but > I wanted to check first if that is the best approach. > In comment #27 it is suggested that using a "LE Privacy v1.2" feature > could fix the issue as well. Is there some more information about this > available somewhere? II can help out with development and testing as I > have an affected system myself. >=20 > Cheers, > CK >=20 > [1] https://bugzilla.kernel.org/show_bug.cgi?id=3D200039 > [2] https://www.freedesktop.org/wiki/Software/systemd/inhibit/ >=20 > -- > Dr. Christian J. Kellner > Desktop Hardware Enablement > Red Hat If I'm not mistaken, even unpaired LE devices can cause the wakeup. Any de= vice with an advertisement report will cause the wakeup. So de-registering all = devices from kernel before entering s2idle wouldn't solve the problem. My opinion is there should be a dedicated kernel freeze handler that does t= he following: 1) If LE Privacy 1.2 "in use", handle regular suspend/resume flow 2) If LE Privacy 1.1in use, power off the radio in freeze, power back on in= resume. For now, since LE privacy 1.2 not yet enabled, this would at least help wit= h this situation as reported. Of course this will mean BT devices can't wake the system anymore if s2i, s= o maybe the behavior should be put behind a module parameter or sysfs file. BLE devices are so prevalent though; I find it a hard time imagining anyone= wants it the way it exists today.