Bug 29273 - XORG Intel driver chooses wrong acpi_video to control brightness in multi-GPU system
Summary: XORG Intel driver chooses wrong acpi_video to control brightness in multi-GPU...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Carl Worth
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-27 09:19 UTC by George Shearer
Modified: 2012-10-07 17:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description George Shearer 2010-07-27 09:19:28 UTC
I have an Alienware M11X R2 notebook which is built on Nvidia's new "optimus" technology. There's quite a few problems supporting this hardware with the current drivers available for linux and Xorg, but I'm hoping this one is easy to fix.

In my Xorg.log, I see this line:

[ 1574.285] (II) intel(0): found backlight control interface /sys/class/backlight/acpi_video1


So, my FN keys which I've bound to the proper Xorg symbol do not work to control my LCD brightness.

However, I fixed this problem by binding the keys to a script I wrote that uses the proper acpi_video device, which is /sys/class/backlight/acpi_video0/brightness

My system has both an NV50 and i915 GPU. 

I'm hoping I can provide the necessary information so that Xorg will eventually be able to control my brightness natively. 

I have posted lspci information and a complete disassembly of my ACPI DSDT here: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/312756/comments/208

Thank you!
Comment 1 George Shearer 2010-07-27 09:21:01 UTC
Oops, sorry, I forgot to mention that I'm using X86_64 FEDORA release 13, with latest updates/kernels/drivers.
Comment 2 Chris Wilson 2010-07-28 05:50:58 UTC
So it seems like both GPUs provide an ACPI interface to modify the brightness even though only one is connected. Currently the driver is quite naive and just tries a light of known interfaces and uses the first one that exists.

I am not even sure if it is possible to ACPI video driver to recognise that it is not in control of any real hardware and so should not expose an interface.

However, I have pushed one patch which looks right under normal circumstances which is to only hook up a backlight interface if it reports a non-zero max value. I am interested to know if this is sufficient or whether we have to dig deeper.
Comment 3 Chris Wilson 2010-07-28 05:52:41 UTC
To use the latest drivers in Ubuntu, you can simply install them from the ppa:xorg-edgers. You may have to wait a day or so before the commit becomes available through that channel.
Comment 4 Chris Wilson 2010-08-09 06:13:35 UTC
Or can you attach the results of reading /sys/class/backlight/acpi_video*/*?
Comment 5 Chris Wilson 2010-08-20 11:59:00 UTC
The docs say that the brightness should be controlled via the IGP. But that still leaves the question of how identify which ACPI backlight connects to which GPU. Hmm.
Comment 6 Chris Wilson 2012-08-26 18:55:56 UTC
Not the perfect solution, but a stop-gap:

commit 414e87255cdee6eb556703ddefd194af71b985ed
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Aug 26 19:47:31 2012 +0100

    Add Option "Backlight" to override the probed backlight control interface
    
    The automatic selection may not correspond with the correct backlight
    (such as in a multi-gpu, multi-panel device) or the user may simply
    prefer another control interface. This allows them to override the
    chosen interface using
    
      Option "Backlight" "my-backlight"
    
    to specify '/sys/class/backlight/my-backlight' as the interface to use
    instead.
    
    Suggested-by: Alon Levy <alevy@redhat.com>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=29273
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 7 Chris Wilson 2012-10-07 17:05:18 UTC
And for acpi in particular we use:

commit 7d76eb155ed78343abfa15b7c8af87fc3d4211e4
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Sep 7 18:06:25 2012 +0100

    sna: First scan for a backlight associated with the device
    
    The goal is to find the right interface in a multi-GPU system.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.