Package: linux-source-4.9
Version: >=4.9.25
eeepc-wmi doesn't work with my Eee PC netbook (Asus X101) after kernel upgrade
from 3.14.79 to 4.9.y. So some Eee WMI hotkeys don't work with the new kernel.
kern.log:
-------
[ 1.043620] eeepc_wmi: Found legacy ATKD device (ASUS010)
[ 1.043632] eeepc_wmi: WMI device present, but legacy ATKD device is also
present and enabled
[ 1.043650] eeepc_wmi: You probably booted with acpi_osi="Linux" or
acpi_osi="!Windows 2009"
[ 1.043662] eeepc_wmi: Can't load eeepc-wmi, use default acpi_osi
(preferred) or eeepc-laptop
evtest output:
Available devices:
/dev/input/event0: Lid Switch
/dev/input/event1: Sleep Button
/dev/input/event2: Power Button
/dev/input/event3: Power Button
/dev/input/event4: Video Bus
/dev/input/event5: AT Translated Set 2 keyboard
/dev/input/event6: HDA Intel Headphone
/dev/input/event7: SynPS/2 Synaptics TouchPad
------------
eeepc-laptop is not good for Asus X101. It works only with acpi_osi=Linux, but
the KEY_BRIGHTNESSDOWN and KEY_BRIGHTNESSUP don't work in this case.
I have to use eeepc-wmi.
The patch "Use acpi_dev_found() " is the cause of the problem. /part of
vanilla kernel/
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/drivers/platform/x86/eeepc-wmi.c?h=v4.9.51
...
I removed this patch from my kernel source, and eeepc_wmi works correct.:
kern.log:
[ 1.048511] input: Eee PC WMI hotkeys as /devices/platform/eeepc-
wmi/input/input5
evtest output:
Available devices:
/dev/input/event0: Lid Switch
/dev/input/event1: Sleep Button
/dev/input/event2: Power Button
/dev/input/event3: Power Button
/dev/input/event4: Video Bus
/dev/input/event5: Eee PC WMI hotkeys
/dev/input/event6: AT Translated Set 2 keyboard
/dev/input/event7: HDA Intel Headphone
/dev/input/event8: SynPS/2 Synaptics TouchPad
I suggest to remove the bad patch /for example with attachment/ from the
kernel source .
I am using Debian GNU/Linux 8.9, 4.9.25/4.9.30 based kernel and libc6
2.19-18+deb8u10.
Thanks
Oscon
diff -Nrup linux-source-4.9-limbo/drivers/platform/x86/eeepc-wmi.c linux-source4925/drivers/platform/x86/eeepc-wmi.c
--- linux-source-4.9-limbo/drivers/platform/x86/eeepc-wmi.c 2017-04-27 07:11:26.000000000 +0000
+++ linux-source4925/drivers/platform/x86/eeepc-wmi.c 2017-09-18 11:06:57.000000000 +0000
@@ -204,10 +204,30 @@ static void eeepc_wmi_key_filter(struct
}
}
+static acpi_status eeepc_wmi_parse_device(acpi_handle handle, u32 level,
+ void *context, void **retval)
+{
+ pr_warn("Found legacy ATKD device (%s)\n", EEEPC_ACPI_HID);
+ *(bool *)context = true;
+ return AE_CTRL_TERMINATE;
+}
+
+static int eeepc_wmi_check_atkd(void)
+{
+ acpi_status status;
+ bool found = false;
+
+ status = acpi_get_devices(EEEPC_ACPI_HID, eeepc_wmi_parse_device,
+ &found, NULL);
+
+ if (ACPI_FAILURE(status) || !found)
+ return 0;
+ return -1;
+}
+
static int eeepc_wmi_probe(struct platform_device *pdev)
{
- if (acpi_dev_found(EEEPC_ACPI_HID)) {
- pr_warn("Found legacy ATKD device (%s)\n", EEEPC_ACPI_HID);
+ if (eeepc_wmi_check_atkd()) {
pr_warn("WMI device present, but legacy ATKD device is also "
"present and enabled\n");
pr_warn("You probably booted with acpi_osi=\"Linux\" or "