Bug 34142 - acer_wmi: "Unable to detect available WMID devices" on Travelmate 5735Z-452G32Mnss
Summary: acer_wmi: "Unable to detect available WMID devices" on Travelmate 5735Z-452G3...
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_platform_x86@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-30 17:38 UTC by Melchior FRANZ
Modified: 2011-05-30 08:39 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.39-rc5
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg and acpidump (268.48 KB, text/plain)
2011-04-30 17:38 UTC, Melchior FRANZ
Details
dsdt of Acer Travelmate 5735Z-452G32Mnss (18.91 KB, application/octet-stream)
2011-04-30 17:53 UTC, Melchior FRANZ
Details
dmesg with acpi debug and modprobe acer-wmi (60.16 KB, text/plain)
2011-05-01 16:52 UTC, Melchior FRANZ
Details
debug.patch (439 bytes, patch)
2011-05-04 06:16 UTC, Lee, Chun-Yi
Details | Diff
dmidecode output (11.14 KB, text/plain)
2011-05-05 16:19 UTC, Melchior FRANZ
Details
0001-acer-wmi-allow-64-bits-return-buffer-from-WMI-metho.patch (1.86 KB, patch)
2011-05-06 10:21 UTC, Lee, Chun-Yi
Details | Diff

Description Melchior FRANZ 2011-04-30 17:38:56 UTC
Created attachment 55992 [details]
dmesg and acpidump

On an Acer Travelmate 5735Z-452G32Mnss acer_wmi fails to find available WMID devices:

  $ dmesg|grep -i acer
  DMI: Acer TM5735/BA51_MV, BIOS V1.04 09/23/2010
  acer_wmi: Acer Laptop ACPI-WMI Extras
  acer_wmi: Unable to detect available WMID devices



debug_dump_wdg=1 shows the following info, whereby numbers in angle brackets represent the hex code of a single character.

F6CB5C3C-9CAE-4EBD-B577-931EA32A2CC0:
	object_id: MX
	notify_id: 4D
	reserved: 58
	instance_count: 1
	flags: 0x2 ACPI_WMI_METHOD
F28A9357-CF4B-4A1A-8893-BB1F58EEA1AF:
	object_id: Ñ
	notify_id: D1
	reserved: 00
	instance_count: 1
	flags: 0x8 ACPI_WMI_EVENT
05901221-D566-11D1-B2F0-00A0C9062910:
	object_id: XM
	notify_id: 58
	reserved: 4D
	instance_count: 1
	flags: 0x0
95764E09-FB56-4E83-B31A-37761F60994A:
	object_id: AA
	notify_id: 41
	reserved: 41
	instance_count: 1
	flags: 0x1 ACPI_WMI_EXPENSIVE
6AF4F258-B401-42FD-BE91-3D4AC2D7C0D3:
	object_id: BA
	notify_id: 42
	reserved: 41
	instance_count: 1
	flags: 0x2 ACPI_WMI_METHOD
CC1A61AC-4256-41A3-B9E0-05A445ADE2F5:
	object_id: <80>
	notify_id: 80
	reserved: 00
	instance_count: 1
	flags: 0x8 ACPI_WMI_EVENT
E78C4453-0227-4861-9EDE-F5600B4A3D39:
	object_id: BB
	notify_id: 42
	reserved: 42
	instance_count: 1
	flags: 0x2 ACPI_WMI_METHOD
AAE04F7B-B3C5-4865-95D6-9FAC7FF3E92B:
	object_id: BC
	notify_id: 42
	reserved: 43
	instance_count: 1
	flags: 0x2 ACPI_WMI_METHOD
CFF94C79-6C77-4AF7-AC56-7DD0CE01C997:
	object_id: BD
	notify_id: 42
	reserved: 44
	instance_count: 1
	flags: 0x2 ACPI_WMI_METHOD
79772EC5-04B1-4BFD-843C-61E7F77B6CC9:
	object_id: BE
	notify_id: 42
	reserved: 45
	instance_count: 1
	flags: 0x2 ACPI_WMI_METHOD
A7C9A0B7-4C9D-4C72-83BB-53A3459171DF:
	object_id: BF
	notify_id: 42
	reserved: 46
	instance_count: 1
	flags: 0x2 ACPI_WMI_METHOD
653A064F-A23A-485F-B3D9-13F6532A0182:
	object_id: BG
	notify_id: 42
	reserved: 47
	instance_count: 1
	flags: 0x2 ACPI_WMI_METHOD
5923DD45-0480-4ED5-B61A-C9EC6C90E26A:
	object_id: BH
	notify_id: 42
	reserved: 48
	instance_count: 1
	flags: 0x2 ACPI_WMI_METHOD
DB85B1A7-069A-4ABB-A2B5-D186A21B80F1:
	object_id: <81>
	notify_id: 81
	reserved: 00
	instance_count: 1
	flags: 0x8 ACPI_WMI_EVENT
36916B91-1A64-4583-84D0-53830FB9108D:
	object_id: <82>
	notify_id: 82
	reserved: 00
	instance_count: 1
	flags: 0x8 ACPI_WMI_EVENT
676AA15E-6A47-4D9F-A2CC-1E6D18D14026:
	object_id: Œ
	notify_id: BC
	reserved: 00
	instance_count: 1
	flags: 0x8 ACPI_WMI_EVENT
61EF69EA-865C-4BC3-A502-A0DEBA0CB531:
	object_id: AA
	notify_id: 41
	reserved: 41
	instance_count: 1
	flags: 0x2 ACPI_WMI_METHOD
05901221-D566-11D1-B2F0-00A0C9062910:
	object_id: AB
	notify_id: 41
	reserved: 42
	instance_count: 1
	flags: 0x0
FAAA1397-1188-448F-8516-9A07987DD38A:
	object_id: BI
	notify_id: 42
	reserved: 49
	instance_count: 1
	flags: 0x2 ACPI_WMI_METHOD


Full dmesg output and acpi dump attached.
Comment 1 Melchior FRANZ 2011-04-30 17:53:56 UTC
Created attachment 56002 [details]
dsdt of Acer Travelmate 5735Z-452G32Mnss
Comment 2 Lee, Chun-Yi 2011-05-01 07:19:08 UTC
This machine didn't pass the WMID_set_capabilities function check but it have WMID2 method, and it also supported newest WMID3 method. 

I am tracing the DSDT for why WMID2 return acpi failure, and also check standard ACPI support for backlight.
Comment 3 Lee, Chun-Yi 2011-05-01 10:36:53 UTC
Simply check DSDT, there have no _BCM, _BCL and _BQC in DSDT, that means this machine not support standard ACPI backlight control interface.

I still tracing the WMID2 way, hope this way works.
Comment 4 Melchior FRANZ 2011-05-01 11:58:05 UTC
acer_wmi.c's WMID_set_capabilities() bails out early because wmi_query_block(WMID_GUID2...) returns status=0.
Comment 5 Lee, Chun-Yi 2011-05-01 13:08:13 UTC
Hi Melchior, 

After dinner, I start to trace the WMID2, I found a odd situation: there have no PNP0c14 acpi device in DSDT, that means there have no WMI device in DSDT.

It's not make sense, there have no _WDG in DSDT but debug_dump_wdg print out there have WMI methods.

I have no idea for this situation, could you please attached acpidump on this bug?
just need:
    acpidump > acpidump.dat

I want to double check again.

Thank's!
Comment 6 Melchior FRANZ 2011-05-01 13:09:21 UTC
In acer_wmi.c's wmi_query_block() this happens:

  if (block->flags & ACPI_WMI_EXPENSIVE) {    ... is true
     ...
     wc_status = acpi_get_handle(handle, wc_method, &wc_handle);   ... wc_status=5
     ...
  }

  status = acpi_evaluate_object(handle, method, &input, out);   ... status=0

and so 0 is returned to WMID_set_capabilities(), and it aborts early.
Comment 7 Melchior FRANZ 2011-05-01 13:12:25 UTC
(In reply to comment #5)
> could you please attached acpidump on this bug?

That's already in the first attachment, below the dmesg output. Should have attached that separately, but initially I was only allowed one attachment. :-)
Comment 8 Lee, Chun-Yi 2011-05-01 13:19:07 UTC
Sorry! I didn't see you already attached acpidump on "Description". 

After checked the DSDT in your "Description", there have _BCM method and also have _WDG in DSDT.

I am tracing...
Comment 9 Lee, Chun-Yi 2011-05-01 16:13:30 UTC
I traced WQAA method in DSDT, it is the method object mapping to WMID_GUID2:

                Method (WQAA, 1, NotSerialized)
                {
                    AAF1 ()
                    Store (AADS, BUFF)	
                    Return (BUFF)
                }

I didn't see obvious problem in DSDT causes acpi_evaluate_object fail.

Melchior,
Could you please help to remove acpi_osi=Linux and also enable acpi debug?
Please run:
echo 0xFFFFFFFF >/sys/module/acpi/parameters/debug_layer
echo 0xF >/sys/module/acpi/parameters/debug_level

Then re-probe acer-wmi again, there must have some debug message in dmesg, please help to attach dmesg log.

Thank's a lot!
Comment 10 Melchior FRANZ 2011-05-01 16:52:27 UTC
Created attachment 56072 [details]
dmesg with acpi debug and modprobe acer-wmi
Comment 11 Melchior FRANZ 2011-05-01 16:53:13 UTC
The kernel had CONFIG_ACPI_DEBUG set, and I booted without stating 'acpi_osi=Linux', then entered your two echo lines and modprobed:

  # modprobe acer-wmi
  FATAL: Error inserting acer_wmi (/lib/modules/2.6.39-rc5-1.2-desktop+/kernel/drivers/platform/x86/acer-wmi.ko): No such device

This caused the following output in dmesg:

  acer_wmi: Acer Laptop ACPI-WMI Extras
  ACPI: Execute Method [\_SB_.PCI0.WMID.WQAA] (Node ffff880077c10560)
  acer_wmi: Unable to detect available WMID devices
  ACPI: Execute Method [\_SB_.PCI0.LPC_.BAT0._BST] (Node ffff880077c058f8)
  exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 0 Address=000000007BABEF77
  ACPI: Execute Method [\_SB_.PCI0.LPC_.AC__._PSR] (Node ffff880077c05858)
  exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 0 Address=000000007BABEF77
  exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 1 Address=000000007BABEEE2
  exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 0 Address=000000007BABEEE2
     utils-0286 [00] evaluate_integer      : Return value [1]

etc. Full dmesg output attached.
Comment 12 Lee, Chun-Yi 2011-05-04 04:21:26 UTC
The WQAA works on my Acer TravelMate 8572, the dmesg log like following:

[61991.100066] acer-wmi: Acer Laptop WMI Extras unloaded
[61993.555173] acer-wmi: Acer Laptop ACPI-WMI Extras
[61993.555213] ACPI: Execute Method [\_SB_.WMID.WQAA] (Node f484c428)
[61993.555264] exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 1 Address=000000006F78BB4D
[61993.555275] exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 1 Address=000000006F78BB4E
[61993.555280] exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 1 Address=000000006F78BB4F
[61993.555284] exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 1 Address=000000006F78BB50
[61993.555289] exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 1 Address=000000006F78BB51
[61993.555298] exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 1 Address=000000006F78BB52
[61993.555307] exregion-0302 [00] ex_system_io_space_han: System-IO (width 8) R/W 0 Address=000000000000FE00
[61993.555535] exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 0 Address=000000006F78BB4E
[61993.555539] exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 0 Address=000000006F78BB4F
[61993.555544] exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 0 Address=000000006F78BB50
[61993.555548] exregion-0199 [00] ex_system_memory_space: System-Memory (width 8) R/W 0 Address=000000006F78BB51
[61993.555584] statusxxxxxx: 0
[61993.555744] acer-wmi: Function bitmap for Communication Button: 0x841
[61993.555752] acer-wmi: Brightness must be controlled by generic video driver

The acpi_status return value is 0, and there have some exregion log.
Comment 13 Lee, Chun-Yi 2011-05-04 06:16:55 UTC
Created attachment 56512 [details]
debug.patch

Melchior, 

Could you please help to apply this patch then attached dmesg on this bug? This patch will print out the acpi status after query wmi method.

And, 
Please also help to attached your dmidecode log on this bug:
 dmidecode > dmidecode.log

Thank's a lot!
Comment 14 Melchior FRANZ 2011-05-05 16:18:40 UTC
The output of your patch is this:

  acer_wmi: Acer Laptop ACPI-WMI Extras
  acer_wmi: WMID_set_capabilities wmi_query_block status: 0
  acer_wmi: Unable to detect available WMID devices

dmidecode attached.
Comment 15 Melchior FRANZ 2011-05-05 16:19:30 UTC
Created attachment 56762 [details]
dmidecode output
Comment 16 Lee, Chun-Yi 2011-05-06 07:28:40 UTC
Thank's for your information, the acpi_status is 0 means query success. 
I know the root cause know, because the BUFF return length in machine is 64 bits but not 32 bits:

                Name (BUFF, Buffer (0x08)               /* 8 bytes, 64 bits */
                {   
                    /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                })

But, acer-wmi driver only check u32:

        obj = (union acpi_object *) out.pointer;
        if (obj && obj->type == ACPI_TYPE_BUFFER &&
                obj->buffer.length == sizeof(u32)) {       /* length must be 32 bits*/
                devices = *((u32 *) obj->buffer.pointer);

I am doing generate a patch to support 64 bits return BUFF.
Comment 17 Lee, Chun-Yi 2011-05-06 07:37:59 UTC
On the other hand, 

Melchior, 
Did you receive my mail to you for the backlight control on your machine actually handle by standard ACPI interface?

I mean, even we fix the acer-wmi support on your machine, but it still doesn't have any help to your backlight control, because the backlight is not handled by acer-wmi on your machine.

You should try Takashi's patch that was sand to you by mail before.
Comment 18 Melchior FRANZ 2011-05-06 08:10:00 UTC
Yes, I got that message. In it you asked me to try Takashi's patch, which I had done already, with report to the kernel list in the same thread. And in the other part you told me that the acer-wmi fix wouldn't solve my backlight problem (about acpi_osi=Linux being required), which I just accepted as a fact. So I decided to spare the kernel list what I thought would be a pointless "OK" message. Sorry about that.

But your upcoming 64bit fix and Takashi's lbpc-backlight fix are already a welcome achievement. An additional fix for acpi_osi (without having to add yet another quirk) would, of course, be great.


> You should try Takashi's patch that was sand to you by mail before.

Again: I have tried them. Both. And reported to the kernel list about the result. Of either.  :-)
Comment 19 Lee, Chun-Yi 2011-05-06 10:21:26 UTC
Created attachment 56812 [details]
0001-acer-wmi-allow-64-bits-return-buffer-from-WMI-metho.patch

OK,

Please kindly help to test this patch, it allow 64-bits return buffer when evaluate WMID_GUID1/2 methods.

If everything works fine, then you will see the acer-wmi probe success and there have some sysfs interface in /sys/devices/platform/acer-wmi
Comment 20 Lee, Chun-Yi 2011-05-06 10:28:41 UTC
Melchior, 
About the backlight control, it's another story, let us discuss in mail.
Comment 21 Melchior FRANZ 2011-05-06 12:19:37 UTC
(In reply to comment #19)
> 0001-acer-wmi-allow-64-bits-return-buffer-from-WMI-metho.patch

Again for bugzilla: This patch works.
Comment 22 Lee, Chun-Yi 2011-05-06 13:26:28 UTC
(In reply to comment #21)
> (In reply to comment #19)
> > 0001-acer-wmi-allow-64-bits-return-buffer-from-WMI-metho.patch
> 
> Again for bugzilla: This patch works.

Great!
I will submit patch to Matthew. 

Per your dmesg from mail
acer-wmi driver receive some Unknown key number from BIOS:

[  150.859931] keyboard: can't emulate rawmode for keycode 240
[  150.860391] keyboard: can't emulate rawmode for keycode 240
[  150.860448] acer_wmi: Unknown key number - 0x63
[  157.125626] keyboard: can't emulate rawmode for keycode 240
[  157.125639] keyboard: can't emulate rawmode for keycode 240
[  157.125648] acer_wmi: Unknown key number - 0x62

This is other thing not related to this bug, let us discuss in mail loop.
Comment 23 Florian Mickler 2011-05-30 08:00:49 UTC
A patch referencing this bug report has been merged in v3.0-rc1:

commit ab6a931620cfa5c565b351d1982306c3c8b97f96
Author: Lee, Chun-Yi <joeyli.kernel@gmail.com>
Date:   Sun May 22 07:33:53 2011 +0800

    acer-wmi: allow 64-bits return buffer from WMI methods

Note You need to log in before you can comment on or make changes to this bug.