From: Ryan May <rmay@ou.edu>
To: linux-acpi@vger.kernel.org
Subject: BIOS update breaks HP2125nr backlight keys
Date: Thu, 16 Aug 2007 18:34:28 -0500 [thread overview]
Message-ID: <46C4DF04.6020306@ou.edu> (raw)
[-- 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;
}
next reply other threads:[~2007-08-16 23:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 23:34 Ryan May [this message]
2007-08-17 11:44 ` BIOS update breaks HP2125nr backlight keys Peter Clifton
[not found] ` <1187351040.22480.2.camel@localhost>
2007-08-17 16:51 ` Ryan May
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46C4DF04.6020306@ou.edu \
--to=rmay@ou.edu \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.