Bug 33032 - Error "acer-wmi: Unable to detect available WMID devices" when booting
Summary: Error "acer-wmi: Unable to detect available WMID devices" when booting
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-11 06:42 UTC by Filipus Klutiero
Modified: 2013-01-19 22:57 UTC (History)
2 users (show)

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


Attachments
ACPI dump (238.51 KB, application/x-ns-proxy-autoconfig)
2011-04-13 03:23 UTC, Filipus Klutiero
Details
0001-acer-wmi-Fix-WMI-ID.patch (1.61 KB, patch)
2011-04-13 07:58 UTC, Lee, Chun-Yi
Details | Diff
debug.patch (704 bytes, patch)
2011-05-23 07:16 UTC, Lee, Chun-Yi
Details | Diff
dmesg with Chun-Yi's debugging patch (50.53 KB, application/octet-stream)
2011-05-24 20:38 UTC, Filipus Klutiero
Details
Output of dmidecode on problematic machine (7.77 KB, application/octet-stream)
2011-05-24 20:39 UTC, Filipus Klutiero
Details
0001-acer-wmi-support-integer-return-type-from-WMI-metho.patch (1.67 KB, patch)
2011-05-26 06:38 UTC, Lee, Chun-Yi
Details | Diff

Description Filipus Klutiero 2011-04-11 06:42:34 UTC
I get this error when booting my Gateway NV5909H laptop with Linux 2.6.38:

acer-wmi: Unable to detect available WMID devices

If I try loading the module, I also get an error:

# modprobe acer-wmi
FATAL: Error inserting acer_wmi (/lib/modules/2.6.38-2-686-bigmem/kernel/drivers/platform/x86/acer-wmi.ko): No such device
root@vinci:/var/www/tiki/trunk#

Acer owns Gateway so it seems normal that acer-wmi would load.

This error must appear since I bought this laptop, one year ago. I've been running Debian testing since, approximately from Linux 2.6.32.
Comment 1 Lee, Chun-Yi 2011-04-13 02:54:39 UTC
Filipus, 

Could you please attached your acpidump on this bug? just need:
 acpidump > acpidump.dat

Please attached the acpidump.dat .

And, 
Does acer-wmi driver work to you on Linux 2.6.32? or actually you only try 2.6.38 kernel on your Gateway machine?
Comment 2 Filipus Klutiero 2011-04-13 03:23:21 UTC
Created attachment 54212 [details]
ACPI dump

As requested
Comment 3 Filipus Klutiero 2011-04-13 03:31:24 UTC
Chun-Yi, I attached an ACPI dump.

As I wrote, I use this laptop for one year. I am 99% sure it first had Linux 2.6.32. I am 90% sure I had the same error with 2.6.32. The error persisted with all upgrades, that is 2.6.35, 2.6.36, 2.6.37 and now 2.6.38.
Comment 4 Lee, Chun-Yi 2011-04-13 07:56:14 UTC
I thought it maybe a WMI ID upper characters problem.
Could you please try this Pali's patch?

commit 298f19b2547ba11a577a15ca329daa6f4bbf5ad8
Author: Pali Rohár <pali.rohar@gmail.com>
Date:   Fri Mar 11 12:36:43 2011 -0500

    acer-wmi: Fix WMI ID
    
    This patch change WMI ID to upper characters. With this patch module
    acer-wmi is automatically loaded when WMI ID is detected.
    
    Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
    Tested-by: Pali Rohár <pali.rohar@gmail.com>
    Signed-off-by: Matthew Garrett <mjg@redhat.com>

diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 4c82093..c1036d2 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -84,7 +84,7 @@ MODULE_LICENSE("GPL");
 #define AMW0_GUID1             "67C3371D-95A3-4C37-BB61-DD47B491DAAB"
 #define AMW0_GUID2             "431F16ED-0C2B-444C-B267-27DEB140CF9C"
 #define WMID_GUID1             "6AF4F258-B401-42FD-BE91-3D4AC2D7C0D3"
-#define WMID_GUID2             "95764E09-FB56-4e83-B31A-37761F60994A"
+#define WMID_GUID2             "95764E09-FB56-4E83-B31A-37761F60994A"
 #define WMID_GUID3             "61EF69EA-865C-4BC3-A502-A0DEBA0CB531"
 
 /*
@@ -93,7 +93,7 @@ MODULE_LICENSE("GPL");
 #define ACERWMID_EVENT_GUID "676AA15E-6A47-4D9F-A2CC-1E6D18D14026"
 
 MODULE_ALIAS("wmi:67C3371D-95A3-4C37-BB61-DD47B491DAAB");
-MODULE_ALIAS("wmi:6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3");
+MODULE_ALIAS("wmi:6AF4F258-B401-42Fd-BE91-3D4AC2D7C0D3");
 MODULE_ALIAS("wmi:676AA15E-6A47-4D9F-A2CC-1E6D18D14026");
 
 enum acer_wmi_event_ids {
Comment 5 Lee, Chun-Yi 2011-04-13 07:58:53 UTC
Created attachment 54242 [details]
0001-acer-wmi-Fix-WMI-ID.patch

Pali Rohár's patch
[PATCH] acer-wmi: Fix WMI ID
Comment 6 Filipus Klutiero 2011-05-03 19:15:54 UTC
Chun-Yi, I tried Pali's patch testing 2.6.39-rc5, but the problem persists.
Comment 7 Lee, Chun-Yi 2011-05-04 04:30:24 UTC
hmm........ looks like the WMID_GUID2 doesn't work on your machine, your issue similar with bko#34142, but have different wmi method definition.

I am tracing your DSDT...
Comment 8 Lee, Chun-Yi 2011-05-23 07:16:39 UTC
Created attachment 59072 [details]
debug.patch

Filipus, 

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

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

Thank's a lot!
Comment 9 Filipus Klutiero 2011-05-24 20:38:26 UTC
Created attachment 59262 [details]
dmesg with Chun-Yi's debugging patch

[   11.111180] acer_wmi: WMID_set_capabilities wmi_query_block status: 0
[   11.111186] acer_wmi: buffer.length: 8
Comment 10 Filipus Klutiero 2011-05-24 20:39:08 UTC
Created attachment 59272 [details]
Output of dmidecode on problematic machine
Comment 11 Lee, Chun-Yi 2011-05-25 01:48:48 UTC
(In reply to comment #9)
> Created an attachment (id=59262) [details]
> dmesg with Chun-Yi's debugging patch
> 
> [   11.111180] acer_wmi: WMID_set_capabilities wmi_query_block status: 0
> [   11.111186] acer_wmi: buffer.length: 8

OK, that means your wmi method return size is 64-bits.

Please apply this patch, then acer-wmi must can be probe:
https://bugzilla.kernel.org/attachment.cgi?id=56812
Comment 12 Filipus Klutiero 2011-05-25 02:02:26 UTC
Good, thank you Chun-Yi.
Can I assume that 2.6.40 will fix my problem, or do you want me to test the patch?
Comment 13 Lee, Chun-Yi 2011-05-25 02:19:05 UTC
Yes, I have send patches to Matthew, waiting merge to mainline.

(In reply to comment #12)
> Good, thank you Chun-Yi.
> Can I assume that 2.6.40 will fix my problem, or do you want me to test the
> patch?

Yes, I have send patches to Matthew, waiting merge to mainline.

That will be good if you can test this patch, then we can make sure acer-wmi works fine on your machine after it probed.
Comment 14 Filipus Klutiero 2011-05-25 19:05:48 UTC
I tested and unfortunately, I don't see any difference with that patch (Linux 2.6.39). The error message still appears. I can provide access to the machine if this helps.
Comment 15 Lee, Chun-Yi 2011-05-25 21:41:02 UTC
(In reply to comment #14)
> I tested and unfortunately, I don't see any difference with that patch (Linux
> 2.6.39). The error message still appears. 

That's weird, per your debug log message, the return buffer length is 8, that means 64-bits.
Did you still see "Unable to detect available WMID devices"?

[   11.111180] acer_wmi: WMID_set_capabilities wmi_query_block status: 0
[   11.111186] acer_wmi: buffer.length: 8
[   11.111190] acer_wmi: Unable to detect available WMID devices

> I can provide access to the machine
> if this helps.

Yes, let's talk in E-mail.
Comment 16 Filipus Klutiero 2011-05-26 00:37:00 UTC
Yes, I still see the error message.

Feel free to contact me for access to the machine via email, or via IRC (I'm chealer on OFTC and PDPC, logged most of the time and around quite often. I'm on GMT -5).
Comment 17 Lee, Chun-Yi 2011-05-26 05:58:26 UTC
OK, I know what's wrong, now. Your machines return type is integer, not a buffer:

        Field (CNVS, DWordAcc, Lock, Preserve)
        {
                    Offset (0x470),
            CBE0,   32                          /* return integer by WMID_GUID1/2 */
        }

And, I print out the object type on your machine confirm it's a integer:

[34997.552065] acer_wmi: Acer Laptop ACPI-WMI Extras
[34997.559928] acer_wmi: WMID_set_capabilities wmi_query_block status: 0
[34997.559934] acer_wmi: obj->type: 1
[34997.559938] acer_wmi: buffer.length: 8
[34997.559941] acer_wmi: Unable to detect available WMID devices

The object type 1 is ACPI_TYPE_INTEGER.

I will generate a patch to support this return type, then please help to test acer-wmi
driver after applied the patch.

I will attached the patch on bugzilla.
Comment 18 Lee, Chun-Yi 2011-05-26 06:38:02 UTC
Created attachment 59512 [details]
0001-acer-wmi-support-integer-return-type-from-WMI-metho.patch

This patch support the integer return type from WMID_GUID1/WMID_GUID2.

Filipus, 
Please kindly test this patch on your machine, I have already applied it to acer-wmi.c in your machine, please double check it.
And, I have build out the acer-wmi.ko file, you can direct insmode acer-wmi.ko in your kernel source folder.
Comment 19 Filipus Klutiero 2011-05-26 18:54:37 UTC
I tested inserting the module and this worked fine, without errors. I can't say if the module is working (I don't think it does anything on this laptop) but the error should be gone.

Thank you
Comment 20 Lee, Chun-Yi 2011-05-27 00:39:34 UTC
That's a good news.

(In reply to comment #19)
> I tested inserting the module and this worked fine, without errors. I can't
> say
> if the module is working (I don't think it does anything on this laptop) but
> the error should be gone.
> 
> Thank you

That's a good news.

But, still want to make sure acer-wmi works fine on your macihne.
could you please simply try to change the rfkill state?
e.g.
  echo 0 > /sys/devices/platform/acer_wmi/rfkill/rfkill0/state

There must have 2 - 3 rfkill generated by acer-wmi, they are acer-wirelss, acer-bluetooth and acer-threeg (if detected 3G).
Please access them and look at your machine have problem or not.

And, 
press some Fn function key like: wifi key, brightness level.

Thank's
Comment 21 Filipus Klutiero 2011-05-27 05:58:08 UTC
I tried wiki keys and brightness keys and they worked, but they don't need acer_wmi. I was able to change the wireless rfkill:

root@vinci:/sys/devices/platform/acer-wmi/rfkill/rfkill3# cat name
acer-wireless
root@vinci:/sys/devices/platform/acer-wmi/rfkill/rfkill3# cat state
1
root@vinci:/sys/devices/platform/acer-wmi/rfkill/rfkill3# echo 0 > state
root@vinci:/sys/devices/platform/acer-wmi/rfkill/rfkill3# echo 1 > state

This had the same effect as pressing the wireless icon.

I realized you must have been unable to access my machine today - sorry, damn NATs. It should be back now (but may go away for a couple hours soon).
Comment 22 Lee, Chun-Yi 2011-05-27 06:29:31 UTC
(In reply to comment #21)
> I tried wiki keys and brightness keys and they worked, but they don't need
> acer_wmi. I was able to change the wireless rfkill:
> 
> root@vinci:/sys/devices/platform/acer-wmi/rfkill/rfkill3# cat name
> acer-wireless
> root@vinci:/sys/devices/platform/acer-wmi/rfkill/rfkill3# cat state
> 1
> root@vinci:/sys/devices/platform/acer-wmi/rfkill/rfkill3# echo 0 > state
> root@vinci:/sys/devices/platform/acer-wmi/rfkill/rfkill3# echo 1 > state
> 
> This had the same effect as pressing the wireless icon.
> 
> I realized you must have been unable to access my machine today - sorry, damn
> NATs. It should be back now (but may go away for a couple hours soon).

Thank's for your help to test the killswitch, I thought it's enough to proof the wmi method works on your machine. :-)

I will send out patch to Matthew.
Comment 23 Florian Mickler 2011-05-30 07:26:57 UTC
A patch referencing this bug report has been merged in v3.0-rc1:

commit 987dfbaa65b2c3568b85e29d2598da08a011ee09
Author: Lee, Chun-Yi <joeyli.kernel@gmail.com>
Date:   Fri May 27 14:52:14 2011 +0800

    acer-wmi: support integer return type from WMI methods
Comment 24 Filipus Klutiero 2011-08-24 21:40:49 UTC
Thank you Chun-Yi. This is solved on 3.0. The module loads automatically without throwing the error. I get:

syslog:Aug 24 16:26:44 vinci kernel: [    7.275971] acer_wmi: Acer Laptop ACPI-WMI Extras
[...]
syslog:Aug 24 16:26:44 vinci kernel: [    7.789655] acer_wmi: Brightness must be controlled by generic video driver
Comment 25 Florian Mickler 2013-01-19 22:57:53 UTC
A patch referencing a commit referencing this bug report has been merged in Linux v3.8-rc4:

commit f20aaba9819d0801fb1314363f97239da0100bac
Author: Lee, Chun-Yi <joeyli.kernel@gmail.com>
Date:   Fri Dec 14 16:14:26 2012 +0800

    acer-wmi: fix obj is NULL but dereferenced

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