Bug 11396 - ACPI brightness control is inverted
Summary: ACPI brightness control is inverted
Status: REJECTED DOCUMENTED
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Video (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-21 15:32 UTC by paladin
Modified: 2008-09-02 12:47 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.26
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
ACPI dump (166.19 KB, text/plain)
2008-08-22 07:38 UTC, paladin
Details
customized DSDT (306.35 KB, application/octet-stream)
2008-08-31 18:38 UTC, Zhang Rui
Details

Description paladin 2008-08-21 15:32:05 UTC
Latest working kernel version: 2.6.26
Earliest failing kernel version: unknown
Distribution: Debian Sid
Hardware Environment:
Software Environment:
Problem Description:

Please refer to: https://bugs.freedesktop.org/show_bug.cgi?id=17229
Comment 1 Zhang Rui 2008-08-21 18:19:21 UTC
Please attach the acpidump output.
you can use the latest pmtools at
http://www.lesswatts.org/patches/linux_acpi/
Comment 2 paladin 2008-08-22 07:38:09 UTC
Created attachment 17371 [details]
ACPI dump
Comment 3 Zhang Rui 2008-08-24 18:05:15 UTC
                    Method (_BCL, 0, NotSerialized)
                    {
                        Return (Package (0x10)
                        {
                            0x0F,
                            0x0E,
                            0x0D,
                            0x0C,
                            0x0B,
                            0x0A,
                            0x09,
                            0x08,
                            0x07,
                            0x06,
                            0x05,
                            0x04,
                            0x03,
                            0x02,
                            0x01,
                            0x00
                        })
                    }

weird, I find a really buggy _BCL method in your BIOS, which is used for brightness control.

Please attach the content of /proc/acpi/video/VGA/LCDD/brightness.
Comment 4 Zhang Rui 2008-08-24 18:10:02 UTC
By reading ACPI spec ACPI Extensions for Display Adapters B.6.2,
we can get this, "Each brightness level is represented by a number between 0 and 100, and can be thought of as a percentage. For example, 50 can be 50% power consumption or 50% brightness, as defined by the OEM."
So this is clearly a violation of ACPI spec, which we won't fix in Linux/ACPI.
Please check if there are any new BIOS releases that have fixed the problem.
Comment 5 paladin 2008-08-25 12:50:19 UTC
# cat /proc/acpi/video/VGA/LCDD/brightness 
levels:  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
current: 13

Sorry for insisting on this, but at some point in the past this has worked correctly. Unfortunately I cannot pinpoint exactly what change in my system made this stop working... :/ Currently everything works, except the RandR part. Controling the brightness from the keyboard works, using /proc/acpi/video/VGA/LCDD/brightness also, but Gnome (which uses RandR by default) has its values all inverted. Are you sure this is a buggye BIOS?

Thanks in advance.
Comment 6 paladin 2008-08-25 12:56:25 UTC
BTW, according to Packard Bell's site there is no new BIOS firmware version :/
Comment 7 Zhang Rui 2008-08-25 19:27:34 UTC
First, I'd say that the ACPI video extension support in this BIOS is definitely buggy, no matter if it's the root cause of the inverted brightness issue.

(In reply to comment #5)
> # cat /proc/acpi/video/VGA/LCDD/brightness 
> levels:  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
> current: 13
> 
> Sorry for insisting on this, but at some point in the past this has worked
> correctly.
> Unfortunately I cannot pinpoint exactly what change in my system
> made this stop working... :/
The issue should be consistent if using ACPI video driver and sys backlight class device.
Maybe you used some platform drivers to control the brightness?
what's your laptop model?

> Currently everything works, except the RandR part.
> Controling the brightness from the keyboard works, using
> /proc/acpi/video/VGA/LCDD/brightness also, but Gnome (which uses RandR by
> default) has its values all inverted. Are you sure this is a buggye BIOS?
Yes. RandR supports multiple modes and one of them is to use the sys backlight I/F to control the brightness. :)

please run "xrandr --output LVDS --set BACKLIGHT_CONTROL combination" and retry. :)
Comment 8 paladin 2008-08-26 14:33:34 UTC
This is Packard Bell EasyNote BU45, lshal:

  system.chassis.manufacturer = 'Packard Bell BV'  (string)
  system.chassis.type = 'Notebook'  (string)
  system.firmware.release_date = '05/11/2007'  (string)
  system.firmware.vendor = 'American Megatrends Inc.'  (string)
  system.firmware.version = '206'  (string)
  system.formfactor = 'laptop'  (string)
  system.hardware.primary_video.product = 10146  (0x27a2)  (int)
  system.hardware.primary_video.vendor = 32902  (0x8086)  (int)
  system.hardware.product = 'EasyNote_BU45'  (string)
  system.hardware.serial = '000613360386'  (string)
  system.hardware.uuid = 'DC8A0100-3432-0180-BF5A-001D60001558'  (string)
  system.hardware.vendor = 'Packard Bell BV'  (string)
  system.hardware.version = 'PB72E06210'  (string)
  system.kernel.machine = 'x86_64'  (string)
  system.kernel.name = 'Linux'  (string)
  system.kernel.version = '2.6.26-1-amd64'  (string)

It's a quite cheap laptop, so I wouldn't be surprised that there are lots of bugs in it :/ I'm only using open source drivers, all stock Debian.

Besides "combination" I also set it to "legacy", "native" and back to "kernel". None worked.

Thanks for the help :)
Comment 9 paladin 2008-08-29 06:41:49 UTC
Is there any path I can follow from here? Any configuration option which could overcome this?
Comment 10 Zhang Rui 2008-08-31 18:38:54 UTC
Created attachment 17551 [details]
customized DSDT

this customized DSDT should work for you. :)
how to override a DSDT can be found at:
http://www.lesswatts.org/projects/acpi/overridingDSDT.php
Comment 11 paladin 2008-09-02 12:47:46 UTC
That worked! Thank you very much for your help Zhang :)
Kind regards.

Note You need to log in before you can comment on or make changes to this bug.