Skip to contentSkip to conversation

BIOS update breaks HP2125nr backlight keys

PATCH Ryan May 2 participants 3 messages Aug 16, 2007 – Aug 17, 2007 1 message not in the archive ACPI

lore
Share & tools
lore

Ryan May

author
#0 lore raw

Hi,

I recently updated the BIOS on my HP Pavilion dv2125nr laptop to F.34 (to enable the virtualization instructions). Since I did this, the Fn keys to control brightness have failed to work properly under Linux, though they work fine before booting (ie. at Grub). Hitting the Fn keys caused the brightness to change to the minimum possible. In fact, /proc/acpi/video/VGA/LCD/brightness would show that the level was set to 0 (though 20 was the lowest available). I was still able to control the brightness manually via /proc interface however.

My investigations seem to indicate that HP, in their wisdom, seem to have removed the _BQC method from their BIOS code. It seems that the ACPI code in Linux that handles the key events to change the brightness use the _BQC method without checking for success, which explains why the level being set was garbage. However, the /proc interface for brightness seems to only use device->brightness->curr to get the current level.

The attached patch, which I'm sure isn't correct, fixes my problems by making use of the brightness->curr field to track the current brightness.

I'd love to know your opinion(s) on the problem and a proper fix (including perhaps sysfs backlight support?).

Thanks,

Ryan

Signature · 4 lines
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
video.c renamed from video.c.old +6 -2
@@ -380,7 +380,7 @@
 
 	arg0.integer.value = level;
 	status = acpi_evaluate_object(device->dev->handle, "_BCM", &args, NULL);
-
+	device->brightness->curr = level;
 	printk(KERN_DEBUG "set_level status: %x\n", status);
 	return status;
 }
@@ -392,7 +392,11 @@
 	int status;
 
 	status = acpi_evaluate_integer(device->dev->handle, "_BQC", NULL, level);
-
+	if (status)
+	    *level = device->brightness->curr;
+	
+	printk(KERN_DEBUG "get_level status: %x\n", status);
+	status = 0;
 	return status;
 }
 
#1 lore raw
Quoted 11 lines · Ryan May

Hi,

I recently updated the BIOS on my HP Pavilion dv2125nr laptop to F.34 (to enable the virtualization instructions). Since I did this, the Fn keys to control brightness have failed to work properly under Linux, though they work fine before booting (ie. at Grub). Hitting the Fn keys caused the brightness to change to the minimum possible. In fact, /proc/acpi/video/VGA/LCD/brightness would show that the level was set to 0 (though 20 was the lowest available). I was still able to control the brightness manually via /proc interface however.

Quoted 7 lines

My investigations seem to indicate that HP, in their wisdom, seem to have removed the _BQC method from their BIOS code. It seems that the ACPI code in Linux that handles the key events to change the brightness use the _BQC method without checking for success, which explains why the level being set was garbage. However, the /proc interface for brightness seems to only use device->brightness->curr to get the current level.

Do you happen to see a _BCQ method in the DSDT instead? My HP nc6320 has that, and last time I looked, it seemed like it could plausibly be a Microsoft induced rename / typo, as this method is mentioned for getting brightness on a Windows Vista compatible box.

Did the bios update also mention any fixes for Vista compatibility?

Signature · 10 lines
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
author
#3 lore raw
In reply to a message not in the archive
Quoted 20 lines · Peter Clifton
Quoted 11 lines · Ryan May

Hi,

I recently updated the BIOS on my HP Pavilion dv2125nr laptop to F.34 (to enable the virtualization instructions). Since I did this, the Fn keys to control brightness have failed to work properly under Linux, though they work fine before booting (ie. at Grub). Hitting the Fn keys caused the brightness to change to the minimum possible. In fact, /proc/acpi/video/VGA/LCD/brightness would show that the level was set to 0 (though 20 was the lowest available). I was still able to control the brightness manually via /proc interface however.

Quoted 7 lines

My investigations seem to indicate that HP, in their wisdom, seem to have removed the _BQC method from their BIOS code. It seems that the ACPI code in Linux that handles the key events to change the brightness use the _BQC method without checking for success, which explains why the level being set was garbage. However, the /proc interface for brightness seems to only use device->brightness->curr to get the current level.

Quoted 4 lines

Do you happen to see a _BCQ method in the DSDT instead? My HP nc6320 has that, and last time I looked, it seemed like it could plausibly be a Microsoft induced rename / typo, as this method is mentioned for getting brightness on a Windows Vista compatible box.

I didn't see it, but I'm new to trying to track down things in the DSDT, so it's quite possible I missed it. I've attached a gzipped acpidump.

Quoted 1 line

Did the bios update also mention any fixes for Vista compatibility?

None of the versions between my old BIOS and the one I have now mention Vista.

Ryan

Signature · 4 lines
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma