http://bugzilla.kernel.org/show_bug.cgi?id=13511
Summary: Bad _BQC behavior on HP laptops
Product: ACPI
Version: 2.5
Kernel Version: 2.6.28
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Power-Video
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No
When changing brightness using hotkeys and gnome-power-manager, the brightness
changes apparently randomly up or down.
Vladimir 'phcoder' Serbinenko has traced this problem to acpi in the kernel and
has posted his desciption and patch on the linux-acpi mailing list. His post
from the mailing list [http://marc.info/?l=linux-acpi&m=124456088526538&w=2]:
"Hello. On the following model
Manufacturer: Packard Bell BV
Product Name: EasyNote_BG45-U-001CH
BQC returns a value between 0 and 15 but the brightness levels are
between 0 and 8. I could make a table of correspondance however I find
it too inflexible. So I propose the following patch which disables BQC
if it behaves badly
--
Regards
Vladimir 'phcoder' Serbinenko
["bad_bqc.patch" (text/x-patch)]
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 1bdfb37..1735c34 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -594,6 +594,7 @@ acpi_video_device_lcd_get_level_current(struct
acpi_video_device *device,
unsigned long long *level)
{
acpi_status status = AE_OK;
+ int i;
if (device->cap._BQC || device->cap._BCQ) {
char *buf = device->cap._BQC ? "_BQC" : "_BCQ";
@@ -609,8 +610,15 @@ acpi_video_device_lcd_get_level_current(struct
acpi_video_device *device,
}
*level += bqc_offset_aml_bug_workaround;
- device->brightness->curr = *level;
- return 0;
+ for (i = 2; i < device->brightness->count; i++)
+ if (device->brightness->levels[i] == *level) {
+ device->brightness->curr = *level;
+ return 0;
+ }
+ /* BQC returned an invalid level. Stop using it. */
+ ACPI_WARNING((AE_INFO, "%s returned an invalid level",
+ buf));
+ device->cap._BQC = device->cap._BCQ = 0;
} else {
/* Fixme:
* should we return an error or ignore this failure?
"
I have attached his patch to this bug report.
Additional reporters have tested the patch and confirmed that it has been
working at
https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/376924
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
acpi-bugzilla mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla