Bug 41562
Summary: | acer-wmi: acer aspire 721 bluetooth control doesn't work with kernel 3.0.0 | ||
---|---|---|---|
Product: | Drivers | Reporter: | sbraz (hi.sbraz) |
Component: | Platform_x86 | Assignee: | Lee, Chun-Yi (jlee) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | akpm, alan, florian, jlee, maciej.rutecki, panaut0lordv, rjw |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.0.0 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 36912 | ||
Attachments: |
acpidump
test.diff acer-wmi.c dmesg with test.diff DSDT.hex dmesg -> Comment #8 + test.diff dmesg-DSDT_DEBUG_acer-wmi.c-3.0.3 - no test.diff dmidecode dmidecode2 0001-acer-wmi-Detect-communication-hot-key-number.patch |
Created attachment 69682 [details]
test.diff
A test patch that only query 1 device status but not all. This patch will print out the result from wmi method and always return.
Just for verify the wmi result.
Created attachment 69692 [details]
acer-wmi.c
If want to use:
Here is the acer-wmi.c from v3.0 kernel that was applied test.diff patch.
Just for verify the wmi result.
This machine's WMAA method collect devices status by call SMI but not go through EC register. It might have different behavior with other machine like TravelMate 8572. i've patched the 3.0.3 acer-wmi.c and it's the same as the one you posted (diffed them). compiled, unloaded old acer-wmi.ko, copied new acer-wmi.ko under /lib/modules/3.0.3-custom/kernel/drivers/platform/x86/, rebooted. i've attached "dmesg-test.diff-patch" but i think this under here is what you are looking for..? root@sbraz-netbook:~# dmesg |grep -i acer [ 0.000000] DMI: Acer Aspire One 721 /Aspire One 721 , BIOS V1.07 04/15/2010 [ 10.524354] acer_wmi: Acer Laptop ACPI-WMI Extras [ 10.524587] acer_wmi: Function bitmap for Communication Button: 0x801 [ 10.524995] acer_wmi: Brightness must be controlled by generic video driver [ 10.531589] input: Acer WMI hotkeys as /devices/virtual/input/input12 [ 10.534196] acer_wmi: Get Device Status failed: 0xe1 - 0x0 [ 10.536724] acer_wmi: Get Device Status failed: 0xe1 - 0x0 [ 10.539348] acer_wmi: Get Current Device Status failed: 0xe1 - 0x0 [ 11.137106] acer_wmi: Get Current Device Status failed: 0xe1 - 0x0 [ 29.519570] acer_wmi: Get Current Device Status failed: 0xe1 - 0x0 Created attachment 69772 [details]
dmesg with test.diff
same problem. i've linked them here so we can share all the possible data. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759874 There have the following if-else logic in WMAA method: If (LEqual (Arg1, 0x02)) /* Method ID(0x2) GET Functions */ { Store (0x00, BGET) If (LEqual (AAFN, 0x01)) /* Function number(0x1) Get Device Status */ { ASMI (0xF3, AAKN, 0x00, 0x00, AADM) Store (\_SB.PCI0.LPC0.WNVD, BGDM) Store (\_SB.PCI0.LPC0.WNVA, BGER) /* possible return 0xe1 */ Store (\_SB.PCI0.LPC0.WNVC, BGD0) Return (BGET) } Store (0xE1, BGER) /* return 0xe1 */ Return (BGET) } It return 0xe1 when the function number not support by the method. But, it's not make sense because acer-wmi driver already pass right function number(0x1): struct wmid3_gds_input_param params = { .function_num = 0x1, /* function number is 0x1 */ .hotkey_number = 0x01, .devices = device, }; struct acpi_buffer input = { sizeof(struct wmid3_gds_input_param), ¶ms }; struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; status = wmi_evaluate_method(WMID_GUID3, 0, 0x2, &input, &output); if (ACPI_FAILURE(status)) return status; Might need add some debug log to DSDT, then need bug reporter's help to test. Created attachment 69832 [details]
DSDT.hex
I add some debug message to WMAA method in DSDT.
Could you please help to re-compiler kernel for include this DSDT.hex file then attached dmesg log on this bug?
A. copy DSDT.hex to /root
B. make sure your kernel config have the following setting:
CONFIG_STANDALONE=n
ACPI_CUSTOM_DSDT_FILE=/root/dsdt.hex
CONFIG_PM_DEBUG=y
CONFIG_ACPI_DEBUG=y
CONFIG_ACPI_DEBUG_FUNC_TRACE=y
C. compiler your kernel and install it to your system
D. add the following kernel parameter to /boot/grub/menu.lst
acpi.debug_level=0x0000004F acpi.debug_layer=0xffffffff log_buf_len=5M
E. reboot system and take the dmesg log
Created attachment 69902 [details] dmesg -> Comment #8 + test.diff done. +i can control bluetooth with rfkill. -cpu frequency scaler and possibly other things doesn't work anymore. i haven't mentioned this before but i have "rfkill block bluetooth" added to rc.local, and this of course pop one additional "acer_wmi: Get Current Device Status failed: 0xe1 - 0x0" message on every dmesg i've posted so far. i screwed up. this last dmesg has been generated using acer-wmi.c from 2.6.39.4 on kernel 3.0. :( i'll recompile asap and post the results again. Created attachment 69932 [details]
dmesg-DSDT_DEBUG_acer-wmi.c-3.0.3 - no test.diff
here.
still buggy here. :) (In reply to comment #12) > Created an attachment (id=69932) [details] > no test.diff > > here. Checked the dsdt, confirm it try to launch SMI when acer-wmi evaluate WMAA method: [ 13.953867] [ACPI Debug] String [0x10] "[dsdt]Arg1(0x02)" [ 13.954006] [ACPI Debug] String [0x10] "[dsdt]AAFN(0x01)" If (LEqual (Arg1, 0x02)) { Store ("[dsdt]Arg1(0x02)", Debug) Store (0x00, BGET) If (LEqual (AAFN, 0x01)) { Store ("[dsdt]AAFN(0x01)", Debug) /* confirm we feed 0x01 function */ ASMI (0xF3, AAKN, 0x00, 0x00, AADM) /* launch SMI, AAKN: key number, AADM: devices map */ Store (\_SB.PCI0.LPC0.WNVD, BGDM) Store (\_SB.PCI0.LPC0.WNVA, BGER) /* response 0xE1 (Function not support) */ Store (\_SB.PCI0.LPC0.WNVC, BGD0) Return (BGET) } Store (0xE1, BGER) Store ("[dsdt]BGET.BSER(0xE1)", Debug) Return (BGET) } The problem is why SMI response 0xE1 on this machine. We only can control 2 parameter from acer-wmi, one is Function Number (AAKN) , the other one is Devices Map (AADM). We need try to change the parameter to poke this SMI call, if we cann't success, then I will add a workaround patch to acer-wmi for adapter it back to old wmi method on this machine. I am tracing DSDT, will attached a test patch. sbraz, Could you please also attach your dmidecode result on this bug? dmidecode > dmidecode.log Then please attach dmidecode.log file, thank's Is this still a problem in 3.2 / 3.3-rc1 ? ~$ uname -r 3.2.0-17-lowlatency So it's still here I suppose ;) And the /sys/devices/platform/acer-wmi/bluetooth doesn't even exist. Created attachment 72564 [details]
dmidecode
FINALLY this site came back to life. good. :) i've just attached the dmidecode as requested from Lee. Created attachment 72579 [details]
dmidecode2
Here is my dmidecode output, hope it helps.
(In reply to comment #19) > Created an attachment (id=72564) [details] > dmidecode 04 02 01 08 Button n: 004 04 = button 3 (Communication key) Hotkey number 0x04 Type of Button n: 02 02 = Fn key Function of Button n: 0801 0801 = Wireless, BT get/set wireless, bt states (In reply to comment #21) > Created an attachment (id=72579) [details] > dmidecode2 > > Here is my dmidecode output, hope it helps. The same! 04 02 01 08 Button n: 004 04 = button 3 (Communication key) Hotkey number 0x04 Type of Button n: 02 02 = Fn key Function of Button n: 0801 0801 = Wireless, BT get/set wireless, bt states Created attachment 72962 [details]
0001-acer-wmi-Detect-communication-hot-key-number.patch
Please try this patch, it already included in 3.4-rc1 kernel.
root@sbraz-netbook:/usr/src/linux-3.1.5/source# patch -p1 < /usr/src/kernel-patches/acer-wmi.patch_latest patching file drivers/platform/x86/acer-wmi.c Hunk #1 succeeded at 171 (offset -6 lines). Hunk #2 FAILED at 218. Hunk #3 succeeded at 1107 (offset 184 lines). Hunk #4 FAILED at 992. Hunk #5 succeeded at 1223 (offset 191 lines). Hunk #6 FAILED at 1105. 3 out of 6 hunks FAILED -- saving rejects to file drivers/platform/x86/acer-wmi.c.rej root@sbraz-netbook:/usr/src/linux-3.1.5/source# cat drivers/platform/x86/acer-wmi.c.rej --- drivers/platform/x86/acer-wmi.c +++ drivers/platform/x86/acer-wmi.c @@ -218,6 +223,7 @@ static bool ec_raw_mode; static bool has_type_aa; static u16 commun_func_bitmap; +static u8 commun_fn_key_number; module_param(mailled, int, 0444); module_param(brightness, int, 0444); @@ -992,7 +998,7 @@ u16 devices; struct wmid3_gds_input_param params = { .function_num = 0x1, - .hotkey_number = 0x01, + .hotkey_number = commun_fn_key_number, .devices = commun_func_bitmap, }; struct acpi_buffer input = { @@ -1105,6 +1111,8 @@ interface->capability |= ACER_CAP_THREEG; if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_BLUETOOTH) interface->capability |= ACER_CAP_BLUETOOTH; + + commun_fn_key_number = type_aa->commun_fn_key_number; } static acpi_status WMID_set_capabilities(void) --------------------------- however, compiling acer-wmi.ko using the source code file from 3.4-rc3 actually works with some quirks which might not be depending from the module itself: [ 2712.686910] acer_wmi: Acer Laptop WMI Extras unloaded [ 2820.420368] acer_wmi: Acer Laptop ACPI-WMI Extras [ 2820.420612] acer_wmi: Function bitmap for Communication Button: 0x801 [ 2820.421024] acer_wmi: Brightness must be controlled by generic video driver [ 2820.426559] input: Acer WMI hotkeys as /devices/virtual/input/input14 [ 2820.430211] acer_wmi: Get Device Status failed: 0xe1 - 0x0 [ 2820.432597] acer_wmi: Get Device Status failed: 0xe1 - 0x0 [ 2835.239738] usb 5-3: new full speed USB device number 5 using ohci_hcd [ 2843.842103] usb 5-3: USB disconnect, device number 5 [ 2843.844044] Bluetooth: hci0 urb ffff88007e65af00 submission failed [ 3010.033070] usb 5-3: new full speed USB device number 6 using ohci_hcd [ 3016.162663] usb 5-3: USB disconnect, device number 6 [ 3016.164612] Bluetooth: hci0 urb ffff880003ea3180 submission failed [ 3023.399719] usb 5-3: new full speed USB device number 7 using ohci_hcd [ 3037.523215] usb 5-3: USB disconnect, device number 7 [ 3037.525160] Bluetooth: hci0 urb ffff88007e7bcf00 submission failed [ 3042.349962] usb 5-3: new full speed USB device number 8 using ohci_hcd [ 3066.713375] usb 5-3: USB disconnect, device number 8 [ 3066.714743] Bluetooth: hci0 urb ffff88007e703f00 submission failed [ 3066.804756] show_signal_msg: 48 callbacks suppressed [ 3066.804761] bluetooth-apple[2212]: segfault at 8 ip 00007fa7d2fb29ee sp 00007fffab0a49e0 error 4 in libdbusmenu-glib.so.1.0.17[7fa7d2fae000+10000] Using yesterday's daily mainline kernel build everything works fine. Haven't checked turning Wi-Fi/BT on and off too extensively though ;) On 2.6.38.x it had 4 possible configs: WiFi/BT off/off off/on on/off on/on (In reply to comment #25) > root@sbraz-netbook:/usr/src/linux-3.1.5/source# patch -p1 < > /usr/src/kernel-patches/acer-wmi.patch_latest > patching file drivers/platform/x86/acer-wmi.c > Hunk #1 succeeded at 171 (offset -6 lines). > Hunk #2 FAILED at 218. > Hunk #3 succeeded at 1107 (offset 184 lines). > Hunk #4 FAILED at 992. > Hunk #5 succeeded at 1223 (offset 191 lines). > Hunk #6 FAILED at 1105. > 3 out of 6 hunks FAILED -- saving rejects to file > drivers/platform/x86/acer-wmi.c.rej > > > root@sbraz-netbook:/usr/src/linux-3.1.5/source# cat > drivers/platform/x86/acer-wmi.c.rej > --- drivers/platform/x86/acer-wmi.c > +++ drivers/platform/x86/acer-wmi.c > @@ -218,6 +223,7 @@ > static bool ec_raw_mode; > static bool has_type_aa; > static u16 commun_func_bitmap; > +static u8 commun_fn_key_number; > > module_param(mailled, int, 0444); > module_param(brightness, int, 0444); > @@ -992,7 +998,7 @@ > u16 devices; > struct wmid3_gds_input_param params = { > .function_num = 0x1, > - .hotkey_number = 0x01, > + .hotkey_number = commun_fn_key_number, > .devices = commun_func_bitmap, > }; > struct acpi_buffer input = { > @@ -1105,6 +1111,8 @@ > interface->capability |= ACER_CAP_THREEG; > if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_BLUETOOTH) > interface->capability |= ACER_CAP_BLUETOOTH; > + > + commun_fn_key_number = type_aa->commun_fn_key_number; > } > We need send commun_fn_key_number through wmi to BIOS. > static acpi_status WMID_set_capabilities(void) > > > > > --------------------------- > > however, compiling acer-wmi.ko using the source code file from 3.4-rc3 > actually > works with some quirks which might not be depending from the module itself: > > > [ 2712.686910] acer_wmi: Acer Laptop WMI Extras unloaded > [ 2820.420368] acer_wmi: Acer Laptop ACPI-WMI Extras > [ 2820.420612] acer_wmi: Function bitmap for Communication Button: 0x801 > [ 2820.421024] acer_wmi: Brightness must be controlled by generic video > driver > [ 2820.426559] input: Acer WMI hotkeys as /devices/virtual/input/input14 > [ 2820.430211] acer_wmi: Get Device Status failed: 0xe1 - 0x0 > [ 2820.432597] acer_wmi: Get Device Status failed: 0xe1 - 0x0 Your machine still complain the get device status function doesn't support. But, per DSDT, your machine's function number the same with Michał Kozal. Could you please test try v3.4 kernel? |
Created attachment 69672 [details] acpidump i'm using ubuntu 10.10 amd64 with a patched vanilla kernel. after upgrading the kernel from 2.6.39.4 to 3.0.0 i could not turn bluetooth on anymore with Fn+F3 or rfkill, dmesg says this when i do: acer_wmi: Get Current Device Status failed: 0xe1 - 0x0