linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BIOS update breaks HP2125nr backlight keys
@ 2007-08-16 23:34 Ryan May
  2007-08-17 11:44 ` Peter Clifton
       [not found] ` <1187351040.22480.2.camel@localhost>
  0 siblings, 2 replies; 3+ messages in thread
From: Ryan May @ 2007-08-16 23:34 UTC (permalink / raw)
  To: linux-acpi

[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]

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

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

[-- Attachment #2: hp-backlight-fix.diff --]
[-- Type: text/x-patch, Size: 604 bytes --]

--- video.c.old	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;
 }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BIOS update breaks HP2125nr backlight keys
  2007-08-16 23:34 BIOS update breaks HP2125nr backlight keys Ryan May
@ 2007-08-17 11:44 ` Peter Clifton
       [not found] ` <1187351040.22480.2.camel@localhost>
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Clifton @ 2007-08-17 11:44 UTC (permalink / raw)
  To: linux-acpi

On Thu, 2007-08-16 at 18:34 -0500, 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.

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?

-- 
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!)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BIOS update breaks HP2125nr backlight keys
       [not found] ` <1187351040.22480.2.camel@localhost>
@ 2007-08-17 16:51   ` Ryan May
  0 siblings, 0 replies; 3+ messages in thread
From: Ryan May @ 2007-08-17 16:51 UTC (permalink / raw)
  To: linux-acpi

[-- Attachment #1: Type: text/plain, Size: 1765 bytes --]

Peter Clifton wrote:
> On Thu, 2007-08-16 at 18:34 -0500, 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.
> 
> 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.

> 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

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

[-- Attachment #2: acpi.dump.gz --]
[-- Type: application/x-gzip, Size: 38745 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-17 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-16 23:34 BIOS update breaks HP2125nr backlight keys Ryan May
2007-08-17 11:44 ` Peter Clifton
     [not found] ` <1187351040.22480.2.camel@localhost>
2007-08-17 16:51   ` Ryan May

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).