lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d8fba4f9-f868-4ef3-938b-f202e5bcc4ad@molgen.mpg.de>
Date:   Tue, 21 Nov 2023 18:12:30 +0100
From:   Paul Menzel <pmenzel@...gen.mpg.de>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     Marcel Holtmann <marcel@...tmann.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        Luiz Augusto von Dentz <luiz.dentz@...il.com>,
        linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-pm@...r.kernel.org,
        Hans de Goede <hdegoede@...hat.com>,
        Mike Jones <mike@...nes.io>,
        Rocky Liao <quic_rjliao@...cinc.com>
Subject: Re: Qualcomm Atheros QCA61x4 keeps drawing 0.85 W despite Bluetooth
 being disable in GNOME

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ