Ryan May wrote: > 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 > > Just a bump here to see if anyone can help me get my (admittedly) broken HP backlight working in a stock kernel. I have a patch (attached) that fixes my problem, though I am by no means a kernel hacker. Any help would be greatly appreciated. Thanks, Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma
--- video.c 2007-08-16 14:20:14.000000000 -0500 +++ video.c 2007-08-16 18:02:23.000000000 -0500 @@ -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; }