Skip to contentSkip to conversation

ACPI: poke display on lid open

PATCH Superseded Daniel Drake 1 participant 1 message Jun 1, 2007 ACPI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: poke display on lid open

Many Dell laptops have the DSDT coded to power down the display when the lid is closed, and leave it off when it is opened.

http://bugzilla.kernel.org/show_bug.cgi?id=5155

Based on ideas from Len Brown, this patch creates an internal event so that the button driver can notify the video driver when the lid has been opened. The video driver then reactivates the LCD.

---

After all 3 of these patches, my Dell laptop display is correctly powered back up when I open the lid, without any userspace or DSDT hacks. Is the ievent idea acceptable or does it clutter things too much?

drivers/acpi/button.c +7 -2
Index: linux/drivers/acpi/button.c
===================================================================
@@ -259,10 +259,15 @@ static void acpi_button_notify(acpi_hand
 		if (button->type == ACPI_BUTTON_TYPE_LID) {
 			struct acpi_handle *handle = button->device->handle;
 			unsigned long state;
+			acpi_status status;
 
-			if (!ACPI_FAILURE(acpi_evaluate_integer(handle, "_LID",
-								NULL, &state)))
+			status = acpi_evaluate_integer(handle, "_LID", NULL,
+						       &state);
+
+			if (!ACPI_FAILURE(status)) {
+				acpi_ievent_notify(ACPI_IEVENT_LID, &state);
 				input_report_switch(input, SW_LID, !state);
+			}
 
 		} else {
 			int keycode = test_bit(KEY_SLEEP, input->keybit) ?
drivers/acpi/video.c +47 -9

99 lines not on this page · raw message