[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <de236c7d-e265-452a-a60e-b10293a5b944@molgen.mpg.de>
Date: Mon, 20 Nov 2023 08:52:19 +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>
Subject: Re: Qualcomm Atheros QCA61x4 keeps drawing 0.85 W despite Bluetooth
being disable in GNOME
Dear Alan,
Than you again for your quick reply.
Am 20.11.23 um 03:26 schrieb Alan Stern:
> On Sun, Nov 19, 2023 at 11:09:32PM +0100, Paul Menzel wrote:
>> $ sudo modprobe btusb
>
>> $ grep . /sys/bus/usb/devices/1-3/power/*
>> /sys/bus/usb/devices/1-3/power/active_duration:119053224
>> /sys/bus/usb/devices/1-3/power/async:enabled
>> /sys/bus/usb/devices/1-3/power/autosuspend:2
>> /sys/bus/usb/devices/1-3/power/autosuspend_delay_ms:2000
>> /sys/bus/usb/devices/1-3/power/connected_duration:148065372
>> /sys/bus/usb/devices/1-3/power/control:auto
>> /sys/bus/usb/devices/1-3/power/level:auto
>> /sys/bus/usb/devices/1-3/power/persist:1
>> /sys/bus/usb/devices/1-3/power/runtime_active_kids:0
>> /sys/bus/usb/devices/1-3/power/runtime_active_time:119060567
>> /sys/bus/usb/devices/1-3/power/runtime_enabled:enabled
>> /sys/bus/usb/devices/1-3/power/runtime_status:active
>> /sys/bus/usb/devices/1-3/power/runtime_suspended_time:28831453
>> /sys/bus/usb/devices/1-3/power/runtime_usage:0
>> /sys/bus/usb/devices/1-3/power/wakeup:disabled
>> ```
>
> Hmmm. It's not immediately clear why the device isn't being suspended.
> The btusb driver does support autosuspend.
>
> Can you also post the output from
>
> grep . /sys/bus/usb/devices/1-3:*/power/*
>
> with the driver module loaded? I should have asked for it before.
```
$ sudo modprobe btusb
$ sudo dmesg | tail -9
[319747.390712] r8152 4-1.2:1.0 enx18dbf22dccf3: carrier on
[320256.946094] bluetooth hci0: firmware: direct-loading firmware
qca/rampatch_usb_00000302.bin
[320256.949333] Bluetooth: hci0: using rampatch file:
qca/rampatch_usb_00000302.bin
[320256.949349] Bluetooth: hci0: QCA: patch rome 0x302 build 0x3e8,
firmware rome 0x302 build 0x111
[320256.949643] usbcore: registered new interface driver btusb
[320257.308935] bluetooth hci0: firmware: direct-loading firmware
qca/nvm_usb_00000302.bin
[320257.309043] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000302.bin
[320257.336220] Bluetooth: hci0: HCI Enhanced Setup Synchronous
Connection command is advertised, but not supported.
[320257.638188] Bluetooth: MGMT ver 1.22
$ /sbin/rfkill
ID TYPE DEVICE SOFT HARD
1 wlan phy0 blocked unblocked
28 bluetooth hci0 blocked unblocked
$ grep . /sys/bus/usb/devices/1-3:*/power/*
/sys/bus/usb/devices/1-3:1.0/power/async:enabled
/sys/bus/usb/devices/1-3:1.0/power/runtime_active_kids:0
/sys/bus/usb/devices/1-3:1.0/power/runtime_enabled:enabled
/sys/bus/usb/devices/1-3:1.0/power/runtime_status:suspended
/sys/bus/usb/devices/1-3:1.0/power/runtime_usage:0
/sys/bus/usb/devices/1-3:1.1/power/async:enabled
/sys/bus/usb/devices/1-3:1.1/power/runtime_active_kids:0
/sys/bus/usb/devices/1-3:1.1/power/runtime_enabled:enabled
/sys/bus/usb/devices/1-3:1.1/power/runtime_status:suspended
/sys/bus/usb/devices/1-3:1.1/power/runtime_usage:0
```
For completeness:
```
$ grep . /sys/bus/usb/devices/1-3/power/*
/sys/bus/usb/devices/1-3/power/active_duration:120462288
/sys/bus/usb/devices/1-3/power/async:enabled
/sys/bus/usb/devices/1-3/power/autosuspend:2
/sys/bus/usb/devices/1-3/power/autosuspend_delay_ms:2000
/sys/bus/usb/devices/1-3/power/connected_duration:155617216
/sys/bus/usb/devices/1-3/power/control:auto
/sys/bus/usb/devices/1-3/power/level:auto
/sys/bus/usb/devices/1-3/power/persist:1
/sys/bus/usb/devices/1-3/power/runtime_active_kids:0
/sys/bus/usb/devices/1-3/power/runtime_active_time:120468920
/sys/bus/usb/devices/1-3/power/runtime_enabled:enabled
/sys/bus/usb/devices/1-3/power/runtime_status:active
/sys/bus/usb/devices/1-3/power/runtime_suspended_time:34969407
/sys/bus/usb/devices/1-3/power/runtime_usage:0
/sys/bus/usb/devices/1-3/power/wakeup:disabled
```
>> ```
>> $ sudo modprobe -r btusb
>> $ sudo dmesg | tail -1
>> [314106.155163] usbcore: deregistering interface driver btusb
>> $ grep . /sys/bus/usb/devices/1-3/power/*
>> /sys/bus/usb/devices/1-3/power/active_duration:119072176
>> /sys/bus/usb/devices/1-3/power/async:enabled
>> /sys/bus/usb/devices/1-3/power/autosuspend:2
>> /sys/bus/usb/devices/1-3/power/autosuspend_delay_ms:2000
>> /sys/bus/usb/devices/1-3/power/connected_duration:148320980
>> /sys/bus/usb/devices/1-3/power/control:auto
>> /sys/bus/usb/devices/1-3/power/level:auto
>> /sys/bus/usb/devices/1-3/power/persist:1
>> /sys/bus/usb/devices/1-3/power/runtime_active_kids:0
>> /sys/bus/usb/devices/1-3/power/runtime_active_time:119079518
>> /sys/bus/usb/devices/1-3/power/runtime_enabled:enabled
>> /sys/bus/usb/devices/1-3/power/runtime_status:suspended
>> /sys/bus/usb/devices/1-3/power/runtime_suspended_time:29068110
>> /sys/bus/usb/devices/1-3/power/runtime_usage:0
>> /sys/bus/usb/devices/1-3/power/wakeup:disabled
>> ```
>
> Okay, and here we see that without the driver, the device does get
> suspended.
Indeed. Thank you for pointing at `runtime_status:suspended` compared to
`runtime_status:active`.
Kind regards,
Paul
Powered by blists - more mailing lists