Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp541035rdf; Tue, 21 Nov 2023 09:13:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJMzByidPS3PxwYbNupLe9/XPi2tpDcKyE08J1tVyg4sHesjIHZFUSWyob3RBtHiSpMg87 X-Received: by 2002:a05:6a00:4c81:b0:6bb:aaf:d7db with SMTP id eb1-20020a056a004c8100b006bb0aafd7dbmr14268607pfb.29.1700586809596; Tue, 21 Nov 2023 09:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700586809; cv=none; d=google.com; s=arc-20160816; b=fdUTiNEjs7tQTV7zy3emKHWAy6bPC/EeSHKrIsiHrn8Qggsuvt0+4uvW/TGU0XRt6q CvF7FZIJ9T8jLMDAJ4yTEb2l7/DVTyC4GcM334aH9OECZNFHsCMbTyR9hOdNwvddiVas ZseXIRHuXDqPNiGlaGb+YX4ZG4IEcIa8A2QHZpLGNQeoD/SWSB4eW8+hTuRQvBZ/RyFU ayZKM9eSFNIkjVkkXqB8Wp++wf6F9zjDq8jwVZdnoDJwcYuOfdCWcfQpFPLqlHKeIKRh Ol7GjHnl+AuZi7sdt3VaJ97Diz5GHI/FPrkf1e0QxJXkTDD9G6wPnFiKMwpv1aGzRruP SJQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=ANvcRSrh1tCwQUVVC14mNjUW7gD/+4v3fliB4nIZmbw=; fh=IIkvePnr/SdeI+8Rmy1KfEcz+OCAsBa4F2/eew7I+4s=; b=vxwbk1T6XKH8jD61gaoirGa++Y+754BrXn9liBr8VsBjCKlcuFLhUVj4asAqzbbbjj xNqHbkcG5PJST95kKGrtijxlDWaa6doI5vGsm13SHtjYcSnbEPWre3/hOdr7udkepXa0 LNJX6xU+yCYNUR25wHhHv733VS+AGdIC+r7jx/8vns/H0qbwdvoNSHbLY2VmYI2gMwSO 2qGdvXxQv7aJXPLUXGQwlvFhCrcgEoGagQNNE59LS69gosVnnatzMKlVQ/QL4R+cW6ix jMjitMYi2tqZXG08wKcHimrYYBWqdhwj+MTyokvu5TALqCC7cAvpwCVzCk8Ga3zyEe1e z29w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-151-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-151-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l10-20020a6542ca000000b0057755b2f032si10886404pgp.542.2023.11.21.09.13.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 09:13:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-151-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-151-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-151-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C7567B21B25 for ; Tue, 21 Nov 2023 17:13:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06BCD5A0F2; Tue, 21 Nov 2023 17:13:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none X-Original-To: linux-bluetooth@vger.kernel.org Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B4ACD4B; Tue, 21 Nov 2023 09:12:59 -0800 (PST) Received: from [10.0.3.168] (unknown [93.240.169.83]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id AEB2561E5FE01; Tue, 21 Nov 2023 18:12:33 +0100 (CET) Message-ID: Date: Tue, 21 Nov 2023 18:12:30 +0100 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Qualcomm Atheros QCA61x4 keeps drawing 0.85 W despite Bluetooth being disable in GNOME To: Alan Stern Cc: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-pm@vger.kernel.org, Hans de Goede , Mike Jones , Rocky Liao References: <22494842-a785-4151-915d-6f3a677d96cb@molgen.mpg.de> <1f3cb0cc-4bb0-471f-a785-a5d237cd46a3@rowland.harvard.edu> <41253614-764e-4e95-b052-a46bf5587c29@rowland.harvard.edu> <3489df64-0f8f-43e1-a05f-ccb145ff6d59@molgen.mpg.de> Content-Language: en-US From: Paul Menzel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Dear Alan, Thank you for your reply. Am 21.11.23 um 17:23 schrieb Alan Stern: > On Mon, Nov 20, 2023 at 11:05:04PM +0100, Paul Menzel wrote: >> [Cc: +Rocky Liao as Qualcomm developer] > >> Am 20.11.23 um 19:10 schrieb Alan Stern: >>> Again, nothing out of the ordinary. Maybe dynamic debugging will give >>> us a clue. Try doing this: >>> >>> Unload the btusb module. >>> >>> echo module usbcore +p >/sys/kernel/debug/dynamic_debug/control >>> >>> Load the btusb module >>> >>> Make sure that Bluetooth is turned off in Gnome >>> >>> Wait a few seconds >>> >>> echo module usbcore -p >/sys/kernel/debug/dynamic_debug/control >>> >>> Then let's see what the dmesg log contains for that time period. >> >> ``` >> $ sudo modprobe -r btusb >> $ sudo dmesg | tail -1 >> [340309.272439] usbcore: deregistering interface driver btusb >> $ echo module usbcore +p | sudo tee /sys/kernel/debug/dynamic_debug/control >> module usbcore +p >> $ sudo modprobe btusb >> $ /sbin/rfkill >> ID TYPE DEVICE SOFT HARD >> 1 wlan phy0 unblocked unblocked >> 36 bluetooth hci0 blocked unblocked >> $ echo module usbcore -p | sudo tee /sys/kernel/debug/dynamic_debug/control >> module usbcore -p >> $ sudo modprobe -r btusb >> $ sudo dmesg | tail -1 >> [340608.761313] usbcore: deregistering interface driver btusb >> $ sudo dmesg >> […] >> [340309.272439] usbcore: deregistering interface driver btusb >> [340560.326182] xhci_hcd 0000:00:14.0: hcd_pci_runtime_resume: 0 >> [340560.326214] usb usb1: usb auto-resume >> [340560.326258] hub 1-0:1.0: hub_resume >> [340560.326381] usb usb1-port3: status 0107 change 0000 >> [340560.326418] usb usb1-port4: status 0107 change 0000 >> [340560.326451] usb usb1-port5: status 0507 change 0000 >> [340560.326650] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0000 >> [340560.326807] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0000 >> [340560.373988] usb 1-3: usb auto-resume >> [340560.373998] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0008 >> [340560.441936] usb 1-3: Waited 0ms for CONNECT >> [340560.441957] usb 1-3: finish reset-resume >> [340560.570940] usb 1-3: reset full-speed USB device number 2 using xhci_hcd > > Those two lines are unexpected. Why does the device need to be reset? > While the btusb module is loaded, does anything show up in > /sys/bus/usb/devices/1-3/quirks? $ more /sys/bus/usb/devices/1-3/quirks 0x2 >>> Also, please post the output from "lsusb -v" for the Bluetooth device. >> >> ``` >> $ sudo lsusb -d 0cf3:e300 -v >> >> Bus 001 Device 002: ID 0cf3:e300 Qualcomm Atheros Communications QCA61x4 >> Bluetooth 4.0 >> Device Descriptor: >> bLength 18 >> bDescriptorType 1 >> bcdUSB 2.01 >> bDeviceClass 224 Wireless >> bDeviceSubClass 1 Radio Frequency >> bDeviceProtocol 1 Bluetooth >> bMaxPacketSize0 64 >> idVendor 0x0cf3 Qualcomm Atheros Communications >> idProduct 0xe300 QCA61x4 Bluetooth 4.0 >> bcdDevice 0.01 >> iManufacturer 0 >> iProduct 0 >> iSerial 0 >> bNumConfigurations 1 >> Configuration Descriptor: >> bLength 9 >> bDescriptorType 2 >> wTotalLength 0x00b1 >> bNumInterfaces 2 >> bConfigurationValue 1 >> iConfiguration 0 >> bmAttributes 0xe0 >> Self Powered >> Remote Wakeup > > That's what I was interested in. The device does support remote wakeup. That would make sense so it can be resumed? (It does not necessarily mean something like Wake-On-LAN, right? Also, for this device it’s disabled? $ grep . /sys/bus/usb/devices/1-3/power/wakeup disabled >> PPS: Looking through the commit log/history for `drivers/bluetooth/btusb.c`, >> I found commit 7ecacafc2406 (Bluetooth: btusb: Disable runtime suspend on >> Realtek devices) [1] authored on December 5th, 2019. This is for Realtek >> devices though, and not Qualcomm. > > Furthermore the driver has changed considerably since 2019. See > commits 8274db0776d1, 895915226a59, 7bd9fb058d77, and 34ec58b9fd1c. Thank you for the references. Kind regards, Paul