BIOS update breaks HP2125nr backlight keys
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; }
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/brightnesswould 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
_BQCmethod from their BIOS code. It seems that the ACPI code in Linux that handles the key events to change the brightness use the_BQCmethod without checking for success, which explains why the level being set was garbage. However, the /proc interface for brightness seems to only usedevice->brightness->currto 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!)
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/brightnesswould 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
_BQCmethod from their BIOS code. It seems that the ACPI code in Linux that handles the key events to change the brightness use the_BQCmethod without checking for success, which explains why the level being set was garbage. However, the /proc interface for brightness seems to only usedevice->brightness->currto get the current level.
Quoted 4 lines
Do you happen to see a
_BCQmethod 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