[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#280075: kernel-image-2.6.9-1-686: Laptop has problems when resuming after suspend with apm




Hi all,

I just downloaded the plain kernel source linux-2.6.11 from www.kernel.org, patched the file i8042.c using Vojtech's patch and it looks like the keyboard errors are finally gone, I could suspend and resume my IBM laptop using apm without a problem, after the resume the keyboard still works like expected!

Kind regards, Jörg.


Vojtech Pavlik wrote:
On Sat, Feb 19, 2005 at 10:33:42PM +0100, Joerg Morbitzer wrote:


Hi,

Thanks for the bug report.

I took a quick look and unfortunately there seem to
be quite a lot of changes to atkb.c between 2.6.8 and 2.6.9.
It is a bit hard to tell which change might have caused this
problem.

The only thing I found that may help is http://ozlabs.org/pipermail/linuxppc64-dev/2004-March/001315.html
but it seems like a long-shot at best.

I have CCed the maintainer + linux-input mailing list in
the hope of some help.


Does this still happen with 2.6.10 or 2.6.11-rc3? If yes, please use
i8042.debug=1 on the kernel command line to get a trace of the
communication with the keyboard in the kernel messages.


Sorry for answering so late, my wife was on holiday and took the laptop with her ;-) !

It still does happen with Debian Kernel 2.6.10-1-686 (2.6.10-4). When using i8042.debug=1 on the kernel command line I get back "Unknown boot option `i8042.debug=1': ignoring", am I doing something wrong?

It is difficult to describe what's going on after the resume, the keyboard simply behaves strange. When I press the "s" button it keeps printing the "+" character, when pressing the shift-key, it keeps printing the "E" character (in a terminal window or any editor) etc. etc.

Let me know what else I can test for you. If it helps I can give you ssh access to this laptop.

This patch may help:


ChangeSet@1.2016, 2005-03-10 20:36:51+01:00, vojtech@suse.cz
  input: Only write the CTR in i8042 resume function. Reading it is
         wrong, since it may (will) contain nonsensical data.
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>


 i8042.c |   48 ++++++++++++++++++++++++++++--------------------
 1 files changed, 28 insertions(+), 20 deletions(-)


diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
--- a/drivers/input/serio/i8042.c	2005-03-10 20:37:22 +01:00
+++ b/drivers/input/serio/i8042.c	2005-03-10 20:37:22 +01:00
@@ -698,6 +698,26 @@
 	i8042_interrupt(0, NULL, NULL);
 }
+static int i8042_ctl_test(void)
+{
+	unsigned char param;
+
+	if (!i8042_reset)
+		return 0;
+
+	if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
+		printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
+		return -1;
+	}
+
+	if (param != I8042_RET_CTL_TEST) {
+		printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n",
+			 param, I8042_RET_CTL_TEST);
+		return -1;
+	}
+
+	return 0;
+}
/*
  * i8042_controller init initializes the i8042 controller, and,
@@ -719,21 +739,8 @@
 		return -1;
 	}
- if (i8042_reset) {
-
-		unsigned char param;
-
-		if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
-			printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
-			return -1;
-		}
-
-		if (param != I8042_RET_CTL_TEST) {
-			printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n",
-				 param, I8042_RET_CTL_TEST);
-			return -1;
-		}
-	}
+	if (i8042_ctl_test())
+		return -1;
/*
  * Save the CTR for restoral on unload / reboot.
@@ -808,9 +815,7 @@
  * Reset the controller if requested.
  */
- if (i8042_reset)
-		if (i8042_command(&param, I8042_CMD_CTL_TEST))
-			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
+	i8042_ctl_test();
/*
  * Disable MUX mode if present.
@@ -922,8 +927,11 @@
 	if (level != RESUME_ENABLE)
 		return 0;
- if (i8042_controller_init()) {
-		printk(KERN_ERR "i8042: resume failed\n");
+	if (i8042_ctl_test())
+		return -1;
+
+	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
+		printk(KERN_ERR "i8042: Can't write CTR\n");
 		return -1;
 	}



Reply to: