Bug 16379

Summary: i915: ACPI brightness control misses _BQC function
Product: ACPI Reporter: Andreas Demmer (mail)
Component: ACPICA-CoreAssignee: acpi_acpica-core (acpi_acpica-core)
Status: CLOSED DUPLICATE    
Severity: normal CC: lenb, rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.34.1 Subsystem:
Regression: No Bisected commit-id:
Attachments: acpi/video: acpi_brightness_hook API
drm/i915: override acpi brightness control

Description Andreas Demmer 2010-07-13 14:18:27 UTC
With kernel 2.6.34, I am unable to change the display brightness: The display
backlight always stays 100% bright even when on battery or using a
energy-saving power plan, sucking my battery dry in no time.

I had a look at /proc/acpi/video to check the brightness information,
but the only folders there are GFX0 and PEGP, none of them contains an LCD
subfolder. :-(

This is what acpi_listen tells me when using the brightness control FN keys: http://pastebin.com/bTewPC87

It seems that brightness information is stored in:

    * GFX0/DD02/brightness
    * PEGP/DD02/brightness

Writing "50" into this files (for 50% brightness) does not change the
brightness. Interesting detail: xbacklight now sais the brightness was 50% but
its not. Setting the brightness directly with xbacklight also does not work.

Xorg detects backlight controls: "(II) intel(0): found backlight control
interface /sys/class/backlight/acpi_video1", but there is also a acpi_video0. I
have written different values in the "brightness" file of both entries but
nothing happened.

I suspect this to be an issue of the switchable graphics or the BIOS: My
notebook (HP Envy 14) comes with switchable graphics: A discrete ATI Mobility Radeon HD 5650 and a integrated Intel Arrandale adapter.
Comment 1 Andreas Demmer 2010-07-16 07:45:22 UTC
The problem is, that ACPI brightness control misses _BQC function and the i915 driver for my Intel Arrandale graphics adapter fails to handle it.

There is an experimental kernel and driver patch for this:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/568611/

All testers reported it to work, also an owner of my laptop model. Any chances to get this into the kernel, soon?
Comment 2 Andreas Demmer 2010-07-16 08:41:34 UTC
Created attachment 27129 [details]
acpi/video: acpi_brightness_hook API
Comment 3 Andreas Demmer 2010-07-16 08:42:24 UTC
Created attachment 27130 [details]
drm/i915: override acpi brightness control
Comment 4 Andreas Demmer 2010-07-16 08:43:44 UTC
You may also contact Kamal Mostafa as he is currently working on a more polished version of his patch: https://wiki.ubuntu.com/KamalMostafa
Comment 5 Zhang Rui 2010-09-27 03:28:39 UTC
no, I don't agree with this proposal.
I'd like to write something like a backlight control manager.
ACPI, i915, platform drivers all register to this manager, and the backlight control manger choose with driver to use and export a unique sysfs I/F to users.
and we can add dmi quirk to disable ACPI video driver in the backlight control manager.

I plan to finish this in Oct. :)

*** This bug has been marked as a duplicate of bug 14216 ***