Comment 174 for bug 1949394

Revision history for this message
In , linux.bug.reporting (linux.bug.reporting-linux-kernel-bugs) wrote :

Hello Dmitry,

This problem is really impacting a lot of users (I've been contacted by a number of folks already). Based on the original idea/patch of Mateusz, I've produced this patch against mainline for your kind consideration & for its merging into mainline. I've tested it to work just fine.

I'm no kernel wizard, just your regular Linux user. But like many others in this bug report, I'm very much affected by this bug. Therefore this patch has been produced out of dire necessity (might not be out of technical excellence, for sure).

If you think it needs to be worked out differently, please speak up (alas, I might not be able to implement your suggestions, as after all I'm just a Linux user, however, I'd happily send my deeply appreciative thanks and/or a small Paypal donation to whomsoever fixes as per your suggestions, be it even be yourself).

But please don't ignore us. We're really impacted by this problem & would appreciate to see a solution right out of mainline kernel.

PS: I'm attaching the above patch as a file attachment to this bug report.

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 479f332..261e541 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1270,6 +1270,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
        i8042.notimeout [HW] Ignore timeout condition signalled by controller
        i8042.reset [HW] Reset the controller during init and cleanup
        i8042.unlock [HW] Unlock (ignore) the keylock
+ i8042.kbdreset [HW] Reset keyboard to make trackpad work (in Gigabyte laptops with
+ Elantech trackpad)

        i810= [HW,DRM]

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index f5a98af..fb0c3d8 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -67,6 +67,10 @@ static bool i8042_notimeout;
 module_param_named(notimeout, i8042_notimeout, bool, 0);
 MODULE_PARM_DESC(notimeout, "Ignore timeouts signalled by i8042");

+static bool i8042_kbdreset;
+module_param_named(kbdreset, i8042_kbdreset, bool, 0);
+MODULE_PARM_DESC(kbdreset, "Reset keyboard to make trackpad work");
+
 #ifdef CONFIG_X86
 static bool i8042_dritek;
 module_param_named(dritek, i8042_dritek, bool, 0);
@@ -789,6 +793,10 @@ static int __init i8042_check_aux(void)
        if (i8042_toggle_aux(true))
                return -1;

+ /* To make trackpad work on many Gigabyte laptop models containg Elantech trackpad */
+ if (i8042_kbdreset)
+ i8042_kbd_write(NULL, (unsigned char) 0xff);
+
 /*
  * Test AUX IRQ delivery to make sure BIOS did not grab the IRQ and
  * used it for a PCI card or somethig else.