Skip to contentSkip to conversation

HP nx8220 psmouse vs ACPI at boot up

PATCH Thomas Renninger 3 participants 4 messages Apr 19, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

I first thought it's the "unload psmouse" or "cleanup psmouse ports" at shutdown problem again.

I think this time EC gets confused at boot time.
Compiling psmouse as module helps again.

Symptom:
AC adapter status is wrong if booted with AC unplugged. Replugging helps.
This sounds like a minor bug, but ACPI errors at other places with AE_TIME errors also happen and theoretically all kind of ACPI breakage could happen...

I can reproduce this with a 2.6.18 and a 2.6.16 kernel. Latest 2.6.21-rc7 does not show the problem.
I wonder whether this really got fixed or whether this is just because psmouse gets activated at some earlier or later time because of other changes in the kernel.

This looks a bit related to the
"Could the k8temp driver be interfering with ACPI" discussion. It seems as if mouse ports should not get touched when ACPI is accessing the EC on HP laptops (and others?) in general?

I can't access the machine anymore, I possibly can have it for some more tests.
I just want to point out that there still could be trouble.

Thomas

I thought that attached patch helps (exclude psmouse init and ACPI interpreter). But it seems that not.
Hmm, so strange, I removed processor, fan and thermal module to not be loaded via initrd -> works. However adding them again still works, maybe they are loaded in different order. Really confused now, as this problem is a BIOS problem and what I see cannot get cleanly workarounded I am giving up.

---
 drivers/input/mouse/psmouse-base.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/input/mouse/psmouse-base.c +16 -0
Index: linux-2.6.18-SL102_BRANCH/drivers/input/mouse/psmouse-base.c
===================================================================
@@ -22,6 +22,8 @@
 #include <linux/libps2.h>
 #include <linux/mutex.h>
 
+#include <acpi/acpi.h>
+
 #include "psmouse.h"
 #include "synaptics.h"
 #include "logips2pp.h"
@@ -1513,6 +1515,14 @@ static int psmouse_get_maxproto(char *bu
 
 static int __init psmouse_init(void)
 {
+	acpi_status status;
+
+	status = acpi_ut_acquire_mutex(ACPI_MTX_INTERPRETER);
+	if (status) {
+		printk (KERN_ERR "%s - Could not acquire ACPI interpreter"
+			" mutex\n", __FUNCTION__);
+	}
+
 	kpsmoused_wq = create_singlethread_workqueue("kpsmoused");
 	if (!kpsmoused_wq) {
 		printk(KERN_ERR "psmouse: failed to create kpsmoused workqueue\n");
@@ -1521,6 +1531,12 @@ static int __init psmouse_init(void)
 
 	serio_register_driver(&psmouse_drv);
 
+	status = acpi_ut_release_mutex(ACPI_MTX_INTERPRETER);
+	if (status) {
+		printk (KERN_ERR "%s - Could not release ACPI interpreter"
+			" mutex\n", __FUNCTION__);
+	}
+
 	return 0;
 }
 
maintainer
#1 lore raw

Hi Thomas,

Quoted 15 lines · Thomas Renninger

Hi,

I first thought it's the "unload psmouse" or "cleanup psmouse ports" at shutdown problem again.

I think this time EC gets confused at boot time.
Compiling psmouse as module helps again.

Symptom:
AC adapter status is wrong if booted with AC unplugged. Replugging helps.
This sounds like a minor bug, but ACPI errors at other places with AE_TIME errors also happen and theoretically all kind of ACPI breakage could happen...

Quoted 6 lines

I can reproduce this with a 2.6.18 and a 2.6.16 kernel. Latest 2.6.21-rc7 does not show the problem.
I wonder whether this really got fixed or whether this is just because psmouse gets activated at some earlier or later time because of other changes in the kernel.

I don't think so, unless you changed your .config.

Quoted 5 lines

This looks a bit related to the
"Could the k8temp driver be interfering with ACPI" discussion. It seems as if mouse ports should not get touched when ACPI is accessing the EC on HP laptops (and others?) in general?

Quoted 8 lines

I can't access the machine anymore, I possibly can have it for some more tests.
I just want to point out that there still could be trouble.

Thomas

I thought that attached patch helps (exclude psmouse init and ACPI interpreter). But it seems that not.

You want to take the lock in psmouse_connect() and psmouse_disconnect() and bunch of other places. Because all probing work is offloaded to kseriod you did not really change anything when protecting psmouse_init.

Signature · 1 line
Dmitry
#2 lore raw
In reply to Thomas Renninger
Quoted 6 lines · Thomas Renninger

I first thought it's the "unload psmouse" or "cleanup psmouse ports" at shutdown problem again.

I think this time EC gets confused at boot time.
Compiling psmouse as module helps again.

Quoted 6 lines

Symptom:
AC adapter status is wrong if booted with AC unplugged. Replugging helps.
This sounds like a minor bug, but ACPI errors at other places with AE_TIME errors also happen and theoretically all kind of ACPI breakage could happen...

Is there a more complete bug report for this, with the whole dmesg log? Is this related to suspend/resume, or does it happen on all shutdown and restart? Any chance you could collect the DSDT?

Bjorn

#3 lore raw
Quoted 14 lines · Bjorn Helgaas
Quoted 6 lines · Thomas Renninger

I first thought it's the "unload psmouse" or "cleanup psmouse ports" at shutdown problem again.

I think this time EC gets confused at boot time.
Compiling psmouse as module helps again.

Quoted 6 lines

Symptom:
AC adapter status is wrong if booted with AC unplugged. Replugging helps.
This sounds like a minor bug, but ACPI errors at other places with AE_TIME errors also happen and theoretically all kind of ACPI breakage could happen...

Quoted 3 lines

Is there a more complete bug report for this, with the whole dmesg log? Is this related to suspend/resume, or does it happen on all shutdown and restart? Any chance you could collect the DSDT?

This is the bug report:
https://bugzilla.novell.com/show_bug.cgi?id=260794

Klaus: Could you also attach acpidump output to the bug, pls.

This is not related to suspend/resume.

Quoted 1 line

Does it happen on all shutdown and restart

-> Good question, first I was sure to be able to always reproduce this on 2.6.1[68] kernels with psmouse module compiled in. Latest .21-rc7 was unaffected.
I then removed thermal, fan, processor module to not get loaded via initrd (gets loaded later at init 3 or 2). Since then the symptom vanished. (even after adding the modules again. Maybe I mixed something up in the end, or the order of modules loaded in initrd changed, but I doubt it was that...)

However, if someone should see any AE_TIME ACPI errors on an HP, I'd try to compile psmouse as module or compile it out, chances are high that it helps..., I wonder whether more people see this, would be nice to get some more reports.

Thomas