Intel backlight info
Jesse Barnes
jbarnes at virtuousgeek.org
Thu Mar 20 14:40:03 PDT 2008
Seems there have been a few bugs and questions about the backlight support in
the latest Intel driver, so I figured it would be a good idea to send a note
out to the list describing how things work these days.
Intel chips natively support a couple of different backlight control methods:
the backlight duty cycle field of BLC_PWM_CTL[2] and optionally the "legacy"
backlight control register, or LBB, located in PCI config space. If the LBB
is in use, it's supposed to determine the backlight brightness in conjunction
with the backlight duty cycle.
System firmware code is responsible for setting the BLC_PWM_CTL[2] legacy bit
if the platform has the LBB register wired up in addition to the duty cycle
field. Some get this right and things work as expected. However in many
cases there are a few additional wrinkles.
Some machines include an external backlight controller. This controller may
be wired up to BLC_PWM_CTL or LBB, both or neither. In the latter case, the
current Intel driver has no way of directly manipulating the backlight level
unless your kernel happens to provide a driver that can talk to said
backlight controller.
And then there are hotkeys. In many cases, the hotkeys on your laptop will
adjust the BLC_PWM_CTL and/or LBB values directly, without notifying the
driver. In the past, this meant the driver could get confused about the
current level and you'd end up seeing "jumps" in backlight values when you
used the hotkeys alongside xbacklight or a desktop utility for example.
The "get property" stuff I pushed last week was meant to address this, since
it allows xbacklight & xrandr to query the current value directly rather than
returning the last value sent to the server. And then again, your machine
may have an external controller that the hotkeys control, which again means
no software backlight control unless you have a kernel driver.
So, the bottom line is that you should be using a kernel driver if at all
possible. However, given the design of the /sys/class/backlight interface
and bugs in old kernels, we can't just open /sys/class/backlight, walk the
directory, and pick an interface. So we have a list in the driver if
supported interfaces, which at this point includes ACPI, thinkpad, and
fujitsu. If your machine has a /sys/class/backlight interface available that
we don't support, please file a bug and we'll test it and add it to the list.
If you don't have a kernel driver for your platform and are seeing issues with
the backlight brightness jumping around, please try the attached patch. I'm
hoping it'll provide a better default for machines that use both the
BLC_PWM_CTL & LBB regs, but I'm worried about pushing it too quickly since it
seems that every machine I fix the backlight control for breaks at least one
other one...
Thanks,
Jesse
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i830-combo-not-legacy.patch
Type: text/x-diff
Size: 578 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080320/8de85613/attachment.patch>
More information about the xorg
mailing list