Skip to contentSkip to conversation

PS/2 keyboard and mouse dead on resume on Intel D845BG

bisected Ondrej Zary 4 participants 6 messages Oct 7, 2012 – Oct 9, 2012 ACPI

lore
Share & tools
lore
#0 lore raw

Hello,
Intel D845BG board comes out of S3 with PS/2 keyboard and mouse completely dead. The machine works otherwise (with USB keyboard or over network). When rebooted in this state, the BIOS hangs with blank screen. I have the latest BIOS installed (P08).

Old kernels worked. Bisection pointed to commit:
b6dacf63e9fb2e7a1369843d6cef332f76fca6a3
(ACPI: Unconditionally set SCI_EN on resume)

Commenting out this line in drivers/acpi/sleep.c:

	acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);

fixes the problem.

Any ideas why this breaks on this system?

Signature · 1 line
Ondrej Zary
#1 lore raw
Quoted 10 lines · On Sunday 07 October 2012 15:13:27 Ondrej Zary wrote:

Hello,
Intel D845BG board comes out of S3 with PS/2 keyboard and mouse completely dead. The machine works otherwise (with USB keyboard or over network). When rebooted in this state, the BIOS hangs with blank screen. I have the latest BIOS installed (P08).

Old kernels worked. Bisection pointed to commit:
b6dacf63e9fb2e7a1369843d6cef332f76fca6a3
(ACPI: Unconditionally set SCI_EN on resume)

Quoted 5 lines

Commenting out this line in drivers/acpi/sleep.c:

	acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);

fixes the problem.

Any ideas why this breaks on this system?

Added acpi_read_bit_register there and it seems that SCI_EN is already set!

This patch fixes the problem here. I wonder how this affects systems that require SCI_EN to be set.

drivers/acpi/sleep.c +4 -1
@@ -271,6 +271,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
 	acpi_status status = AE_OK;
 	u32 acpi_state = acpi_target_sleep_state;
 	int error;
+	u32 sci_enabled;
 
 	ACPI_FLUSH_CPU_CACHE();
 
@@ -289,7 +290,9 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
 	}
 
 	/* This violates the spec but is required for bug compatibility. */
-	acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
+	acpi_read_bit_register(ACPI_BITREG_SCI_ENABLE, &sci_enabled);
+	if (!sci_enabled)
+		acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
 
 	/* Reprogram control registers */
 	acpi_leave_sleep_state_prep(acpi_state);
Signature · 1 line
Ondrej Zary
#2 lore raw
Quoted 15 lines · On Sunday 07 of October 2012 21:00:09 Ondrej Zary wrote:
Quoted 14 lines · On Sunday 07 October 2012 15:13:27 Ondrej Zary wrote:

Hello,
Intel D845BG board comes out of S3 with PS/2 keyboard and mouse completely dead. The machine works otherwise (with USB keyboard or over network). When rebooted in this state, the BIOS hangs with blank screen. I have the latest BIOS installed (P08).

Old kernels worked. Bisection pointed to commit:
b6dacf63e9fb2e7a1369843d6cef332f76fca6a3
(ACPI: Unconditionally set SCI_EN on resume)

Commenting out this line in drivers/acpi/sleep.c:

	acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);

fixes the problem.

Quoted 6 lines
Quoted 1 line

Any ideas why this breaks on this system?

Added acpi_read_bit_register there and it seems that SCI_EN is already set!

This patch fixes the problem here. I wonder how this affects systems that require SCI_EN to be set.

I'm not sure if reading SCI_EN is actually safe on all systems.

Matthew, what do you think?

Rafael

Quoted 23 lines
drivers/acpi/sleep.c +4 -1
@@ -271,6 +271,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
 	acpi_status status = AE_OK;
 	u32 acpi_state = acpi_target_sleep_state;
 	int error;
+	u32 sci_enabled;
 
 	ACPI_FLUSH_CPU_CACHE();
 
@@ -289,7 +290,9 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
 	}
 
 	/* This violates the spec but is required for bug compatibility. */
-	acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
+	acpi_read_bit_register(ACPI_BITREG_SCI_ENABLE, &sci_enabled);
+	if (!sci_enabled)
+		acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
 
 	/* Reprogram control registers */
 	acpi_leave_sleep_state_prep(acpi_state);
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
#3 lore raw
In reply to Ondrej Zary
Quoted 4 lines · Ondrej Zary

Added acpi_read_bit_register there and it seems that SCI_EN is already set!

This patch fixes the problem here. I wonder how this affects systems that require SCI_EN to be set.

I /think/ that this will be safe, but it doesn't match my recollection of how Windows behaves so it may break something. Any chance you can find someone with one of the machines mentioned in
https://bugzilla.kernel.org/show_bug.cgi?id=13745 and make sure that they still work with your patch?

Signature · 1 line
Matthew Garrett | [email protected]
reviewer
#4 lore raw
Quoted 4 lines · Matthew Garrett
Quoted 2 lines · Ondrej Zary

Added acpi_read_bit_register there and it seems that SCI_EN is already set!

Quoted 8 lines
Quoted 2 lines

This patch fixes the problem here. I wonder how this affects systems that require SCI_EN to be set.

I /think/ that this will be safe, but it doesn't match my recollection of how Windows behaves so it may break something. Any chance you can find someone with one of the machines mentioned in
https://bugzilla.kernel.org/show_bug.cgi?id=13745 and make sure that they still work with your patch?

yikes.
we started with a white-list,
then we made setting SCI_EN the default,
and here is at least one box that wants to be on a black list so that we don't set SCI_EN:-(

#5 lore raw
Quoted 14 lines · Len Brown
Quoted 4 lines · Matthew Garrett
Quoted 3 lines · Ondrej Zary

Added acpi_read_bit_register there and it seems that SCI_EN is already set!

Quoted 8 lines
Quoted 2 lines

This patch fixes the problem here. I wonder how this affects systems that require SCI_EN to be set.

I /think/ that this will be safe, but it doesn't match my recollection of how Windows behaves so it may break something. Any chance you can find someone with one of the machines mentioned in
https://bugzilla.kernel.org/show_bug.cgi?id=13745 and make sure that they still work with your patch?

Quoted 5 lines

yikes.
we started with a white-list,
then we made setting SCI_EN the default,
and here is at least one box that wants to be on a black list so that we don't set SCI_EN:-(

I wonder what Windows does here. Haven't tested it on this machine but I assume that it works.

Signature · 1 line
Ondrej Zary