Skip to contentSkip to conversation

New: acer-wmi: WMID set_function_mode(devices=0xFFFF) powers off the Atheros AR3012 Bluetooth controller on Acer Extensa 2511G before ath3k can upload firmware

Bug 222323 [email protected] 1 participant 4 messages Nov 24 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=222323

            Bug ID: 222323
           Summary: acer-wmi: WMID set_function_mode(devices=0xFFFF)
                    powers off the Atheros AR3012 Bluetooth controller on
                    Acer Extensa 2511G before ath3k can upload firmware
           Product: Drivers
           Version: 2.5
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Platform_x86
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

Created attachment 311571
--> https://bugzilla.kernel.org/attachment.cgi?id=311571&action=edit
Before/after data set: dmesg from the broken boot (acer_wmi loaded - AR3012 disconnects right after "Function bitmap for Communication Button") and from the working boot (acer_wmi blacklisted - ath3k

luetooth controller on Acer Extensa 2511G before ath3k can upload firmware

Summary
-------
On Acer Extensa 2511G (board BA50_BH) loading acer_wmi removes the on-board Bluetooth USB device (Foxconn/Atheros AR3012, USB ID 0489:e095) from the USB bus
within 0.1-2 ms after the "Function bitmap for Communication Button" message. At that moment the controller is still in DFU/bootloader mode (bcdDevice 0.01, no USB strings) and ath3k has not been autoloaded yet, so the firmware is never uploaded and the machine ends up with no Bluetooth controller at all (/sys/class/bluetooth is empty, bluetoothctl list is empty, rfkill has no bluetooth entry). Blacklisting acer_wmi makes Bluetooth work.

Environment
-----------

Distribution:     Linux Mint 22.1 (Ubuntu 24.04 base)
Kernel:           6.8.0-151-generic (Ubuntu)
Machine:          Acer Extensa 2511G, BIOS V1.37 (02/16/2016)
DMI:
  sys_vendor        Acer
  product_name      Extensa 2511G
  product_version   V3.72
  board_name        BA50_BH
  board_vendor      Acer
  bios_version      V1.37
  bios_date         02/16/2016
Wi-Fi (same combo card): Qualcomm Atheros QCA9565/AR9565, PCI 168c:0036
Bluetooth:               USB 0489:e095 on xHCI 0000:00:14.0, port 5

bluez 5.72
linux-firmware 20240318.git3b128b60-0ubuntu3.5 (ar3k/AthrBT_0x*.dfu present) CONFIG_FW_LOADER_COMPRESS_ZSTD=y

Steps to reproduce
------------------
1. Boot the machine with acer_wmi autoloaded (default; the module matches the WMI GUIDs present in ACPI).
2. Observe the kernel log (dmesg):

   [    5.402775] usb 2-5: New USB device found, idVendor=0489, idProduct=e095,
bcdDevice= 0.01
   [    5.402791] usb 2-5: New USB device strings: Mfr=0, Product=0,
SerialNumber=0
   [   21.799726] acer_wmi: Acer Laptop ACPI-WMI Extras
   [   21.799794] acer_wmi: Function bitmap for Communication Button: 0x1
   [   21.856170] usb 2-5: USB disconnect, device number 2

3. Result: no HCI device. lsusb no longer shows 0489:e095, /sys/class/bluetooth is empty, "rfkill list" has only acer-wireless and phy0 (WLAN), and bluetooth.service is running fine. The Bluetooth controller stays absent for the whole uptime, no power cycle of the port brings it back.

Reproduced on every boot since at least 2026-10-28 (5 consecutive boots checked). Boot-to-boot delay between USB enumeration and the disconnect varies (9-16 s) but always ends immediately after acer_wmi initializes.

Causality (measured)
--------------------
journalctl -b <n> -k -o short-precise, four different boots:

  boot   acer_wmi: Function bitmap ...      usb 2-5: USB disconnect    delta
  -1     03:43:59.347386                    03:43:59.349530            2.1 ms
  -2     03:15:00.769601                    03:15:00.769759            0.16 ms
  -3     15:42:23.747630                    15:42:23.747710            0.08 ms
  -5     05:38:41.090665                    05:38:41.090854            0.19 ms

The printk is the last message of acer_wmi_init() before the driver starts talking to the EC, and the USB disconnect follows within milliseconds every single time.

Root cause analysis
-------------------
Relevant code: drivers/platform/x86/acer-wmi.c (v6.8)

1) dmi_walk(type_aa_dmi_decode) reads the OEM DMI type 0xAA structure and prints
the bitmap:

       pr_info("Function bitmap for Communication Button: 0x%x\n",
               type_aa->commun_func_bitmap);

On this machine the bitmap is 0x1, i.e. only ACER_WMID3_GDS_WIRELESS. ACER_CAP_BLUETOOTH is therefore not set, no "acer-bluetooth" rfkill is registered, and acer_wmi does not consider Bluetooth to exist at all. (Consequence: BlueZ has nothing to unblock, and the driver never restores the radio state.)

2) Because the WMI GUID 61EF69EA-865C-4BC3-A502-A0DEBA0CB531 (WMID_GUID3) is present in /sys/bus/wmi/devices, acer_wmi_init() sets ACER_CAP_SET_FUNCTION_MODE and calls acer_wmi_enable_rf_button(), then acer_wmi_enable_lm():

       struct func_input_params params = {
               .function_num   = 0x1,
               .commun_devices = 0xFFFF,
               .devices        = 0xFFFF,
               .app_status     = 0x10,
               .app_mask       = 0x10,
       };
       wmid3_set_function_mode(&params, &return_value);  /* GUID3 method 0x1 */

On this firmware/EC that ACPI call makes the EC cut power to the Bluetooth part of the AR9565 combo card: the USB device is disconnected immediately.

3) Race with the Bluetooth driver stack: the AR3012 enumerates in DFU mode (bcdDevice 0.01, empty strings) and needs ath3k to upload ar3k/AthrBT_0x*.dfu, after which it re-enumerates as bcdDevice 0.02. In the broken case ath3k is autoloaded only ~1.2 s after acer_wmi already killed the device (dmesg: "usbcore: registered new interface driver ath3k" comes after the disconnect), so firmware upload never happens.

Note that devices=0xFFFF contradicts the DMI type 0xAA bitmap of 0x1 that the driver itself parsed a few lines earlier.

Possibly related observation: the same machine under Windows 10 also lost Bluetooth after resume from sleep, and only a full power cycle (battery out) brought it back - this also points at EC/Bluetooth power handling rather than at the USB controller or the driver stack.

Workaround (verified)
---------------------
/etc/modprobe.d/acer-wmi-bt-fix.conf:
blacklist acer_wmi
install acer_wmi /bin/false
(or: options acer_wmi force_caps=0x6 - clears ACER_CAP_SET_FUNCTION_MODE, so acer_wmi_enable_rf_button()/acer_wmi_enable_lm() are not called, while the module still loads.)

With acer_wmi not loaded, the same boot sequence becomes:

  [    5.402775] usb 2-5: New USB device found, idVendor=0489, idProduct=e095,
bcdDevice= 0.01
  [   21.994836] usb 2-5: USB disconnect, device number 2      <- DFU reset by
ath3k
  [   21.995820] usbcore: registered new interface driver ath3k
  [   22.245551] usb 2-5: new full-speed USB device number 5 using xhci_hcd
  [   27.864877] usb 2-5: New USB device found, idVendor=0489, idProduct=e095,

bcdDevice= 0.02

and the result is a working controller:

Bus 002 Device 005: ID 0489:e095 Foxconn / Hon Hai /sys/class/bluetooth/hci0
rfkill: 1: hci0: Bluetooth ("Soft blocked: no / Hard blocked: no") bluetoothctl list -> Controller XX:XX:XX:XX:XX:XX <hostname> [default]
(address redacted)

The cost of the workaround is the loss of the acer-wmi extras: the "acer-wireless" rfkill, the Acer WMI input device (Fn hotkeys such as KEY_WLAN/KEY_BLUETOOTH) and other acer-wmi functionality.

Suggested fix
-------------
1) Preferred: stop passing 0xFFFF for devices acer_wmi already knows are not present. acer-wmi.c keeps the parsed DMI type 0xAA bitmap in commun_func_bitmap (0x1 on this machine). Using it instead of 0xFFFF for .commun_devices/.devices would restrict the EC write to the devices declared by the firmware; needs confirmation of the EC semantics (the register may be an enable mask, a disable mask, or a "device status" mask).

2) Alternative: a DMI quirk for Acer Extensa 2511G / BA50_BH that clears ACER_CAP_SET_FUNCTION_MODE, i.e. skips acer_wmi_enable_rf_button() and acer_wmi_enable_lm(). This is exactly what "options acer_wmi force_caps=0x6" does, and it was verified to keep Bluetooth alive on this unit. The module then loads normally and still provides the "acer-wireless" rfkill.
Caveat: the hotkey/LM side effects of skipping those two calls have to be evaluated. On this machine acer_wmi has no other useful capabilities anyway (bitmap 0x1, no platform_profile, backlight handled by i915).

3) Long-term: if the EC can be told to keep BT powered, setting ACER_CAP_BLUETOOTH and registering "acer-bluetooth" rfkill would let BlueZ re-enable the radio. On this unit the DMI bitmap declares Bluetooth absent, so the EC status register would have to be queried/forced instead.

Other Acer models based on the same board (BA50_BH) or shipped with the AR9565 combo card are likely affected by the same EC behaviour; searching for "Function bitmap for Communication Button: 0x1" + missing Bluetooth may find more reports.

Attachments (can be provided on request)
----------------------------------------
- dmesg from a broken boot (acer_wmi loaded) and from a working boot (acer_wmi blacklisted)
- lsusb -v -d 0489:e095, before and after the firmware upload
- dmidecode output
- DSDT / full ACPI dump - needed to inspect the EC method behind WMID GUID3 method 0x1
- kernel .config

Reporter note
-------------
This report comes from a user, not a kernel developer: the root cause was derived by comparing five boot logs and reading acer-wmi.c, so the proposed fix should be treated as a hypothesis. The measured part (USB disconnect < 2 ms after acer_wmi init, on every boot, 100% reproducible) is reliable, and I am happy to test patches or provide any additional data.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 222323] acer-wmi: WMID set_function_mode(devices=0xFFFF) powers off the Atheros AR3012 Bluetooth controller on Acer Extensa 2511G before ath3k can upload firmware

https://bugzilla.kernel.org/show_bug.cgi?id=222323

Artur Sultanov ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #311571|Before/after data set:      |Before/after dmesg: broken
        description|dmesg from the broken boot  |boot (acer_wmi loaded,
                   |(acer_wmi loaded - AR3012   |AR3012 drops off USB) vs
                   |disconnects right after     |working boot (acer_wmi
                   |"Function bitmap for        |blacklisted, ath3k firmware
                   |Communication Button") and  |loaded); plus DSDT,
                   |from the working boot       |acpidump, dmidecode, lsusb
                   |(acer_wmi blacklisted -     |-v, kernel config
                   |ath3k                       |
Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 222323] acer-wmi: WMID set_function_mode(devices=0xFFFF) powers off the Atheros AR3012 Bluetooth controller on Acer Extensa 2511G before ath3k can upload firmware

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=222323

--- Comment #1 from Artur Sultanov ([email protected]) --- Re-posting the beginning of the report - the first line was lost during submission:

acer-wmi: WMID set_function_mode(devices=0xFFFF) powers off the Atheros AR3012 Bluetooth controller on Acer Extensa 2511G before ath3k can upload firmware

Key evidence, one boot (journalctl -b -1 -k -o short-precise):

  [   5.402775] usb 2-5: New USB device found, idVendor=0489, idProduct=e095,
bcdDevice= 0.01
  [  21.799794] acer_wmi: Function bitmap for Communication Button: 0x1
  [  21.856170] usb 2-5: USB disconnect, device number 2

Delta between the acer_wmi message and the USB disconnect: 0.08 / 0.16 / 0.19 / 2.1 ms across four boots (table in the description).

Same machine with acer_wmi blacklisted (dmesg-current-boot.txt in the attachment):

  [  21.994836] usb 2-5: USB disconnect, device number 2   <- ath3k uploads
firmware (DFU reset)
  [  21.995820] usbcore: registered new interface driver ath3k
  [  27.864877] usb 2-5: New USB device found, idVendor=0489, idProduct=e095,

bcdDevice= 0.02
-> hci0 present, rfkill has "hci0: Bluetooth", controller usable

Triggering call is acer_wmi_enable_rf_button() from acer_wmi_init():
wmid3_set_function_mode() with .commun_devices = .devices = 0xFFFF, although the
DMI type 0xAA bitmap parsed by the same driver is 0x1 (WLAN only).

Attachment contents: broken/working dmesg, DSDT, acpidump, dmidecode, lsusb -v (0489:e095), lspci, rfkill, lsmod, kernel .config. I can test patches on this machine.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw

[Bug 222323] acer-wmi: WMID set_function_mode(devices=0xFFFF) powers off the Atheros AR3012 Bluetooth controller on Acer Extensa 2511G before ath3k can upload firmware

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=222323

Artur Sultanov ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

     Kernel Version|                            |6.8.0-151-generic
                 CC|                            |[email protected]
Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.