Skip to contentSkip to conversation

acpi/video: Don't restore backlight to 0 at boot time

PATCH In review Keith Packard 2 participants 4 messages Dec 31, 2011 – May 24, 2012 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi/video: Don't restore backlight to 0 at boot time

If the initial ACPI reported backlight level is zero, or larger than max_level, then ignore it and set the level back to the current level instead. This avoids ending up with a black screen on an HP Pavilion G series G4 notebook QE040UA#ABA.

---
 drivers/acpi/video.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/video.c +1 -1
index 08a44b5..688f342 100644
@@ -711,7 +711,7 @@ acpi_video_init_brightness(struct acpi_video_device *device)
 		 * when invoked for the first time, i.e. level_old is invalid.
 		 * set the backlight to max_level in this case
 		 */
-		if (use_bios_initial_backlight) {
+		if (use_bios_initial_backlight && 0 < level_old && level_old <= max_level) {
 			for (i = 2; i < br->count; i++)
 				if (level_old == br->levels[i])
 					level = level_old;
Signature · 1 line
1.7.7.3
#1 lore raw

ACPI arguably does define 0 as being off (this is exceedingly poorly defined), but I'm not entirely happy with this - the firmware makes its behaviour conditional on the OS version. I'd really like to see an updated version of the Intel opregion spec to get a better idea of what we're meant to be doing here, but the last one made public was ancient.

Signature · 1 line
Matthew Garrett | [email protected]
#2 lore raw
Quoted 6 lines · Matthew Garrett

ACPI arguably does define 0 as being off (this is exceedingly poorly defined), but I'm not entirely happy with this - the firmware makes its behaviour conditional on the OS version. I'd really like to see an updated version of the Intel opregion spec to get a better idea of what we're meant to be doing here, but the last one made public was ancient.

Kernel 3.4 continues to break on this machine; I'd love to know how to get a suitable fix upstreamed...

Signature · 1 line
[email protected]
#3 lore raw
Quoted 11 lines · Keith Packard
Quoted 6 lines · Matthew Garrett

ACPI arguably does define 0 as being off (this is exceedingly poorly defined), but I'm not entirely happy with this - the firmware makes its behaviour conditional on the OS version. I'd really like to see an updated version of the Intel opregion spec to get a better idea of what we're meant to be doing here, but the last one made public was ancient.

Kernel 3.4 continues to break on this machine; I'd love to know how to get a suitable fix upstreamed...

Still waiting for that spec.

Signature · 1 line
Matthew Garrett | [email protected]